Forum posts for ps2.exe

Sliding multiple divs left to right with jquery toggle

I am trying to toggle multiple divs left to right when A link is clicked.

Within each div is a slideshow and some content. So far I can toggle between my links but when I get to the second div my content should appear but it doesnt. I have a display:none set in my css because when the page loads I only want the first item to be displayed and then when the user clicks on any other links the content for that section will appear.

My HTML:

<div id='span2'>
<div id='product-links' data-target='.ps1'>
<a href=''>ps1</a>
</div>
</div>
<div id='span2'>
<div id='product-links' data-target='.ps2'>
<a href=''>ps2</a>
</div>
</div>
<div id='span2'>
<div id='product-links' data-target='.ps3'>
<a href=''>ts1</a>
</div>
</div>


HTML for divs that toggle:

<div id='container'>
<div id='row toggle-prod ps1'>
<div id='span7'>
<div id='royalSlider-ps1'>
<img id='rsImg' src='' />
<img id='rsImg' src='' />
<img id='rsImg' src='' />
<img id='rsImg' src='' />
</div>
</div>
<div id='span5'>
<p>Item 1</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
</div>

<div id='container'>
<div id='row toggle-prod ps2'>
<div id='span7'>
<div id='royalSlider-ps2'>
<img id='rsImg' src='' />
</div>
</div>
<div id='span5'>
<p>item2</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt</p>
</div>
</div>
</div>


The javascript:

$(document).ready(function() {

$('.product-links a').click(function(){
var divToToggle2 = $( $(this).data('target') );
$('.toggle-prod:visible').not(divToToggle2).hide();
divToToggle2.fadeToggle('fast', 'linear');
return false;
});


});

View complete forum thread with replies

Other posts related to ps2.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

MySQL query SELECT GREATEST int row VALUE beetween limits
netty open 2 port server &amp; 1 port client
Sliding multiple divs left to right with jquery toggle
Timed autosave with Batch
Return a value from PHP to HTML
Related object not saved
Attempting to enter values to database tables using jdbc transaction

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.