Flip image horizontally with selectmenu.
# March 24, 2013 at 3:23 am
My css rule to flip an image when selecting a certain opition works fine in IE and Firefox. But it doesn’t work in Chrome !?
[See testpage ](http://www.stickers.be/X_Tests/Flip_Image/Flip_Image_Horizontal.asp) : image must flip when selecting “ja, spiegelbeeld”.# March 24, 2013 at 5:32 am
Ok, thanks … works in FF & Chrome, but this time not in IE !?
I editted your code a bit (for so much as I can) and now it seems to work in the 3 browsers. I hope this code is like it should !?
[See this testpage.](http://www.stickers.be/X_Tests/Flip_Image/CSS_Tips.asp)# March 24, 2013 at 6:52 am
@Yammaski, ohh yeah, for sure. If you only want to target that one image just give it an ID and when you target it with the jQuery just use that id as the selector rather then
$('img'). I will update that pen to show you exactly what i mean.
Would you like me to comment the jQuery so you understand exactly what is going on? There is literally too many ways to accomplish this, that was just the first that popped into my head.# March 24, 2013 at 7:11 am
I understand it, but I can’t write it … thanks anyway. ;-)
Now another point … sorry … but I need already the “img id” for another script (to change background color).
Can the code be applied to a div ?
I tried to change “.toggleClass” to “.toggleDiv”, but it seems that it isn’t so easy !?# March 24, 2013 at 7:15 am
Well, you can change the color of the div by adding a class or by using the css method in jQuery
I guess it would be easier trying to understand the overall scope of what you need to do because there could probably be an easier, and less complex way to do this all that the same time rather in little chunks.# March 24, 2013 at 8:51 am
[Here you can see a rough testpage](http://www.stickers.be/X_Tests/Detail_CSS/DetailData_CSS_BackColor.asp)
You must be logged in to reply to this topic.