From 1672fd8c99fe66700945c616e3ca2802c713aae3 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 24 Jul 2013 13:07:23 +0530 Subject: [PATCH] [minor] [fix] use prop(checked) instead of attr(checked) as recommended for jQuery 1.9.1 --- website/templates/js/cart.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/templates/js/cart.js b/website/templates/js/cart.js index 2f5ad31d32..a22b9f34d9 100644 --- a/website/templates/js/cart.js +++ b/website/templates/js/cart.js @@ -249,11 +249,11 @@ $.extend(wn.cart, { }); $address_wrapper.find('input[type="checkbox"]').on("click", function() { - if($(this).is(":checked")) { + if($(this).prop("checked")) { var me = this; $address_wrapper.find('input[type="checkbox"]').each(function(i, chk) { if($(chk).attr("data-address-name")!=$(me).attr("data-address-name")) { - $(chk).removeAttr("checked"); + $(chk).prop("checked", false); } }); @@ -276,7 +276,7 @@ $.extend(wn.cart, { }); $address_wrapper.find('input[type="checkbox"][data-address-name="'+ address_name +'"]') - .attr("checked", "checked"); + .prop("checked", true); $address_wrapper.find(".accordion-body").collapse({ parent: $address_wrapper,