www.webdeveloper.com
Results 1 to 2 of 2

Thread: :first argument not working

  1. #1
    Join Date
    Aug 2012
    Posts
    1

    :first argument not working

    I want to modify the first object with a certain id(it's a wordpress template so I cannot assign unique id's)

    In this case I wanna show the first one and keep the rest hidden, any ideas?

    I have tried all the alternatives below without luck
    Code:
    $("html.cufon-active body.page div#inner-header-bg div#container div#content div.two-third div.toggle_container2:first").show();
    $("div.toggle_container2 round5:first").att("display","block");
    $("div.toggle_container2 round5:first").toggle();
    $("#togcont:first").att("display","block");
    Page address:
    http://stylerecruitment.pinkape.com.au/?page_id=1703

  2. #2
    Join Date
    Apr 2010
    Location
    Salem,Ma
    Posts
    623
    in $("div.toggle_container2 round5:first")

    what is round5? it probably need to be $("div.toggle_container2 .round5:first") , assuming round5 is a class
    - also .att("display","block") should be .attr("display","block") and there is already a method to accomplish the same thing - .show()

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles