Toggle DIV and SPAN text onclick
        Posted  
        
            by 
                philipryoung
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by philipryoung
        
        
        
        Published on 2012-07-10T15:13:15Z
        Indexed on 
            2012/07/10
            15:15 UTC
        
        
        Read the original article
        Hit count: 252
        
I have been trying to mimic this website http://www.designrattan.co.uk/daybed/apple for a while now.
I need to make a page where the customer can click "View 360" and then it changes the DIV to show the product 360 (for which I already have the code for).
I also need to make it so that when it is clicked the span text then changes to "Back to Image"
I have tried many times and have failed to get the Javascript code and HTML to work well together. My efforts can be seen here: http://designliving.tk/winchester-rattan-garden-round-table-set
As you can see it is a complete fail as it doesn't change the DIV it just displays a new one. Also when you click the button it then changes to text instead of a new button.
If anyone can help me here I would be massively appreciative and if I need to pay you for your efforts then please contact me on [email protected]
© Stack Overflow or respective owner