onBeforeTabClick

fires before a segment is clicked

boolean onBeforeTabClick(number|string id,Event ev);
idnumber|stringthe id of the segment
evEventthe click event object
booleanreturns false, if the event handler returns false, returns true by default

Example

segmented.attachEvent("onBeforeTabClick", function(id,ev){
    //code
});

Details

Unlike the onItemClick event this one watches clicks over separate segments and passes the ID of a clicked segment into its handler.

You can block clicking by returning false from the event handler.

See also
Back to top