I would structure things a little differently. don't use the onclick event handler.
<a href="http://jquery.com" class="popup-link">jQuery</a> Then in your javascript use jQuery: $().ready(function(){ $(".popup-link").click(function(){ var $popuplink = $(this); $("#popup") .fadeIn("slow") .load($popuplink.href()); return false; }); }); On Sat, Sep 19, 2009 at 8:25 PM, Yuzem <naujnit...@gmail.com> wrote: > > > Hello, I have a link: > > a href="some_url" onclick="popup()" > > In the script, I have myFunction and I want to use the href: > > function popup() > { > $("#popup") > .fadeIn('slow') > .load(this.href) > > return false > } > > But it doesn't work. How do I access href? > Thanks in advance! > -- > View this message in context: > http://www.nabble.com/A-very-simple-newbie-problem-tp25526787s27240p25526787.html > Sent from the jQuery General Discussion mailing list archive at Nabble.com. > >