Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
121
rated 0 times [  123] [ 2]  / answers: 1 / hits: 16737  / 15 Years ago, sun, september 20, 2009, 12:00:00

The code below works as expected in FF but not in IEs...



$(document).ready(function() {

$('div.facet_dropdown select').live('change', function() {
var changed_facet = $(this).attr('id');
var facets = $('select', $(this).closest('form'));
var args = window.location.href.split('?')[0] + '?ajax=1';
var clear = false;
for(var i = 0; i < facets.length; i++) {
var ob = $(facets[i]);
var val = ob.val();
if(clear) {
val = '';
}
args += '&' + ob.attr('id') + '=' + val;
if(ob.attr('id') == changed_facet) {
clear = true;
}
}

$.getJSON(args, function(json) {
for(widget_id in json) {
var sel = '#field-' + widget_id + ' div.widget';
$(sel).html(json[widget_id]);
}
});

});

});

More From » jquery

 Answers
18

$.live() does not support the change event:




Currently not supported: blur, focus, mouseenter, mouseleave, change, submit
http://docs.jquery.com/Events/live




Try using livequery instead?


[#98653] Wednesday, September 16, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cadendericki

Total Points: 482
Total Questions: 109
Total Answers: 103

Location: Ecuador
Member since Thu, Jun 4, 2020
4 Years ago
cadendericki questions
Wed, Apr 7, 21, 00:00, 3 Years ago
Wed, Jul 8, 20, 00:00, 4 Years ago
Thu, May 14, 20, 00:00, 4 Years ago
;