hi, i have a jquery problem...
this script is not working with jquery-1.4.2.min, but it works with jquery-1.2.6.min.js, can anyone help me???the script is the above:
(it is not working the tab actions, the slideout works...)
http://www.benjaminsterling.com/wp-c...es/sidetab.htm
the javascript code is the above:
PHP Code:
var jqsideTabs;
var tabs, h = 50, r = 0,ra = 0;
$(document)
.ready(function(){
jqsideTabs = $('#sideTabs').addClass('closed');
tabs = jqsideTabs
.find('.tab h3')
.clone()
.appendTo(jqsideTabs)
.each(function(i){
var that = $(this), cls = '',ow,newThis, newEl;
if( i == 0 ) cls = ' active';
newEl = $('<a href="#" class="tabLinks'+cls+'">' + that.text() + '</a>');
that.replaceWith(newEl);
ow = newEl.outerWidth();
if( i == 0 ) ra = ow;
else r = ow;
h = newEl.css({'top':h , 'right': -ow }).height() + h;
newThis = newEl.get(0);
newThis.jq = newEl;
newThis.i = i;
newEl.click(function(){
var el = this.jq;
if( jqsideTabs.hasClass( 'closed' ) ){
jqsideTabs.removeClass('closed');
}
else if( !jqsideTabs.hasClass( 'closed' ) && el.hasClass('active') ){
jqsideTabs.addClass('closed');
}
el
.siblings()
.removeClass('active')
.css({'right': -r })
.end()
.addClass('active')
.css({'right': -ra });
tabs.eq( this.i ).show().siblings('.tab').hide();
return false;
});
})
.end()
.parent()
.eq(0)
.addClass('active')
.end()
.filter(':not(:eq(0))')
.hide()
.end();
jqsideTabs.bind("mouseleave",function(){
jqsideTabs
.animate({left:-310}, 'fast', function(){
jqsideTabs.addClass('closed').removeAttr('style');
});
});
});
and the html file is:
HTML Code:
<div id="sideTabs">
<div class="tab">
<h3>Tab 1</h3>
<div class="gut">
<p>Some text</p>
</div>
</div>
<div class="tab">
<h3>Tab 2</h3>
<div class="gut">
<ul>
<li>link</li>
</ul>
</div>
</div>
<div class="tab">
<h3>Tab 3</h3>
<div class="gut">
<ul>
<li>link</li>
</ul>
</div>
</div>
</div>
the problem is that the tab button works, but the content doesnt change...in all of tabs showing the same text(showing all tbas content)....
can anyone help...please.....
Bookmarks