top.location.pathname stopping jquery working on other pages -


i have added following statement above plugin plugin work on specific pages.

if (top.location.pathname === '/' || top.location.pathname === '/tickets/sell/' || top.location.pathname === '/contact/') {   !function ($) { 

the problem since have added statement jquery work on pages listed above.

i.e following statement in on master page run on login page if login url added plugin statement.

           <script>            $(function () {                if  (location.href.match('login/?redirect=/basket/')) {                    $('div#sign').show();                }                else {                    $('div#sign').hide();                }            });                    </script> 

any / advice appreciated!

i guess added these if cases top of plugin. have care did added if using post-back way works if uses partial request(ajax) script link may not work.(browser not download js file). guess question can more specific.

questions :

where did added plugin js? request method using?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -