shaunno2007 Posted May 16, 2009 Share Posted May 16, 2009 Okay fine in FF but I.E don't work I really do hate I.E :/ Anyway just seeing if you can help me here is the code: Code: $("#accessmenu_close_hide").click(function(){ if(document.getElementById("accessmenu_close_hide_link").innerHTML == '<img src="images/lock_48.png" width="20" border="0" height="20">') { $("#accessmenu_close_hide").animate({ marginRight: "10px" }, 0400 ); $("#accessmenu_close_hide_link").html('<img src="images/lock_open_48.png" width="20" height="20" border="0" />'); $("#accessmenu").fadeIn("normal"); }else{ $("#accessmenu_close_hide").animate({ marginRight: "-2px" }, 0400 ); $("#accessmenu_close_hide_link").html('<img src="images/lock_48.png" width="20" height="20" border="0" />'); $("#accessmenu").fadeOut("normal") }; }); Thank you Shaun Link to comment https://forums.phpfreaks.com/topic/158391-ie-problem-who-would-have-guessed-it/ Share on other sites More sharing options...
Ken2k7 Posted May 16, 2009 Share Posted May 16, 2009 That is a pretty bad way to do something. The image never change. Why do that? I believe IE tags are in Caps. Though I would highly recommend you to take a new approach. Link to comment https://forums.phpfreaks.com/topic/158391-ie-problem-who-would-have-guessed-it/#findComment-835431 Share on other sites More sharing options...
shaunno2007 Posted May 16, 2009 Author Share Posted May 16, 2009 hmm okay.. what would be the best way to do this then cos am stuck lol.. thanks Link to comment https://forums.phpfreaks.com/topic/158391-ie-problem-who-would-have-guessed-it/#findComment-835453 Share on other sites More sharing options...
Ken2k7 Posted May 16, 2009 Share Posted May 16, 2009 *Ken2k7 shrugs Please describe what you are trying to do. Link to comment https://forums.phpfreaks.com/topic/158391-ie-problem-who-would-have-guessed-it/#findComment-835459 Share on other sites More sharing options...
shaunno2007 Posted May 17, 2009 Author Share Posted May 17, 2009 If the div "#accessmenu_close_hide" is clicked then i want it to do the if statement so then when it is clicked it will check if the html in the "#accessmenu_close_hide" div is "<img src="images/lock_48.png" width="20" border="0" height="20">" if it is then i want it to do the if statement if not then i want it the else statement do you no what i mean? thanks Shaun Link to comment https://forums.phpfreaks.com/topic/158391-ie-problem-who-would-have-guessed-it/#findComment-835798 Share on other sites More sharing options...
shaunno2007 Posted May 18, 2009 Author Share Posted May 18, 2009 ??? ??? ??? Link to comment https://forums.phpfreaks.com/topic/158391-ie-problem-who-would-have-guessed-it/#findComment-836382 Share on other sites More sharing options...
Darghon Posted May 18, 2009 Share Posted May 18, 2009 not sure if this is the cleanest solution, but it should to the trick all you have to do is give the id accessmenu_close_hide_image to your image that you want to change $("#accessmenu_close_hide").onclick = function(){ if($("accessmenu_close_hide_image").src == "images/lock_48.png"){ $("#accessmenu_close_hide").animate({ marginRight: "10px" }, 0400 ); $("accessmenu_close_hide_image").src == "images/lock_open_48.png"; $("#accessmenu").fadeIn("normal"); } else{ $("#accessmenu_close_hide").animate({ marginRight: "-2px" }, 0400 ); $("#accessmenu_close_hide_image").src = "images/lock_48.png"; $("#accessmenu").fadeOut("normal") } } Link to comment https://forums.phpfreaks.com/topic/158391-ie-problem-who-would-have-guessed-it/#findComment-836390 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.