Changing Image layers dynamically using Javascript MobiOne Archive > Getting Help – General This topic has 5 replies, 2 voices, and was last updated 11 years, 8 months ago by Brandon. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts April 12, 2013 at 8:43 am #337942 Reply davidgMember Hi, How can I change the layers of images (or anything else) using javascript? example: Image1 is in front of image2 on screen load, but when user presses button and loads javascript changeimagelayer() it bring image 2 the front. Thanks, April 12, 2013 at 9:27 am #337944 Reply BrandonMember Try changing the z-index of the css of the image. April 12, 2013 at 9:32 am #337945 Reply davidgMember Thanks for the reply, Im not sure I know how to do that. How do I change css values from the javascript code? $(‘#m1-test-image1’).attr??????? April 12, 2013 at 9:43 am #337947 Reply BrandonMember Try something like this -untested code: $(‘#m1-test-image1’).css(‘z-index’,’-1′); April 12, 2013 at 2:49 pm #337970 Reply davidgMember Wow thanks so much CincyPlanet that worked perfectly!!! April 12, 2013 at 3:14 pm #337971 Reply BrandonMember You’re welcome. Author Posts Viewing 6 posts - 1 through 6 (of 6 total) Reply To: Changing Image layers dynamically using Javascript You must be logged in to post in the forum log in