Reputation: 77
Anybody can tell me what is wrong here? I have a conflict with
ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
,
So that's why I need noconflict
to true,but if I assigned it to all pages my slidingpanels
doesn't work.I really need to have the sliding panel script on pages that isn't virtuemart
help
<?php
if ($("body").hasClass("option-com-virtuemart")) {
addScript("noflict.js");}
else {
addScript("slidingpanel.js");}
?>
Thanks in advance
Upvotes: 0
Views: 367
Reputation: 1689
You have written jQuery
code inside the PHP
block, free from that and try again.
Upvotes: 0
Reputation: 944520
if ($("body").hasClass("option-com-virtuemart")) {
appears to be JavaScript (using the jQuery library). It isn't PHP so it can't run inside a <?php ?>
block.
Upvotes: 5