Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - to check HTML attribute exist or not

0 votes
50 views
added May 22 in jQuery by lcjr Second Warrant Officer (3,160 points)
$.fn.hasAttr = function(name) {  
    return this.attr(name) !== undefined;
  };

  if(!$(dfpStoFullId).hasAttr('data-google-query-id')){ 
    HideSto();  
    $(stoEl).hide();
    console.log('sto display none');
  }

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...