I have a really basic question about jquery. However I don’t know how to this so that’s why i’m here looking for your help. This is my code:
Edit: <a href="javascript:$('#target').load('page.html').fadeIn('1000');">Link</a>
As you see i want to load page.html into a div called #target. What I also want to do wich doesen’t work is to make page.html fade in when it loads. What’s the right way to that?
Best Regards
First, you should put your Javascript code outside the element itself. This is fairly simple to do. It makes your HTML and Javascript much more easily comprehensible and ultimately allows much more organised code. First, give your
aelement anid:Then make your call in a
scripttag:Edit To comment, yes you can use a URL in the
atag and then usethis.href.