conflict with custom javascript
-
Hello
I have added some custom jquery script to function.php on my custom version of twentyfourteen theme and whenever I have a table on my post it will block one of my custom scripts ( the first one on the code below).
If you go to page no. 1 below you will notice that you will get no response when clicking on the hamburger menu icon on your top right corner ( and in some other buttons on the same section).
On page 2 below you will get the correct response.
The difference is that page 1 has a table, while page 2 does not.
I did take the table off from page 1 and it worked perfectly.
For information the code added to functions.php is:
function mytheme_custom_scripts(){ wp_register_script( 'bpopup', '//www.soeezauto.ma/js/wp_bpopup_25051.js', array('jquery'),null,true); wp_register_script( 'alertify-js', '//www.soeezauto.ma/js/alertifyjs/alertify.min.js', array('jquery'),null,true); wp_register_script( 'footer_ajax', '//www.soeezauto.ma/js/wp_footer_ajax.js', array('jquery'),null,true); wp_enqueue_script( 'bpopup' ); wp_enqueue_script( 'alertify-js' ); wp_enqueue_script( 'footer_ajax' ); if(isset($_SESSION['seller_id'])){ wp_register_script( 'sess1', '//www.soeezauto.ma/js/wp_sess1.js', array('jquery'),null,true); wp_enqueue_script( 'sess1' ); } else{ wp_register_script( 'sess0', '//www.soeezauto.ma/js/wp_sess0.js', array('jquery'),null,true); wp_enqueue_script( 'sess0' ); } } add_action('wp_enqueue_scripts', 'mytheme_custom_scripts');
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘conflict with custom javascript’ is closed to new replies.