Why jquery mobile that return from php, it doesn't work? -


test1.html

  <script>$(function(){ $.get(     "test1.php",{},function(result){     //$("#result").html(result);     $("#result").html(result); });});</script><div data-role="page" id="home"> <div data-role="header">     <h1>test</h1> </div>     <div data-role="content"> <div id="result"></div> </div>     

test1.php

<? echo "<a href='#' id='btn_del' data-role='button' data-inline='true' data-icon='delete'>del</a>"; ?>

it don't show button,but show hyperlink. how can do?

you need refresh jquery embedding button...

refresh() update form button in jquery mobile.

if manipulate form button via javascript, must call refresh method on update visual styling.

http://api.jquerymobile.com/button/#method-refresh


Comments

Popular posts from this blog

java - Cast from Object to List<String>: CastClassException -

How to set a border for android Imageview in Longpress? -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -