Problems with JavaScript Site Menu Header when upgrading to WordPress 3.5
-
Hi,
I just upgraded our company website: http://www.human1.com, which is using a custom theme that has a javascript graphic menu on the top of our home page.
After upgrading the custom menus aren’t working and it’s displaying all the menus under the graphics instead of showing each relevant menu when you hover your mouse over each graphic.
The code used to control this on the backend in the header.php file is this:
<!-- This JavaScript snippet activates those tabs --> <script> // perform JavaScript after the document is scriptable. $(function() { // setup ul.tabs to work as tabs for each div directly under div.panes $("ul.tabs").tabs("div.panes > div", { event: 'mouseover', effect: 'fade', history: true }); }); </script>What do I need to do to this to get it to work under the new javascript in 3.5?
Please help, this is urgent as our main site is compromised.
Thank you so much!!
Alexandra
-
Please place your code in between
backticks(it’s usually the button on the top-left of keyboard with the ~ symbol).Your javascript needs to be written in no-conflict mode. See more here:
http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappersHi,
I tried replacing the code above with:
</div>
<!– This JavaScript snippet activates those tabs –>
<script>
// perform JavaScript after the document is scriptable.
(function($) {
// setup ul.tabs to work as tabs for each div directly under div.panesjQuery(“ul.tabs”).tabs(“div.panes > div”, {
event: ‘mouseover’,
effect: ‘fade’,
history: true
});})(jQuery);
</script>
</div>and that didn’t work… I’m not a great coder, just trying to get the menu fixed.
Thank you!
Try this…
<script> // perform JavaScript after the document is scriptable. $jQ(function() { // setup ul.tabs to work as tabs for each div directly under div.panes jQuery("ul.tabs").tabs("div.panes > div", { event: 'mouseover', effect: 'fade', history: true }); }); </script>Thank you, that didn’t work either 🙁
Try contacting the developers of your custom theme.
I did and explained what I found, if we find a fix I’ll post it here. If anyone else has any other ideas I’m open to try.
Thanks!
The topic ‘Problems with JavaScript Site Menu Header when upgrading to WordPress 3.5’ is closed to new replies.