Hello,

I have a problem, i have this script:



$(document).ready(function() {
var requestURL = "index.php";
$("a").click(function() {
var params = $(this).attr("data");
$("#content").slideUp("slow");
$.ajax({
type: "post",
url: requestURL,
data: "new=y&page="+params,
beforeSend: function() {
$("#loading").slideDown("fast");
},
success: function(response) {
$("#content").html(response);
$("#content").slideDown("slow");
},
complete: function() {
$("#loading").slideUp("fast");
}
});
});
});



i added it to my index.php, but when i open a new ajax page with it,
the script dissappears...
to make it work again, i have to add that script on every ajax page i
open...

so my question is: is it possible to make the script above global
(make it work without calling it again)?

Reply via email to