Rabu, 03 Agustus 2011

Dojo/Dijit MenuItem binding using jQuery

While dojo is really awesome in ui detail, i feel better connected with jquery css selector method to assign an action for my menu.


so here it is how to do it.

in my dijit.menuItem tag add you own tag.

<div dojoType="dijit.MenuItem"><satirimenu url="main/logout"/>Logout</div>

in you jquery ready function then use your own tag

//use own tag
$("satirimenu").click(function(){
alert($(this).attr("url"));
});

Then you can imagine whatever you wanto to achieve using this method.
happy Coding!

0 komentar:

Posting Komentar

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More