Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • I did the same. Commented Mar 12, 2019 at 4:42
  • Sounds good, I have a quick question. When there is no content inside featured-block__title and featured-block__tag classes, the script should be like this jsfiddle.net/j0evb72y Commented Mar 12, 2019 at 4:57
  • @flash I would like to handle that using else condition. check my edited code. Commented Mar 12, 2019 at 4:59
  • looks good, but I am wondering if there is any mistake in my fiddle ? Your else statement looks perfectly fine. Commented Mar 12, 2019 at 5:01
  • @flash No need to check twice when you know what you want to do. and nothing wrong with your fiddle. you can use else to add alternate class Commented Mar 12, 2019 at 5:02