Select all checkboxes on a webpage using Jquery1 min read

In

I wanted to select all inbox messages on a website which I use for the university, the website doesn’t have a “select all ” functionality.
This jquery code snippet selects all checkboxes and check them.

jQuery('input:checkbox').each(function () { 
  var elem= jQuery(this);
  elem.trigger('click');
});

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Peshmerge.io-logo
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.