jquery - javascript to call new HTMLpage -


i have problem calling html page via javascript. might simple, learning.hope can help.

<label value="login" id="lbl1" ontouchstart="mousedown1()" ontouchend="mouseup1()">login</label> 

javascript

function mouseup1() {     var styles = {         "background": "url(img/b_long_off.png)",         "background-size": "100% 100%",         "height": "36px",         "width": "93%",         "position": "absolute",         "text-align": "center",         "padding-top": "18px",         "left": "3.5%",         "top": "208px",             "font-family": "arial, helvetica, sans-serif",         "font-size": "16px",         "color": "white"     };     $("#lbl1").css(styles); $.mobile.changepage("register.html"); }  

i calling label id when mouse up. page gets loaded, styles not applied. using jquery , jquery mobile phonegap. didn't use of methods provided jquery/phonegap,like, mobileinit or onready or etc..

i found when using jquery mobile if declare css/js outside of <div data-role="page"> node won't load new styles or scripts. because of way jquery mobile loads new content. asynchronously within <div data-role="page"> element.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -