JQuery Archives - thehazels JQuery Archives - thehazelsthehazels

Tag Archives for JQuery

Ajax queries are redirected (admin-ajax.php 302)

I’ve just spent a lot of time working out why an ajax function was not working for non-logged in users. I’d added an action add_action(‘wp_ajax_nopriv_my_function’, ‘my_function’) and I’d made sure admin-ajax.php was localized wp_localize_script(‘ajax-post’, ‘wp-ajax’, array(‘ajaxurl’ => admin_url(‘admin-ajax.php’)). Unfortunately the call was … Continue reading

19. January 2015 by Antonia Whitaker
Categories: Wordpress | Tags: | Leave a comment

Identifying radio buttons

On document ready, to find the value of the check radio button, use the id together with  ‘checked’. E.g.: $(‘#myradiobutton:checked’).val();/> However, to trigger a click function on the radio button, id wasn’t recognised, but the input name was. E.g.: $(‘input[name=myradiobutton]’).click(function{}); … Continue reading

01. May 2014 by Antonia Whitaker
Categories: Code | Tags: | Leave a comment

Useful Plugins

List of useful plugins, plus ideas for creating own Continue reading

07. November 2013 by Antonia Whitaker
Categories: To Do, Wordpress | Tags: , , | Leave a comment