This example demonstrates using an jQuery id selector on anchor tags to attach a click event. It also uses an id selector to attach the slideDown and slideUp JQuery functions to a html div element.
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $("#lnkShowLoginBox").click(showLoginBox);
- $("#lnkHideLoginBox").click(hideLoginBox);
function showLoginBox(e) {
e.preventDefault();
console.log('in fn. showLoginBox');
$("#PaulsPointLoginBox").slideDown("slow");
}
function hideLoginBox(e) {
e.preventDefault();
console.log('in fn. hideLoginBox');
$("#PaulsPointLoginBox").slideUp("slow");
}
No comments:
Post a Comment