Selectmenu: Filterable demo now filters/refreshes selectmenu widget

Fixes gh-7677

... and actually fixes a bug in the existing selectmenu-custom-filter demo whereby the filter input does not return to the popup if the menu is ever shown as a dialog.
Making a function sounds like a good idea. Duplicate codeblocks isn't good
coding style...
Den 24/10/2014 13:31 skrev "gabrielschulhof" <notifications@github.com>:

> In demos/selectmenu-custom-filter/index.php:
>
> >
> > -		if ( !( id === "filter-menu-dialog" || id === "title-filter-menu-dialog" ) ) {
> > -			return;
> > +		// We only handle the disappearance of a dialog generated by a filterable selectmenu
> > +		if ( !$( ".filterable-select" ).is( function() {
> > +				return ( ( $( this ).attr( "id" ) + "-dialog" ) === id );
> > +			})) {
>
> Since I perform this check twice, if you think the above alternative is
> more palatable, then I will write a function that contains it and that gets
> called from both places. Something like isSelectmenuDialog().
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jquery/jquery-mobile/pull/7681/files#r19334126>.
>