views:

9

answers:

0

$(function(){

            // Dialog           

            $('#mdialog').dialog({

                autoOpen: false,

                width: 320,

                buttons: {

                    "Apply": function() {

                        <!--alert($('#slider').slider('option', 'value'));-->

                        try{

                        SendCommandToAO($('#slider').slider('option', 'value'), 'AO=a1c1p1', 0, 65535, 0, 65535, -1);

                        }catch(e){

                            //Fool

                        }



                        //$(this).dialog("close"); 

                    }, 

                    "Cancel": function() { 

                        $(this).dialog("close"); 

                        } 

                    }

            });



            $('#slider').slider({

                min:0,

                max:65535,

                slide: function(event, ui) {

                    $("#amount").val('' + ui.value);}

                });
                                   });



        });