/    Sign up×
Community /Pin to ProfileBookmark

: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”);[/CODE]

Page address:
[url]http://stylerecruitment.pinkape.com.au/?page_id=1703[/url]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@DanInMAAug 29.2012 — 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()
×

Success!

Help @Tjocksmurf spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...