/    Sign up×
Community /Pin to ProfileBookmark

problem with click()

hi all,

this is my first post so please say it if i do it wrong. I have a little problem with the click() function. I made the function below and this works fine, but when i click at the link from page-item-38 i want to go to localhost/page-item-38. I think this has something to do with simclick, but i can’t solve it.

anybody has a suggestion how i can make this work?

jQuery(document).ready(function()
{
//When page loads…
jQuery(“.children”).hide(); //Hide all content

//On Click Event
jQuery(“li.page-item-38 a:first”).click(function() {

jQuery(“li.page-item-38”).addClass(“active”); //Add “active” class to selected tab
return false;
});

});

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @wildekiller 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 6.1,
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,
)...