Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using a plugin to place this code on specific pages. But it is not firing correctly.

Has anyone had experience working with Ubermenu, WP and jQuery? Do I have to call jQuery into my <script></script> or should I scrap all this and go with through conditional tags?

Like this

<?php
$page = array( 42, 'page id', 'Page Title' );

if ( is_page($page) || is_single($post) ) {
?>
<script type="text/javascript">
window.onload=function(){$('#menu-item-156').mouseover(function(){
$(this).find('ul').slideDown();
});

$('#menu-item-156').trigger('mouseover');};
</script>
<?php  }  ?>
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.