I’ve searched on the other question but could not find the same situation as i’m in.
I’ve created a overview of items with some dropdowns next to it to filter the results (which will be done by ajax). So when a dropdown is changed, I want to trigger the ‘page 1’ link so the first page of results will be requested and displayed.
The problem is, the alert ‘go to page 1’ only comes up once in Internet Explorer 7 and 8. The second time I change a dropdown there is nothing. (when i place an alert in the ‘change’ function, it will pop up every time)
Shortly my code is
$('.pageLink').live('click', function(event){
event.preventDefault();
// read quickfilter here
// request the results and do some magic animations to display them
alert('go to page 1');
});
$('[name^=quicksearch]').change(function(){
$('.pageLink[href="#1"]').trigger('click');
});
Thanks for the reply’s. with the length there was a length of 0. I’ve checked in my code if the element was undefined but still IE tells me that it is an object. I’ve used the following code to make it work.