Uncaught TypeError: number is not a function [closed]

Try this: <script type=”text/javascript” charset=”utf8″> jQuery(function($){ $(‘img’).each( function() { var mySrc = $(this).attr( “src” ); $(this).wrap( ‘<a href=”‘+mySrc+'” class=”link”></a>’ ); }); }) </script>

jQuery color picker function on change

$(‘yourColorpickerselector’).wpColorPicker({ change: function(event, ui) { var form = $(this).closest(‘form’) form .trigger(‘change’) } }); within color picker default method “change”. you can trigger form change. or any other function, what you want to do. related link : wordpress discuss iris color picker

jQuery functions work in console, but not live

Where are you using the jQuery code we see in question? If you are using it in header (head), I would recommend using: jQuery(document).ready(function(){ jQuery(‘.homepage_buttons_text a[href^=”http://danrobertsgroup.com/?attachment_id=1037″]’).each(function(){ jQuery(this).html(“<h1 class=”homepage_button_title”>Workouts</h1><span class=”homepage_button_title”>Books / DVD’s / Downloads</span>”); }); }); If you are using the code in the footer, the above replacement is still recommended and for each add_action hook … Read more

CF7 Add a read only attribute to an input field

It`s not completely clear to me how your fields are organized but adding the following piece of code to your if statements should help making the desired input “readonly”: jQuery(‘input[name=”internetSearch”]’).prop(‘readonly’, true);

jQuery append only works if I select html in admin section [closed]

These three lines work as expected , There is a problem maybe with other code before these lines that prevent the execution of your script; In case just fire the browser console in this page and try them here $( “html” ).append( “<div id=’bf_rsvp_note_display’></div>” ); $( “body” ).append( “<div id=’bf_rsvp_note_display’></div>” ); $( “.topbar” ).append( “<div … Read more

How do I load this jQuery to my wordpress page?

I would download the jquery.mixitup.min.js and place it in the same folder as your custom script (js), also makes sense to place the “main.js” file in there also, keeping your js together, if you can. Not sure if your using a child theme or not,if not but add the following to your functions file, overwriting … Read more

Combo box populating a DIV using ajax/jquery

Without knowing how you’re populating your combo box, here’s how I would do it: Use jQuery to capture the form selection: jQuery(‘#formElementID’).change(function () {//this captures dropdown menu change event //call js function and pass form value – in my case a post id fetchTenantWoContactInfo(jQuery(‘#formElementID’).val()); }); Use function to call ajax function to get post info … Read more

Custom JQuery script in page template won’t work [duplicate]

The version of jQuery distributed with WP runs in noConflict() mode (meaning that $ is not bound to the jQuery object). Thus, you should do: <script type=”text/javascript”> jQuery( document ).ready(function() { console.log( “ready!” ); }); </script> or <script type=”text/javascript”> (function ($) { $( document ).ready(function() { console.log( “ready!” ); }); })(jQuery) ; </script>