Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery show hide based on data attribute

$('form')
        .children()
        .filter(function(){
            return $(this).data('show') === 'pro';
        })
        .show();
$('form')
         .children()
         .filter(function(){
             return $(this).data('show') === 'home';
         })
         .hide();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #show #hide #based #data #attribute
ADD COMMENT
Topic
Name
8+1 =