BUG: The javascript for eShop is not defined properly.
-
There is some javascript that eShop adds to the page that looks like this:
<script type="text/javascript"> //<![CDATA[ jQuery(document).ready(function($){ $('.addtocart').submit(function(){ var Id =$(this).attr("id"); var data = {action: 'eshop_special_action',post:$('#'+Id).serialize() }; $.post("http://savageworkouts.com/wp/wp-admin/admin-ajax.php", data, function(response){ $('#'+Id +" .eshopajax").insertAfter(this).fadeIn(100).html(response).fadeOut(3000); setTimeout (cleareshopCart,1000); setTimeout (doeshopRequest,750); setTimeout (cleareshopRequest,3000); }); function doeshopRequest(){ var tdata = {action: 'eshop_cart'}; $.post("http://savageworkouts.com/wp/wp-admin/admin-ajax.php", tdata, function(response){ $(".ajaxcart").insertAfter(this).fadeOut(50).html(response).fadeIn(700); }); } function cleareshopRequest(){ $(".eshopajax").empty(); } function cleareshopCart(){ $(".ajaxcart").insertAfter(); } return false; }); }); //]]> </script>This code is improperly defined. It doesn’t follow WordPress standards. How do I know? I installed a plugin called “JavaScript to Footer” which moves all properly defined scripts to the “footer” hook location. All the scripts on my page get moved except for that eShop code.
Can you please fix?
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
The topic ‘BUG: The javascript for eShop is not defined properly.’ is closed to new replies.