ting
ting

Reputation: 1

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 It just show hyperlink. How can I do?

Upvotes: 0

Views: 70

Answers (1)

SaurabhLP
SaurabhLP

Reputation: 3655

You need to refresh the jquery embedding into your button...

refresh() update the form button in jquery mobile.

If you manipulate a form button via JavaScript, you must call the refresh method on it to update the visual styling.

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

Upvotes: 1

Related Questions