- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
this is my first attempt with Intel XDK and I hope anyone can help me!
I have placed a graphic_button and by clicking on, I want to change the "img src" of the button.
Here is my code:
<a class="uib-graphic-button default-graphic-sizing default-image-sizing hover-graphic-button active-graphic-button default-graphic-button default-graphic-text widget uib_w_11 d-margins media-button-text-bottom" data-uib="media/graphic_button" data-ver="0"
id="test">
<img src="images/Arrow.png">
<span class="uib-caption">Button</span>
</a><span class="uib_shim"></span>
The trigger of this graphic button has an action with the following custom script:
/* graphic button #test */
$(document).on("click", "#test", function(evt)
{
/* your code goes here */
document.getElementById(test).src="../images/X.png";
});
}
But this code has no effect! Can anyone help me, please.
Thanks in advance!
Regards
Andre
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend doing the following:
$(document).on("click", "#test", function() { $("#test img").attr("src","../images/X.png"); }); }
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend doing the following:
$(document).on("click", "#test", function() { $("#test img").attr("src","../images/X.png"); }); }
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page