Jquery is not working in wordpress php file

wp_enqueue_script( ‘my-jquery’, get_stylesheet_directory_uri() .’/js/jquery-1.9.0.js’, array( ‘jquery’ ) ); check for jquery error also check with source code if file is being loaded or not. you must have included jquery library before including your js file.

Hide input field when second input field is in focus

This question is out of scope here. You should try stackoverflow for this question. Though I would like to answer your question. You need to use some CSS as well as JQuery for getting the desired result. See the working fiddle here. Hope this works for you. CSS addition: input[type=subscribe]:focus + input[type=search] { display:none; } … Read more

slide change on hover with nextgen scrollgallery [closed]

Solution I am providing intiates the click event when mouse enters the thumbnail (with a delay to avoid passing mouse events). jQuery(‘.scrollgallery .thumbarea img’).hover(function(e){ this.ScrollGalleryHover = setTimeout(‘initiateClick(“‘+jQuery(this).attr(‘src’)+'”);’,500); },function(e) { clearTimeout(this.ScrollGalleryHover); }); function initiateClick(src) { jQuery(‘.scrollgallery .thumbarea img[src=”‘+src+'”]’).click(); }

JS plugin script loading but not working

WordPress-specific script issues are generally limited to one of the following: Improperly enqueued script Proper script enqueueing involves use of wp_enqueue_script(). If the script is properly enqueued, you will see a <script….> link in the document head or footer Not accounting for jQuery no-conflict mode WordPress-bundled jQuery is configured for no-conflict mode, which requires wrapping … Read more