Having an issue with JQuery interfering with Javascript -
i have wordpress site has gallery built in javascript. have created jquery code site , works, except gallery shadowbox no longer pulls up. removed jquery wrote , worked, tried put in , stopped working again . have done searching , found suggestions described below none of them have worked.
this code wrote:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> jquery(function ($) { $(window).load(function() { if ( $('.home').length) { $(window).scroll(function() { var height = $(window).scrolltop(); if(height > 500 ) { $('#wrapper-7').addclass( "wrapper-7-changed" ); $('.wrapper-mirroring-7').addclass( "wrapper-mirroring-7-changed" ); $('.social-icon').addclass( "social-icon-changed" ); $('#block-7 li.widget').addclass( "widget-changed" ); $('#block-1').addclass( "block-1-changed" ); $('#block-9').addclass( "block-9-changed" ); $('#wrapper-6').addclass( "wrapper-6-changed" ); $('.wrapper-mirroring-6').addclass( "wrapper-mirroring-6-changed" ); } else { $('#wrapper-7').removeclass( "wrapper-7-changed" ); $('.wrapper-mirroring-7').removeclass( "wrapper-mirroring-7-changed" ); $('.social-icon').removeclass( "social-icon-changed" ); $('#block-7 li.widget').removeclass( "widget-changed" ); $('#block-1').removeclass( "block-1-changed" ); $('#block-9').removeclass( "block-9-changed" ); $('#wrapper-6').removeclass( "wrapper-6-changed" ); $('.wrapper-mirroring-6').removeclass( "wrapper-mirroring-6-changed" ); } }); } else { $(window).scroll(function() { var height = $(window).scrolltop(); if(height > 50 ) { $('#wrapper-7').addclass( "wrapper-7-changed" ); $('.wrapper-mirroring-7').addclass( "wrapper-mirroring-7-changed" ); $('.social-icon').addclass( "social-icon-changed" ); $('#block-7 li.widget').addclass( "widget-changed" ); $('#block-1').addclass( "block-1-changed" ); $('#block-9').addclass( "block-9-changed" ); $('#wrapper-6').addclass( "wrapper-6-changed" ); $('.wrapper-mirroring-6').addclass( "wrapper-mirroring-6-changed" ); } else { $('#wrapper-7').removeclass( "wrapper-7-changed" ); $('.wrapper-mirroring-7').removeclass( "wrapper-mirroring-7-changed" ); $('.social-icon').removeclass( "social-icon-changed" ); $('#block-7 li.widget').removeclass( "widget-changed" ); $('#block-1').removeclass( "block-1-changed" ); $('#block-9').removeclass( "block-9-changed" ); $('#wrapper-6').removeclass( "wrapper-6-changed" ); $('.wrapper-mirroring-6').removeclass( "wrapper-mirroring-6-changed" ); } }); } }); }); </script>
i tried adding $.noconflict();
, did not anything, changed remove $ jquery , changed , still makes gallery not work
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> if ( jquery('.home').length) { jquery(window).scroll(function() { var height = jquery(window).scrolltop(); if(height > 500 ) { jquery('#wrapper-7').addclass( "wrapper-7-changed" ); jquery('.wrapper-mirroring-7').addclass( "wrapper-mirroring-7-changed" ); jquery('.social-icon').addclass( "social-icon-changed" ); jquery('#block-7 li.widget').addclass( "widget-changed" ); jquery('#block-1').addclass( "block-1-changed" ); jquery('#block-9').addclass( "block-9-changed" ); jquery('#wrapper-6').addclass( "wrapper-6-changed" ); jquery('.wrapper-mirroring-6').addclass( "wrapper-mirroring-6-changed" ); } else { jquery('#wrapper-7').removeclass( "wrapper-7-changed" ); jquery('.wrapper-mirroring-7').removeclass( "wrapper-mirroring-7-changed" ); jquery('.social-icon').removeclass( "social-icon-changed" ); jquery('#block-7 li.widget').removeclass( "widget-changed" ); jquery('#block-1').removeclass( "block-1-changed" ); jquery('#block-9').removeclass( "block-9-changed" ); jquery('#wrapper-6').removeclass( "wrapper-6-changed" ); jquery('.wrapper-mirroring-6').removeclass( "wrapper-mirroring-6-changed" ); } }); } else { jquery(window).scroll(function() { var height = jquery(window).scrolltop(); if(height > 50 ) { jquery('#wrapper-7').addclass( "wrapper-7-changed" ); jquery('.wrapper-mirroring-7').addclass( "wrapper-mirroring-7-changed" ); jquery('.social-icon').addclass( "social-icon-changed" ); jquery('#block-7 li.widget').addclass( "widget-changed" ); jquery('#block-1').addclass( "block-1-changed" ); jquery('#block-9').addclass( "block-9-changed" ); jquery('#wrapper-6').addclass( "wrapper-6-changed" ); jquery('.wrapper-mirroring-6').addclass( "wrapper-mirroring-6-changed" ); } else { jquery('#wrapper-7').removeclass( "wrapper-7-changed" ); jquery('.wrapper-mirroring-7').removeclass( "wrapper-mirroring-7-changed" ); jquery('.social-icon').removeclass( "social-icon-changed" ); jquery('#block-7 li.widget').removeclass( "widget-changed" ); jquery('#block-1').removeclass( "block-1-changed" ); jquery('#block-9').removeclass( "block-9-changed" ); jquery('#wrapper-6').removeclass( "wrapper-6-changed" ); jquery('.wrapper-mirroring-6').removeclass( "wrapper-mirroring-6-changed" ); } }); } </script>
i not have code gallery, in how debug or change code both can work helpful.
Comments
Post a Comment