jquery - uniform, change style in another file -
i have site structure:
first page:
<script src="../jquery.uniform.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> $(function(){ $("input, textarea, select, button").uniform(); $("#show_image_error").load("adv_dell_img_err.html?id="+ math.random()); }); </script> <link rel="stylesheet" href="../css/uniform.default.css" type="text/css" media="screen"> </head> <body> in first page:<br/> <select> <option>through google</option> <option>through twitter</option> <option>other…</option> </select> <div id = "show_image_error">load file ...</div>
adv_dell_img_err.html file:
file 2 //get data db ... <select> <option>through google</option> <option>through twitter</option> <option>other…</option> </select>
why uniform in adv_dell_img_err.html no't work? how fix them?
thanks
try changing this:
$(function(){ $("input, textarea, select, button").uniform(); $("#show_image_error").load("adv_dell_img_err.html?id="+ math.random()); });
to this:
$(function(){ $("#show_image_error").load( "adv_dell_img_err.html?id="+ math.random(), function(responsetext, textstatus, xmlhttprequest) { $("input, textarea, select, button").uniform(); } ); });
i think problem when uniform executes content not yet loaded.
Comments
Post a Comment