Hi,
As the title states, Jquery is turning my text white in certain areas of the page. it cant be the im using to encapsulate the ajax call, because it works fine when im not calling the ajax
Its a bit difficult to post the whole script, because its huge and i dont know where its happening. I have no idea how to debug this using firebug, because i dont know where the problem occurs.
Any help is much appreciated
here is the script i am using:
<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="js/jquery.history.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.history.init(pageload);
$('a[href=' + window.location.hash + ']').addClass('selected');
$('a[rel=ajax]').click(function () {
var hash = this.href;
hash = hash.replace(/^.*#/, '');
$.history.load(hash);
$('a[rel=ajax]').removeClass('selected');
$(this).addClass('selected');
$('#body').hide();
$('.loading').show();
getPage();
return false;
});
});
function pageload(hash) {
if (hash) getPage();
}
function getPage() {
hash = document.location.hash;
hash = hash.replace(/^.*#/, '');
var data = 'page=' + encodeURIComponent(hash);
$.ajax({
url: "index.php",
type: "POST",
data: data,
cache: false,
success: function (html) {
$('.loading').hide();
$('mytag').html(html);
$('#body').fadeIn('slow');
}
});
}
</script>
cheers ke