Export 0.1.41
[platform/framework/web/web-ui-fw.git] / src / widgets / swipelist / js / jquery.mobile.tizen.swipelist.js
index 0fab979..05c9957 100644 (file)
                                        coverTheme = defaultCoverTheme,
                                // get the parent li element and add classes
                                        item = cover.closest('li'),
+                                       btn,
                                        itemHasThemeClass;
 
                                // add swipelist CSS classes
 
                                // any clicks on buttons inside the item also trigger
                                // the cover to slide back to the left
-                               item.find('.ui-btn').bind('vclick', cover.data('animateLeft'));
+                               btn = item.find('.ui-btn');
+
+                               if ( btn.length ) {
+                                       btn.bind('vclick', cover.data('animateLeft'));
+                               } else {
+                                       item.append('<div class="ui-dummy"></div>');
+                               }
                        });
                },