Posted By


xtine777 on 02/23/18

Tagged


Statistics


Viewed 984 times
Favorited by 0 user(s)

Hide header, when news are empty


/ Published in: jQuery
Save to your folder(s)

Hide parent element, when child element has a specific class.
In this case:
child element = .no-news-found
parent element = .csc-default (= content element containing the news plugin with header)


Copy this code and paste it in your HTML
  1. page.jsFooterInline.10 = TEXT
  2. page.jsFooterInline.10.value (
  3. $(function() {
  4. $('.csc-default').filter(function() {
  5. return $('div', this).hasClass('no-news-found');
  6. }).hide();
  7. });
  8. )

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.