Hello folks.
I've got something strange going on and it's left me scratching my head. I have a potentially heavy bit of processing going on that might leave the user a bit stumped for a few seconds so I display a message for them.
Or so I thought. The problem is the message only decides to display itself AFTER the process has finished.
Any idea what I could be doing wrong?
Thanks ladies and gentlemen.
- function filterSearch(){
- $('#filter-applying').show();
- var prices = $('#filter-price').slider('option', 'values');
- var min = prices[0];
- var max = prices[1];
- var bedrooms = $('#filter-bedrooms').slider('option', 'value');
- var bathrooms = $('#filter-bathrooms').slider('option', 'value');
- ... 100+ lines of code omited for brevity
- $('#filter-applying').hide();
- }
Example call:
- $('#filter-bedrooms').slider({
- min:1,
- max:22,
- step:1,
- value:$.readCookie('search_bedrooms') || 1,
- slide:function(event, ui){ $('#filter-bedrooms-message').html(ui.value + '+ bedrooms'); },
- change:function(event, ui){ filterSearch(); }
});