Simple javascript document.write isn't working...
- by Jascination
Here's the code in question
I'm trying to create a simple application - each of the three men has a rel="x" attribute attached them. I'm using var regionId = $('img.selected-region').attr('rel'); to make the rel of the currently selected item the value of reginId.
I want to test this out by performing a simple document.write(regionId) command in a div under the pictures of the men. However, it's not working. Have I put the var regionId definition in the right place in the script window?
I'm completely new to javascript so the syntax is confusing to me - and help would be greatly appreciated.