Comments on: Create a smooth tabbed menu in jQuery http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/ Daily free tutorials about web design, coding, jquery and more Sat, 20 Oct 2012 08:55:27 +0000 hourly 1 http://wordpress.org/?v= By: Arpad Bajzath http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-15649 Arpad Bajzath Tue, 06 Sep 2011 13:23:35 +0000 http://yensdesign.com/?p=22#comment-15649 Here is, my shorter version of this. $(document).ready(function(){ var last_target_id = "first"; $(".tabs > li").click(function(e){ $("#" + last_target_id).removeClass("active"); $("div." + last_target_id ).css("display", "none"); $("#" + e.target.id).addClass("active"); $("div." + e.target.id).fadeIn(); last_target_id = e.target.id; return null; }); }); The css and html is same Here is, my shorter version of this.

$(document).ready(function(){

var last_target_id = “first”;

$(“.tabs > li”).click(function(e){

$(“#” + last_target_id).removeClass(“active”);
$(“div.” + last_target_id ).css(“display”, “none”);

$(“#” + e.target.id).addClass(“active”);
$(“div.” + e.target.id).fadeIn();

last_target_id = e.target.id;
return null;
});
});

The css and html is same

]]>
By: Sitenizi üst seviyeye çıkarmak için 10 jQuery Scripti | AESözlük http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-15584 Sitenizi üst seviyeye çıkarmak için 10 jQuery Scripti | AESözlük Sun, 14 Aug 2011 10:58:18 +0000 http://yensdesign.com/?p=22#comment-15584 [...] Smooth Tabbed Menu [...] [...] Smooth Tabbed Menu [...]

]]>
By: Mike Gjerding http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-15580 Mike Gjerding Fri, 12 Aug 2011 21:41:15 +0000 http://yensdesign.com/?p=22#comment-15580 to fix the issue of the scroll bar not being displayed in ie;, open up the style sheet and change: body{ background: #fff; line-height:14px; font-size: 12px; font-family: Arial, Verdana, Helvetica, sans-serif; margin:0pt; cursor:default; overflow: hidden; } to body{ background: #fff; line-height:14px; font-size: 12px; font-family: Arial, Verdana, Helvetica, sans-serif; margin:0pt; cursor:default; } (just remove the overflow: hidden;) to fix the issue of the scroll bar not being displayed in ie;, open up the style sheet and change:
body{
background: #fff;
line-height:14px;
font-size: 12px;
font-family: Arial, Verdana, Helvetica, sans-serif;
margin:0pt;
cursor:default;
overflow: hidden;
}
to
body{
background: #fff;
line-height:14px;
font-size: 12px;
font-family: Arial, Verdana, Helvetica, sans-serif;
margin:0pt;
cursor:default;

}

(just remove the overflow: hidden;)

]]>
By: sanjaya http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-15493 sanjaya Wed, 10 Aug 2011 10:01:47 +0000 http://yensdesign.com/?p=22#comment-15493 Nice tutorial, I was just looking for a tute that does not use UI library for something which can be simply done. It is not simple, but it is simpler when compared to. :) Nice tutorial, I was just looking for a tute that does not use UI library for something which can be simply done. It is not simple, but it is simpler when compared to. :)

]]>
By: Sukru G. http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-15331 Sukru G. Sat, 06 Aug 2011 14:12:25 +0000 http://yensdesign.com/?p=22#comment-15331 The information you provide very good congratulations. Great... The information you provide very good congratulations. Great…

]]>
By: 30款有用的jQuery tabs插件 » yybean.com Java编程 Web开发 Ajax技术 Spring框架 Struts2框架 Hibernate技术 在线文档 http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-15205 30款有用的jQuery tabs插件 » yybean.com Java编程 Web开发 Ajax技术 Spring框架 Struts2框架 Hibernate技术 在线文档 Wed, 03 Aug 2011 15:29:59 +0000 http://yensdesign.com/?p=22#comment-15205 [...] 4. Create a smooth tabbed menu in jQuery [...] [...] 4. Create a smooth tabbed menu in jQuery [...]

]]>
By: Tabs with JQuery « Roboto Tech http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-14699 Tabs with JQuery « Roboto Tech Tue, 19 Jul 2011 03:29:06 +0000 http://yensdesign.com/?p=22#comment-14699 [...] by a jquery tabs design that I came across with here I decided to modify it. I changed two things, one is the jquery script and the other the tab [...] [...] by a jquery tabs design that I came across with here I decided to modify it. I changed two things, one is the jquery script and the other the tab [...]

]]>
By: Alia Ritchmond http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-14649 Alia Ritchmond Sun, 17 Jul 2011 18:36:32 +0000 http://yensdesign.com/?p=22#comment-14649 Thanks for this tutorial.. How about I change the tab content to image? I changed but it was not clickable.. It only can click on the edge(the li only) May u help me to overcome this problem? Thank you. Thanks for this tutorial..

How about I change the tab content to image?
I changed but it was not clickable..
It only can click on the edge(the li only)

May u help me to overcome this problem?
Thank you.

]]>
By: Vincent http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-14591 Vincent Fri, 15 Jul 2011 17:14:47 +0000 http://yensdesign.com/?p=22#comment-14591 This tutorial is great, however you need classes to specify tabs. THIS IS NOT DYNAMIC!!! I WANT DYNAMIC STUFF so here we go: HTML: ------------------------------- tab1 tab2 tab3 test 1 test 2 test 3 ------------------------------- CSS: ------------------------------- #tabs { display: block; border: 0; padding: 0; width: 80%; } #tabs ul#tabsnav, #tabs ul#tabscontent { display: block; margin: 0; padding: 0; list-style-type: none; } #tabs ul#tabsnav { height: 25px; } #tabs ul#tabscontent { border: 1px solid #d0ccc9; } #tabs ul#tabsnav li { display: block; position: relative; float: left; padding: 3px 5px 3px 5px; margin: 4px 2px -1px 4px; font-size: 12px; line-height: 14px; height: 14px; background-color: #efefef; border: 1px solid #d0ccc9; color: #898989; cursor: pointer; } #tabs ul#tabsnav li.active { padding: 8px 5px 3px 5px; margin: 0 2px -1px 4px; background-color: #ffffff; color: #5f95ef; border-bottom: none; } #tabs ul#tabscontent li { display: none; margin: 0; padding: 4px 8px 12px 8px; } #tabs ul#tabscontent li.active { display: block; } ------------------------------- JAVASCRIPT: ------------------------------- $(document).ready(function() { $("#tabs ul#tabsnav > li").each(function(index) { $(this).click(function() { $("#tabs ul#tabsnav > li").each(function(index2) { if (index == index2) { // you clicked this tab $(this).addClass("active"); } else { $(this).removeClass("active"); } }); $("#tabs ul#tabscontent > li").each(function(index2) { if (index == index2) { $(this).fadeIn(400); } else { $(this).hide(); } }); }); }); }); ------------------------------- This js code defines a click function for every tab, then iterates each tab again inside the click function to set active classes. then does the same with content. This tutorial is great, however you need classes to specify tabs. THIS IS NOT DYNAMIC!!!

I WANT DYNAMIC STUFF so here we go:

HTML:
——————————-

tab1
tab2
tab3

test 1

test 2

test 3

——————————-

CSS:
——————————-
#tabs {
display: block;
border: 0;
padding: 0;
width: 80%;
}

#tabs ul#tabsnav, #tabs ul#tabscontent {
display: block;
margin: 0;
padding: 0;
list-style-type: none;
}

#tabs ul#tabsnav {
height: 25px;
}

#tabs ul#tabscontent {
border: 1px solid #d0ccc9;
}

#tabs ul#tabsnav li {
display: block;
position: relative;
float: left;
padding: 3px 5px 3px 5px;
margin: 4px 2px -1px 4px;
font-size: 12px;
line-height: 14px;
height: 14px;
background-color: #efefef;
border: 1px solid #d0ccc9;
color: #898989;
cursor: pointer;
}

#tabs ul#tabsnav li.active {
padding: 8px 5px 3px 5px;
margin: 0 2px -1px 4px;
background-color: #ffffff;
color: #5f95ef;
border-bottom: none;
}

#tabs ul#tabscontent li {
display: none;
margin: 0;
padding: 4px 8px 12px 8px;
}

#tabs ul#tabscontent li.active {
display: block;
}
——————————-

JAVASCRIPT:
——————————-
$(document).ready(function() {
$(“#tabs ul#tabsnav > li”).each(function(index) {
$(this).click(function() {
$(“#tabs ul#tabsnav > li”).each(function(index2) {
if (index == index2) {
// you clicked this tab
$(this).addClass(“active”);
} else {
$(this).removeClass(“active”);
}
});
$(“#tabs ul#tabscontent > li”).each(function(index2) {
if (index == index2) {
$(this).fadeIn(400);
} else {
$(this).hide();
}
});
});
});
});
——————————-

This js code defines a click function for every tab, then iterates each tab again inside the click function to set active classes. then does the same with content.

]]>
By: hari http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/#comment-14528 hari Wed, 13 Jul 2011 10:15:56 +0000 http://yensdesign.com/?p=22#comment-14528 any help me i have tried to add more news tabs on your code.but there occurs a problem, when page load all the content of the tabs listed below .I need help :( any help me
i have tried to add more news tabs on your code.but there occurs a problem, when page load all the content of the tabs listed below .I need help :(

]]>