Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Target the child elements of a parent div

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #144903
    ajnoguerra
    Participant

    Hi I want to target the children of a parent div which has a class name ‘products’. I want to be able to write it in a conditional statement because I will be declaring some more options from it. Please see my code here

    $(function() {
         var child = $('#featured').children();
    
         if($('child')).hasClass('products'){
             $(this).hide();
         }
     });
    

    I also tried this one but no good.

    $('#featured').children('.products').hide();

    #144911
    ajnoguerra
    Participant

    That’s nice. A different kind of approach. Its working ;)
    But my problem now is I can’t get it to work with orbit (image slider) and I even tried jquery infinite carousel but does the same. I tried giving the children class names which I target to hide but the slider plugin still counts them in. http://zurb.com/playground/jquery_image_slider_plugin

    any idea on this?

    #144921
    ajnoguerra
    Participant

    Orbit 1.2.3

    I guess I’ll just go look for a less complicated slider or maybe make my own, I’ll just see some tutorials :)
    Badly need the option to hide some element for this as I will be doing some conditional statement with it.

    Thanks for the help @traq :)

    #144940
    meisp123
    Participant

    If there is a team in the Superleague called “phenomenon” is concerned, Dalian has never changed its name, team logo never changes, always champions remain competitive. Despite six years of useless, but the team won seven championships world cup shirts http://www.soccerjerseysshirts.com/
    and Super League session that sent the nickname “Eight Star Dalian.” Shirt with beautiful color, the main color blue shoulders and sleeves are white. Dalian is not all-sleeved white and blue with the tradition, but I feel good. Guests sweater white with blue stripes shoulder

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.