Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #391777

    Hi!

    One question: I’d like to add a “display:none” into the “portfolio_preview_container” class in the ajax portfolio only when the portfolio item is in a certain category (in my case is ‘videos’).

    The point of all that is that I want to display the portfolio items with the ajax view. When the item contains images or galleries it works perfect, but when i add the video as a custom link and it pops up (which is correct), the ajax panel opens (in the background) and shows the title of the portfolio item (and here is where i want the “display:none”).

    I’ve been looking to the portfolio.php file and i almost got it, but i couldn’t manage to place the correct conditional tag. If i’m asking too much for your support limits just tell me and i’ll keep trying myself!

    Thank you!!

    Image and video hosting by TinyPic

    #392269

    Hey Rampau1!

    You would have to do this via javascript. Try adding this after line 1449 in /enfold/js/shortcodes.js.

    if ( jQuery(this).parent().parent().hasClass('video_sort') ) { jQuery('.portfolio_preview_container').addClass('hideme'); } else { jQuery('.portfolio_preview_container').removeClass('hideme'); }
    

    And then add this to your custom CSS.

    .hideme { display: none !important; }
    

    Regards,
    Elliott

    #392772

    Thanks!! That worked fine!
    Just had to replace “video-sort” for “post-format-video_sort”.

    Thank you very much!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Add conditional class to ajax portfolio items’ is closed to new replies.