Hi jscheuer1,
Again thank you for taking the time to help.
I have changed the code as you suggested but it is not changing the output.
Current example is here Link
I have used both
Code:
if(!$("#test1").hasClass('hidden'))
and
Code:
if(!$("#test1").hasClass('slide hidden'))
for both the ids but it doesnt seem to change anything. The first image is always displayed when the up button is pressed.
I have also tried
Code:
if($("#test1").not('hidden'))
as well I think I used that right but am not 100% sure).
Hopefully I have not typoed something...I have gone over it several times and have found no errors.
**edit** I have figured out what the problem is. I still do not have a solution. Basically the style for the elements is being written inline. When switching from Image 1 to Image 2 Image 1 gets the inline style
Code:
style="left: -720px; top: 0px; -webkit-transition: left 0.5s ease-in-out; display: none;"
and Image 2 gets the inline styles
Code:
style="left: 0px; top: 0px; -webkit-transition: left 0.5s ease-in-out; display: inline-block;"
Yet they keep their original classes. Is there a way to test whether an element with a given Id has a specific css attached? I have tried this but it did not work.
Code:
if(!$("#test1").hasClass('hidden')) {
document.getElementById("my_slider").innerHTML='<a href="#"><img id="after1" src="images/riverwalk.jpg"/></a>';
}
else if($("#test2").css('display')=='inline-block'){
document.getElementById("my_slider").innerHTML='<a href="#"><img id="after2" src="images/cropped-potluck-yarn-logo1.png"/></a>';
}
Any other ideas?
Bookmarks