Ich hab einen alten Code gefunden und möchte die iframes mit neuen Alternativen ersetzen. Ich hab gelesen das es mit jQuery klappt!? Kann mir da jemand helfen?
Danke Dir! Ich hab jetzt ein Tutorial gefunden welches mir weiterhilft.
Jedoch hab ich jetzt ein Problem und zwar habe ich es wie hier beschrieben versucht umzusetzen.
// code direkt nach seitenaufbau starten
$(document).ready(function()
{
// allen links im div 'navigation' eine click()-funktion zuweisen
// es wird auch auf alle links von der dynamisch nachgeladenen
// seiten reagiert (solange die seiten in das content-div geladen werden)!
$("#navigation a, #content a").live("click",function()
{
// das link-ziel jeweils auslesen & zwischenspeichern
var pageToLoad = $(this).attr("href");
// varaible für den neuen inhalt
var pageContent;
// die externe seite laden, der inhalt ist dann in 'data'
$.get(pageToLoad, function(data)
{
// den inhalt zwischenspeichern
pageContent=data;
// content-div langsam ausblenden
$("#content").fadeOut("slow", function()
{
// wenn das ausblenden fertig ist, inhalt an das content-div übergeben
$("#content").html(pageContent);
// content-div langsam wieder einblenden lassen
$("#content").fadeIn("slow");
// oder in kurzer form (vorzuziehen)
// $("#content").html(pageContent).fadeIn("slow");
});
});
// wichtig! sonst wird der a-link im browser aufgerufen!
return false;
});
});
Ich hoffe jemand kann mir sobald wie möglich helfen!!
Danke!
"keep it simple and stupid."
This post has been edited 1 time(s), it was last edited by maximadeone: 29.07.2011 21:15.
If you were enjoying this post and if you keen on reading more interesting stuff then do not hesitate to complete the free sign up.
After the free registration you will gain access to all areas and you will be able to communicate with other artists from all over the world.
In addition you will benefit from our Photoshop and coding section as well as from our huge (hundreds of gigabytes) free resource section where you can find everything you will need to be a successful (web) designer/artist.
Sign up now and enjoy the advantages as a registered member.
(This website will be ad-free after a complete free sign up.)