Created
September 20, 2010 13:14
-
-
Save iainurquhart/587876 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Say you had your "add to favorites" link as so: | |
<p class="bookmark_link"> | |
<a class="favorites_trigger" href="{path=/favorites/add/}{entry_id}"> | |
Bookmark this | |
</a> | |
</p> | |
========================================================== | |
And your /favorites/add template: | |
{exp:favorites:save} | |
========================================================== | |
And the jquery: | |
$().ready(function() { | |
$('a.favorites_trigger') .click (function() { | |
$.get(this.href, function(data) { | |
$('p.bookmark_link').html(data); | |
}); | |
return false; | |
}); | |
}); | |
========================================================== | |
et voila |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment