Live View: https://tornhq.com/WorkingOn/InteractiveMap/Replaced-With-Divs.html
JQuery Code to Slide & Tab Switcher
$(function () {
$("#tab-3").toggle(function () {
$('#Map-Selection-Info').animate({marginLeft: '978px'}, 1000);
$('#ATWI80C-Map').animate({width: '900px' }, 1000);
}, function () {
$('#Map-Selection-Info').animate({marginLeft:'670px'}, 1000);
$('#ATWI80C-Map').animate({width: '600px' }, 1000);
});
$('#tab-content div').hide();
$('#tab-content div.tab-content').last().fadeIn().find('*').show();
$('#Info-Side-Tabs li').click(function() {
$('#Info-Side-Tabs li').removeClass("current");
$(this).addClass("current");
$('#tab-content div').hide();
var href = $(this).find('a').attr("href");
$('#tab-content div' + href).fadeIn().find('*').show();
});
});
Li of the Show/Hide
<li rel="redeye16.png" id="tab-3"> <a href="#">Hide This</a> </li>
I would like that when you click to hide the side container, the image rel changes to another image (none of the iamge have been made yet) and for the name of 'Hide This' to become 'Show This'. I would also like the JQuery Tab Switcher I have to not show an empty contain, instead to do the same as what it does, changing the class to current, however keeping the content of the tab you were on, and then if you decide to reopen the current switches back.
Thank you for any time spend in answering my questions.
Best Regards,
Tim
Edit:
$(function () {
$("#tab-3").toggle(function () {
$('#Map-Selection-Info').animate({marginLeft: '978px'}, 1000);
$('#ATWI80C-Map').animate({width: '900px' }, 1000);
$(this).find('a').text('Open Me');
// Problem is Below
$(this).css("background-image","url(http://www.theaa.com/images/insurance/tick-trans.gif) no-repet");
}, function () {
$('#Map-Selection-Info').animate({marginLeft:'670px'}, 1000);
$('#ATWI80C-Map').animate({width: '600px' }, 1000);
$(this).find('a').text('Close Me');
// Problem is Below
$(this).css("background-image","url(http://www.ecvet-projects.eu/Admin/images/icons/Red_X.gif) no-repet");
});
$('#tab-content div').hide();
$('#tab-content div.tab-content').last().fadeIn().find('*').show();
$('#Info-Side-Tabs li').click(function() {
$('#Info-Side-Tabs li').removeClass("current");
$(this).addClass("current");
$('#tab-content div').hide();
var href = $(this).find('a').attr("href");
$('#tab-content div' + href).fadeIn().find('*').show();
});
});
Edit:
The Li CSS:
.tab-list li a {
display: block;
float: left;
line-height: 25px;
padding-left: 30px;
font-family: sans-serif;
font-size: 13px;
background-image: url(http://www.ecvet-projects.eu/Admin/images/icons/Red_X.gif);
background-repeat: no-repeat;
background-position: 12px center;
color: #444;
text-decoration: none;
}