开发者

jquery mobile autocomplete - only works before links clicked

I have been struggling with this all day: I am using jquery, jquery ui, and jquery mobile. I am creating a simple autocomplete input field. It works when I first load http://localhost/m/ , but when I click around and navigate back to the page with the 开发者_StackOverflowautocomplete, it doesn't work anymore. That page is http://localhost/m/#/m/index.php. Also, when I start with localhost/m/#/m/index.php, autocomplete does not work. The following code is in my .

$('div').live('pagebeforeshow',function(event){
var availableTags = [
                "ActionScript",
                "AppleScript",
            "Asp",
            "BASIC",
            "C",
            "C++",
            "Clojure",
            "COBOL",
            "ColdFusion",
            "Erlang",
            "Fortran",
            "Groovy",
            "Haskell",
            "Java",
            "JavaScript",
            "Scheme"
        ];
$( "#tags" ).die();
$( "#tags" ).autocomplete({
    source: availableTags
    });
});

Does anyone have any idea what is going on here? Much appreciated!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜