skip to Main Content

call method in controller different id – Jquery

I have foreach @foreach (var produkt in ViewBag.OnePageOfProducts){ <button id="submitButton" value="@produkt.ProductId">Add to Cart</button> } and call method jquery ajax <script> $(document).ready(function () { var id var quantity = 1; $('#submitButton').click( /*error dont work read value from button id */ var…

VIEW QUESTION

I wrote a code to animate badge when the user click on a button, how to fix it? – Jquery

I wrote this hover the animation: animated slideIn doesn't trigger, while the console show notihing let getAddToCart = document.querySelectorAll('.addToCart'); let getCartBadge = document.querySelector('.cartBadge'); getAddToCart.forEach((item) => { item.addEventListener('click', function (e) { e.preventDefault(); console.log('clicked'); // animate the cartBadge getCartBadge.classList.add('animated', 'slideIn'); // other…

VIEW QUESTION
Back To Top
Search