[jQuery] Code breaks on Safari Mac
hi list,
I'm using the latest jquery build to do some fancy ajax+animation
stuff on my website. Nothing spectacular. It works in all browser yet
not in Safari on Mac. Any idea what I am doing wrong? Even the simple
hide() function (second line of the script) doesn't work. Any idea on
how to fix this?
here's the code
$(document).ready(function() {
$('.jq_loading').hide();
$(function showNextPic () {
$('a.nextpic').livequery('click', function(event) {
var dataArray = $('.projectpic').attr("id").split("_");
var id = dataArray[1];
var menu_een_ID = dataArray[2];
var menu_twee_ID = dataArray[3];
var lang = dataArray[4];
var picid = dataArray[5];
var op = $(this).attr("id");
$.ajax({
type: "GET",
url: "item.php",
data: "ID=" + id + "&op=" + op + "&menu_een_ID=" +
menu_een_ID + "&menu_twee_ID=" + menu_twee_ID + "&lang=" + lang +
"&picid=" +picid+ "&ajax=true",
dataType: "json",
beforeSend: function(){hideCurrentPic();},
success: function(json){showNewPic(json,lang);}
});
return false;
});
function hideCurrentPic() {
$('.jq_loading').fadeIn("fast");
}
function showNewPic(json,lang) {
$('.jq_loading').hide();
$('.projectpic').fadeOut("fast",function() {$
('.projectpic').attr({ id: "jq_" +json.item_ID+ "_" +json.menu_een_ID+
"_" +json.menu_twee_ID+ "_" +lang+ "_" +json.ID, src: "../layout/
images/uploads/" +json.picture, alt: json.alt }).fadeIn("fast");});
}
})
})