javascript - Jquery mobile handler event button -


i new coding, please don't mad @ simple question, but, have button want change text header , content onclick. but, have no idea how it.

i have button in page this:

 <button id="mybutton" data-role="button"> 

and have function in java:

$("#mybutton").click(function()){  } 

so, if header div has id "myheader" , content id "mycontent", how can make callback function modify text?

if got html should this:

<div id="myheader"></div> <div id="mycontent"></div> <button id="mybutton" data-role="button"> 

'and have function in java:' not using java, javascript wich different java.

so script should this:

$("#mybutton").click(function()){      $('#myheader').html('hello world');     $('#mycontent').html('hey let me hello too!'); } 

hope helps!


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -