STYLE SWITCHER

Add class on right side element of a div using jquery.

jQuery Interview Questions and Answers  
$('.testimonial-base').find('div.testimonial-items').each(function() {
     if (($(this).position().left) > 0) {
        $(this).addClass('item-right');
     }
});

Recent Article

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Keep your skills sharp, get informed.

    Subscribe to our mailing list and get interesting stuff and updates to your email inbox