Blog

« Back

jQuery simple tabs

Author: Milen Hristov
Created on: 13.04.2013 20:49

Creating simple tabs with jQuery

$(function () {
                        var tabContainers = $('div.tabs > div');
                        tabContainers.hide().filter(':first').show();
                        $('div.tabs ul.nav a').click(function () {
                                tabContainers.hide();
                                tabContainers.filter(this.hash).show();
                                $('div.tabs ul.nav li').removeClass('selected');
                                $(this).parent().addClass('selected');
                                return false;
                        }).filter(':first').click();
                });




No comments

Comments

Name

E-mail

Comment

Enter the text from the image

Blog tags