- This topic is empty.
-
AuthorPosts
-
July 7, 2012 at 6:04 am #38811RonnieSoaresMember
I followed the tutorial by Chris Coyer to create the round out tabs from this site but it isn’t working. this is the code in the head of the html.
I dont have experience with java nor jquery but i researched this problem and found that removing the “preventdefault” fixes the link but than the tabs wont work.
Its a project for my class and I really need help on this one. i’m very tired and frustrated with this.
is there is a way i can send the entire project so someone can really help me work that out. (2Mb file).
thanks very much!
i also tryed this method, it seemed like it would work but didn’t
$(function() {
$("li").click(function() {
$(this).addClass('active').siblings().removeClass('active');
});
});July 7, 2012 at 1:35 pm #105620RonnieSoaresMemberi had to upload separate files but here’s a link to all the files.
thank you very much in advance!July 15, 2012 at 10:01 am #106142RonnieSoaresMemberanyone???? really could use some help here
July 15, 2012 at 5:25 pm #106156TheDocMemberI’m not going to download anything, but it looks like you’re targeting too many
in your function. Try being more specific like
$("#tabs li")
.July 15, 2012 at 5:44 pm #106158SenffParticipantI’m not really sure why you put a preventDefault on an LI in the first place — the default action of clicking on an LI is nothing, so there’s nothing to prevent.
If there is an anchor/link in your LI that you’re clicking on, that would make more sense to me, so maybe you should target that, and put the function (and preventDefault) on the
$('li a')
.Regardless, using your code in a fiddle seems to work: http://jsfiddle.net/senff/Ly5C5/1/ so there’s probably something else going on there.
July 15, 2012 at 8:05 pm #106165RonnieSoaresMemberhttps://css-tricks.com/better-tabs-with-round-out-borders/
like i said, I simply followed the instructions from this tutorial.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.