Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RP.filter_adult = function () {
- // 'this' is the element that received event (checkbox)
- if ($(this).is(':checked')) {
- $('#movies tbody tr').each(function() {
- // 'this' is each element being iterated over
- if (! /^G|PG$/i.test($(this).find('td:nth-child(2)').text())) {
- $(this).hide();
- }
- });
- } else {
- $('#movies tbody tr').show();
- }
- }
Add Comment
Please, Sign In to add comment