Javascript refinements for tabs

svn: r19718
This commit is contained in:
Doug Blank 2012-05-30 23:33:44 +00:00
parent 1bd9848b1a
commit 33f168ed6e
12 changed files with 24 additions and 119 deletions

View File

@ -5,28 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
$('#general-tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#general-tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
$('.wysiwyg').htmlarea({
toolbar: [

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>

View File

@ -5,17 +5,10 @@
<script type="text/javascript">
$(function(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
document.location.hash = ui.panel.id;
}
});
});
</script>