如何在jquery函数中调用jquery函数

时间:2013-07-04 03:47:48

标签: javascript jquery

嘿大家我有3个单选按钮(公共汽车,空中,船)和3个jquery功能(公共汽车,空中,船)绑定我的1个下拉/组合框。现在我的问题如何为总线调用jquery函数如果我单击总线的单选按钮..我的数据绑定类$(".orig_bus")$(".orig_air")$(".orig_boat"),我写了3个不同的函数,如果我选择单选按钮submit_buttonAir - 它呼叫$(".orig_air")我的html div应该是(div class='orig_air'

    ############### Bus Radio Button#################
    $(document).ready(function(){
      $('#submit_buttonBus').click(function() {
         if ($('input[name=bus]')[0].checked == true)
         {
               alert('Travel By Bus Ride!');
               bus_z = true; 
               plane_z = false; 
               boat_z = false; 
               $('input[name="plane"]')[0].checked = false;
               $('input[name="boat"]')[0].checked = false;
        }
     });
    });
    ##################################################
    Bus Binding for Dropdown
    ##################################################
    $(document).ready(function () {
    var theme = getTheme();
    // prepare the data
            var source ={
        datatype: "json",
        datafields: [{ name: 'places'},],
        url: 'data.php'
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    $(".orig_bus").jqxDropDownList(
    {
        source: dataAdapter,
        theme: theme,
        width: 300,
        height: 24,
        selectedIndex: 0,
        displayMember: 'places',
        valueMember: 'places'
    });   
        });
        ####################################################
        HTML DIV dropdown
        ####################################################
         <div name="list" class="orig_bus"></div>

0 个答案:

没有答案