The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How to make an image change on click

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #31580

    Hello all,

    I dont know javascript so I download all the dynamic content for my sites.

    On my own website I have a list of services and I got some code so that when the user clicks one of the services more information appears. I have a little plus sign beside each service and I want it to turn into a minus sign that I have as an image. How can I do this ?

    Heres a link to the page.

    Thanks alot,


    Have a look at this – You could probably manipulate it to get the effect you would like:


    jamy_za, I already have something similar to this. Click the link I gave. I want something to make the plus image change when clicked. Note that I only have the “Websites in XHTML and HTML5” set up to do this.


    @michaeloneill the link you gave doesn’t load. I get this error: Content Encoding Error


    jamy_za – The link should work fine now :)


    You can use jquery and change the src attribute:

    $('#plus-symbol-button).click(function() {
    $(this).attr('src', 'images/minus-symbol.png');

    Something like that should work.


    @johnnyb I have put that code onto the page making the necessary changes… However it still wont work! :L Check out the link



    I think you may need to include the switch within your showslidingdiv function.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.