RE: HTML The class Attribute

You are viewing a single comment's thread from:

HTML The class Attribute

in class •  7 years ago 

Good post @rabiul - in the interest of not writing more code than absolutely necessary, I reckon you could’ve achieved the same outcome with your function by writing the following:

function myFunction {
  document.getElementByClassName(‘city’).style.display = “none”;
}

Keep up the good posts.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

ok thanks