Custom no-results message support (#286)
* Custom no-results message support * Refactoring and clean up for LanguageCategoryDisplay class * Document the options for LanguageCategoryDisplay class * Reduce the spreading of no results handler code * Add an option to accept no results template * Remove unwanted, unused constructor too * Use CSS to hide or show the no-results view * Remove the unwanted noresults method in jquery.uls.core, directly call the same method of lcd. * Add an example * Support a function returning jquery element as the no-result handler
This commit is contained in:
committed by
Niklas Laxström
parent
84e82520c8
commit
2aa43148bb
@@ -30,7 +30,7 @@
|
||||
<script>
|
||||
$( document ).ready( function() {
|
||||
$( '.uls-trigger' ).uls( {
|
||||
onSelect : function( language ) {
|
||||
onSelect: function( language ) {
|
||||
var languageName = $.uls.data.getAutonym( language );
|
||||
$( '.uls-trigger' ).text( languageName );
|
||||
},
|
||||
@@ -42,12 +42,11 @@
|
||||
|
||||
<body>
|
||||
<div class="navbar navbar-fixed-top">
|
||||
<span class="active uls-trigger">Select Language</span>
|
||||
<span class="active uls-trigger">Select language</span>
|
||||
<h1>Universal Language Selector</h1>
|
||||
<p>
|
||||
Demonstration of jQuery plugin
|
||||
Demonstration of jQuery.uls plugin
|
||||
</p>
|
||||
</div>
|
||||
<div class="container"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user