1 /* ***************************************************************************
5 (function ( $, undefined ) {
7 $.widget( "tizen.listdivider", $.mobile.widget, {
9 initSelector: ":jqmData(role='list-divider')"
12 _create: function () {
14 var $listdivider = this.element,
18 style = $listdivider.attr( "data-style" );
20 if ( style === "expandable" || style === "checkexpandable" ) {
21 iconStatus = openStatus ? "opened" : "closed";
22 expandSrc = "<span class='ui-divider-expand-div'><span class='ui-icon-expandable-divider-" + iconStatus + "'/></span>";
24 $( expandSrc ).appendTo( $listdivider );
27 $listdivider.children( ".ui-divider-expand-div" ).bind( "vclick", function ( event, ui ) {
29 $( this ).children( "span" ).removeClass( "ui-icon-expandable-divider-opened" );
30 $( this ).children( "span" ).addClass( "ui-icon-expandable-divider-closed" );
33 $( this ).children( "span" ).removeClass( "ui-icon-expandable-divider-closed" );
34 $( this ).children( "span" ).addClass( "ui-icon-expandable-divider-opened" );
41 //auto self-init widgets
42 $( document ).bind( "pagecreate create", function ( e ) {
43 $( $.tizen.listdivider.prototype.options.initSelector, e.target ).listdivider();