I'm trying to load some data via an AJAX call to a PHP script and then returning it, bla bla bla. Well, it works all fine till jScrollPane won't reload on the AJAX call. I simply don't understand why, since I've called it in the success part of the $.ajax call... But oh well, dunno. Have a look at the code below and tell me what I'm doing wrong/how to fix it.
function eventLink(){
jQuery(".ticket-link a").fancybox({
width:710,
height:750,
type:"iframe",
transitionIn:"elastic",
transitionOut:"elastic",
speedIn:600,
speedOut:600,
easingIn:"easeInExpo",
easingOut:"easeOutExpo",
overlayShow:true,
hideOnOverlayClick:false,
hideOnContentClick:false,
overlayOpacity:0.8,
overlayColor:"#000",
showCloseButton:true,
titleShow:true,
centerOnScroll:true
});
}
function scrollPane() {
jQuery('.scroll-pane').jScrollPane({
showArrows: true,
autoReinitialise: true
});
}
jQuery(document).ready(function(){
jQuery("select[name='sortby']").change(function(){
var a=jQuery(this).val();
jQuery.ajax({
type:"GET",
url:"ticket_order.php",
data:"sortby="+a,
beforeSend:function(){
jQuery("#ajax-loader").show();
jQuery("#ticket-list").hide(200);
jQuery("#ticket-list").empty()},
complete:function(){
jQuery("#ajax-loader").hide();
eventLink();
},
success:function(a){
jQuery("#ticket-list").html(a);
jQuery("#ticket-list").show(200);
scrollPane();
}
});
return false});
eventLink();
scrollPane();
});