Tuesday, 10 September 2013

Hide div with match ID and Class Using jquery

Hide div with match ID and Class Using jquery

I want hide div which has id 'hide' and class 'test'. It is working fine
with .filter method but I want to is there another method to do this.
fiddle
if($('#hide').hasClass('test')){
$('.test').hide()
}
//$('#hide').filter(function(){
//return this.className=='test'
//}).hide()

No comments:

Post a Comment