]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Use button instead of a link in icon trigger demo
authorFelix Nagel <info@felixnagel.com>
Wed, 2 Sep 2015 20:46:57 +0000 (22:46 +0200)
committerFelix Nagel <info@felixnagel.com>
Thu, 10 Sep 2015 21:21:53 +0000 (23:21 +0200)
demos/datepicker/icon-trigger.html

index ed79840ab882a23522d4a28ad6b432ee38a34fb9..999d09e1dd51d30b7a571bd2d196ab1da6d313c4 100644 (file)
                        } ),
                        widget = datepicker.datepicker( "widget" );
 
-               $( "<a href='#'>")
-                       .append( "<img src='images/calendar.gif' tabindex='0' alt='Open Datepicker'>" )
+               $( "<button>" )
+                       .append( "<img src='images/calendar.gif' alt='Open Datepicker'>" )
                        .insertAfter( datepicker )
-                       .on( "click", function( event ) {
+                       .on( "click", function() {
                                allowOpen = true;
                                if ( widget.is( ":hidden" ) ) {
                                        datepicker.focus();
                                }
-                               event.preventDefault();
                        });
        </script>
 </head>