ibm mobilefirst - ToolBarButton not triggering event -


i have event catcher:

    wljq('button#refreshbte').bind('click', function() {         console.log("start refresh...");     }); 

could explain me why:

is works with:

    <div data-dojo-type="dojox.mobile.heading"         data-dojo-props='fixed:"top"'>         header     </div>     <button id="refreshbte" data-dojo-type="dojox.mobile.button"             style="float: right">refresh</button> 

and doesn't work with:

    <div data-dojo-type="dojox.mobile.heading"         data-dojo-props='fixed:"top"'>         header         <button id="refreshbte" data-dojo-type="dojox.mobile.toolbarbutton"             style="float: right">refresh</button>     </div> 

it doesn't either if replace toolbarbutton button.

thx


edit: wasn't working me created simple wl project , added heading , toolbarbutton, here html:

<!doctype html> <html> <head> <meta charset="utf-8"> <title>test</title> <meta name="viewport"     content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <link rel="shortcut icon" href="images/favicon.png"> <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> <link rel="stylesheet" href="css/test.css"> <script>     window.$ = window.jquery = wljq; </script> <script type="text/javascript"     data-dojo-config="isdebug: false, async: true, parseonload: true, mblhideaddressbar: false"     src="dojo/dojo.js"></script> </head> <body id="content" style="display: none;">     <div data-dojo-type="dojox.mobile.scrollableview" id="view0"         data-dojo-props="selected:true">     <div data-dojo-type="dojox.mobile.heading"         data-dojo-props="label:'heading'">             <button data-dojo-type="dojox.mobile.toolbarbutton" id="refreshbte">label</button>         </div>      </div>     <!--application ui goes here-->     <script src="js/initoptions.js"></script>     <script src="js/test.js"></script>     <script src="js/messages.js"></script> </body> </html> 

the "page designer" shows heading , toolbar when run on android emulator, got black screen! idea?

maybe because bind event using jquery syntax?

the same markup works fine me using dojo code:

require([     "dojo/ready",     "dijit/registry" ], function(ready, registry){     ready(function(){         registry.byid("refreshbte").on("click", function(){             console.log("start refresh...");         });     }); }); 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -