I spend the last two days changing all 4 different types of fancy list controls and autocomplete functions we use to jQuery UI's autocomplete! I love that there is 1 out of the box solution for so many different situations!
The main thing I've been missing is an option that allows me to format the label used by the widget.
I have read that I can override the renderitem method, but this seems like a very very complicated solution to a very simple problem.
The render item function currently is:
_renderItem: function( ul, item ) {
return $( "<li>" )
.append( $( "<a>" ).text( item.label ) )
.appendTo( ul );
},
what if we would - add an option allowHTML
and change the code to:
_renderItem: function( ul, item ) {
if ( this.options.allowHTML == true ) {
return $( "<li>" )
.append( $( "<a>" ).html( item.label ) )
.appendTo( ul );
}else{
return $( "<li>" )
.append( $( "<a>" ).text( item.label ) )
.appendTo( ul );
}
},
It's a simple addition, allowing 'simple' users full control over the format of the label without destroying compatibility...
Hi, 'normal' jquery events (onclick,etc) allow me to pass an eventdata object that I can later access through the passed event object (event.data). Can I do this with Ajax events?
e.g.
$.ajax({
url: "data.php"
,dataType: 'json'
})
.success({myCustomParam: 'a value'}, function( jsonObject ) { /* how do I get to the event.data from here? */ })
I just started my first jQuery Mobile project... I run in to this (small) problem.
I have a standard multi paged template. I've added some extra text to make the first page long enough to require scrolling and I've set the page transitions to 'slide'.
Everything works find, but, when I scoll down the page and click the link there to page2, the page first (very quickly) scolls back to the top before sliding in page2, this looks like a 'flash'... I read a post similar that never got solved... Anybody have a solution?
I have created a jQuery UI theme using the theme roller. I've been using it for a few days and not I'd like to change a few settings. Is there any way to upload the theme back to the theme roller to edit the theme instead of having to start over?