Page 1 of 1

How to find elements under html components ?

Posted: Mon Nov 18, 2013 6:31 am
by ishani modi

Hi,
I am using tag in html, but i dont know how to find that tag from html and display values in it runtime.


How to find elements under html components ?

Posted: Mon Nov 18, 2013 6:59 am
by Maryna Brodina

Hello! To do that use json methods http://api.jquery.com/category/traver...


How to find elements under html components ?

Posted: Mon Nov 18, 2013 7:28 am
by ishani modi

hi, can you provide me some syntax how to find if there is canvas element in html component


How to find elements under html components ?

Posted: Mon Nov 18, 2013 9:09 am
by Giannis Pelelis

Lets say you have an HTML line like that
code <div id="myDiv">Hello World<&#47;div> /code
which result is: Hello World

And now you want to change it to : Hello Europe

In a nutchel use this code : code$('#myDiv')&#46;text("Hello Europe");/code

Explanation
1)Select your div tag with myDiv id ,using jQuery
code$('#myDiv')/code
2)change text of the tag, usign jQuery.
code&#46;text("Hello Europe")/code

Now if you want that to happen when the user press a button you have to add an eventClickRun Javascript
Copy-Paste your code


How to find elements under html components ?

Posted: Mon Nov 18, 2013 9:12 am
by Maryna Brodina

preif (!Appery("htmlComponentName")&#46;find("canvas")&#46;length) {
&#47;&#47;there is no canvas in htmlComponentName
}/pre