News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Defered scripts without „src” attribute

Started by man.of.earth, November 04, 2019, 15:39:43 PM

Previous topic - Next topic

man.of.earth

Hello,

In the VM generated pages, there are about 10 scripts that have the defer attribute set, but do not have a src attribute, so the defer attribute is useless in this case.
A better idea would be to put those scripts to the end of the HTML document.

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

man.of.earth

#2
Here is a page source as example. The page contains dropdowns.
view-source:https://www.proxima-mundi.ro/printuri-pe-canvas-foto-n

Sample code from the page:
<script defer id="cvselvarsee3eece0c6619d1881c8f55e047f6ba3-js" type="text/javascript">//<![CDATA[
jQuery(document).ready(function($){
Virtuemart.setBrowserState=false;
$('select[data-cvsel="field140"]').off('change',Virtuemart.cvFind);
$('select[data-cvsel="field140"]').on('change',{variants:[["/printuri-pe-canvas-foto-n?virtuemart_product_id=39","mare (100 x 67 cm)"],["/printuri-pe-canvas-foto-n?virtuemart_product_id=40","medie (80 x 53 cm)"],["/printuri-pe-canvas-foto-n?virtuemart_product_id=41","mică (60 x 40 cm)"]]},Virtuemart.cvFind);
}); //]]>
</script>