jquery issue in functions.php

I thought that you could just enqueue jquery and all the versions would be loaded All version of jQuery? No. That would be foolish. You’d load a tremendous number of resources and have a high probability of conflicts. If you are referring to the built in dependency handling, then you can enqueue only the dependent … Read more

Customize wp-admin form custom fields

I am not sure this is your problem if you are not getting any errors, but make sure you have your jQuery code within document ready wrappers and pass the $ in to make sure you can access it since WordPress runs in no-conflict mode. jQuery(document).ready(function($) { $(“input”).keyup(function(){ $(“input”).css(“background-color”,”pink”); }); }); It would also be … Read more

Jquery script not loading on site Front page

WordPress uses jQuery noConflict wrappers so the dollar sign will not work unless it is used as an alias. Either wrap your code in: jQuery(document).ready(function($) { // Inside of this function, $() will work as an alias for jQuery() // and other libraries also using $ will not be accessible under this shortcut }); Or … Read more

Clear custom field when new tag is added

Could you do something like this? function tag-added-script() { ?> <script> jQuery(function($) { $(‘.tagadd’).click(function() { // Run Your Jquery Here alert(‘test’); }); }); </script> <?php } add_action( ‘admin_head’, ‘tag-added-script’ ); The above will react whenever the “tagadd” button is clicked. Theoretically you could then grab the custom field ID and clear it via jquery.

Group posts by weekly or monthly

Sorry, but what’s the use scope of JSON API plugin here? The only thing you need is ad the week (or wahtever information you need) in the markup of the page. Assuming your loop is somethin like this: <ul id=”postlist”> <?php while( have_posts() ) : the_post(); ?> <li id=”post_<?php the_ID(); ?>” class=”post”> <h2><?php the_title(); ?></h2> … Read more

How to update scrollbar when using Jetpack’s Inifnite Scroller?

Ok, I found the solution at Jetpack’s website, http://jetpack.me/support/infinite-scroll/ I just needed to insert the custom scrollbar’s update function inside this function provided by jetpack’s infinite scroll. “JavaScript Events Inevitably, there are situations in a theme that require some JavaScript interaction after posts are added. One such example is in a theme that uses jQuery … Read more

JS script not being included [closed]

WordPress uses the noConflict version of jQuery which does not allow $. use jQuery. or simple replace jQuery( document ).ready(function() by jQuery( document ).ready(function( $ ) hope that helps.