I am trying to hide the footer when the form element is given focus. I also want to show the footer when the form element loses focus, which should handle the blur event. I cannot get a focus or blur event to trigger a jquery Mobile selectmenu element.
Here is an example of one of my form elements -
<select id="radiology-study-provider" class="selectList"></select>
Here is the jQuery code that should hide my footer in focus and show it with blur (it is inside the DOM) -
$('.selectList').change(function(){
console.log("the change event is firing");
});
$('.selectList').focus(function(){
$('div:jqmData(role="footer")').hide();
});
$('.selectList').blur(function(){
$('div:jqmData(role="footer")').show();
});
It is strange that the change event handler fires, but focus and blur will not.
I tried this below and it will not work -
$('.selectList').on('focus', function(){
$('div:jqmData(role="footer")').hide();
});
$('.selectList').on('blur', function(){
$('div:jqmData(role="footer")').show();
});
I also tried this -
$('.selectList').bind( "focus", function(event, ui) {
$('div:jqmData(role="footer")').hide();
});
$('.selectList').bind( "blur", function(event, ui) {
$('div:jqmData(role="footer")').hide();
});
focusin() focusout() . ( div.ui-select). , , .
jQuery Mobile 1.1.0 jQuery 1.7.1. jQuery Mobile selectmenu http://jquerymobile.com/test/docs/forms/selects/events.html, Google, .