开发者

Getting started jqueryUI

I am just trying to get the most basic thing going here and am being completely stopped. I am trying to follow the examples but for some reason even getting a basic example working is thwarting me. Here I am just trying to get the JQueryUI select menu to work. The demo page for this works fine for me but when I try to use my own page it does nothing (no error either).

<!DOCTYPE html> 
<html> 
    <head> 
    <meta http-equiv="content-type" content="text/html; charset=utf-8"开发者_StackOverflow社区 /> 
    <title>Demo Page for jQuery UI selectmenu</title>

    <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/start/jquery-ui.css" rel="Stylesheet" /> 
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>

    <script type="text/javascript"> 
        $(function(){

            $('#testselect').selectmenu({style:'dropdown'});
        });
    </script> 
</head> 
<body> 
    <select id="testselect"> 
        <option value="test1">Op 1</option> 
        <option value="test2">Op 2</option> 
        <option value="test3">Op 3</option> 
    </select> 
</body> 
</html>

It looks like I am getting a "object doesn't support this method" error on the selectmenu line but I don't know why this would not be available since based on the demos it seems like this should work given the script links are there and pointing to a valid location.


It's not $('#testselect').selectmenu(); but $('#testselect').selectable();, see documentation (if you're talking about that).

Update:

The SelectMenu widget, as stated in the documentation page you linked, it's still under development. It doesn't exists yet, so you can't use it (or you can try to merge it into current jQueryUI at your own risk).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜