facebook

Changing Image layers dynamically using Javascript

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #337942 Reply

    davidg
    Member

    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,

    #337944 Reply

    Brandon
    Member

    Try changing the z-index of the css of the image.

    #337945 Reply

    davidg
    Member

    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???????

    #337947 Reply

    Brandon
    Member

    Try something like this -untested code:
    $(‘#m1-test-image1’).css(‘z-index’,’-1′);

    #337970 Reply

    davidg
    Member

    Wow thanks so much CincyPlanet that worked perfectly!!!

    #337971 Reply

    Brandon
    Member

    You’re welcome.

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