• i need to write a code so that i can check all the checkboxes in a table list by clicking one checkbox. Just same as we have list of pages or posts with the checkbox at the top <thead> portion to select all the item from the list for some bulk actions..
    Can i get help in this ??? Thanks a ton in advance. 🙂

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I can’t give you specific code, but in general terms, this is what you do:

    Create a javascript or jQuery script that is triggered by the change event of the <thead> checkbox. The specifics of what happens with the change event can vary by your specific needs, one approach is to have the script match the check state of the <thead> checkbox in all of the other checkboxes in the list.

    To ensure your script is loaded properly in the WP environment, use wp_enqueue_script() to cause your script to load with the page.

Viewing 1 replies (of 1 total)
  • The topic ‘multiple selection by check one checkbox’ is closed to new replies.