javascript - How can I trigger jQuery fadeIn() fadeOut() from a <div> element -
i have hidden element on page: <div id="hidden"></div>
i have element on page want button trigger: <div id="trigger"></div>
i want this:
$('#trigger').on('click', function(){ if($(this).val() == 'clicked') { $('#hidden').fadein(700); $('#trigger').fadeout(250); } });
do have trigger
element in css , how listen event of clicking trigger
?
element div doesn't have attribute value, don't need
if($(this).val() == 'clicked')
condition. that's , code work.
Comments
Post a Comment