Your inline onclick handler needs to return false. Maybe your popup()
function is returning false, but the onclick handler itself isn't returning
anything.
You need to do:
onclick="popup(href); return false;"
If popup() returns false, you can write:
onclick="return popup(href);"
Or, take a loo
Sorry for the delay, it seems that the server was doing some maintenance
work.
Thanks for the answer.
I just find out how to do it the other way:
a href="url" onclick="popup(href)"
Now, I am getting the href but the problem is that the entire page get
reloaded even using return false.
Does any
Then you just need to use the live method to catch the bubbled up DOM
elements and attach the click event.
See here:
$().ready(function(){
$(".popup-link").live("click", function(){
var $popuplink = $(this);
$("#popup")
.fadeIn("slow")
The problem is that the link is dynamically loaded after the original page,
the document ready function doesn't affect it.
Any idea?
--
View this message in context:
http://www.nabble.com/A-very-simple-newbie-problem-tp25526787s27240p25527753.html
Sent from the jQuery General Discussion maili
I would structure things a little differently.
don't use the onclick event handler.
http://jquery.com"; class="popup-link">jQuery
Then in your javascript use jQuery:
$().ready(function(){
$(".popup-link").click(function(){
var $popuplink = $(this);
$("#popup")
5 matches
Mail list logo