So i wanted to make some pretty buttons like http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html and everything is working fine. I wanted my forms to be able to be submitted with these sexy buttons.
So i started to use jQuery to handle all my "a" click actions.
$(document).ready(function() {
$("a").click(function() {
alert("a");
var a = $(this);
var id = a.attr("id");
switch (id) {
case "formSubmit":
a.parents("form:first").submit();
return false;
});
one more question... How do i get that code above to be highlighted in javascript? or any code like formating? Sorry for the crappy spaces, the second i find out how, i will edit it.
I got distracted and forgot to ask the original question. Now with jQuery it is easy to add in new information through $.post and other information. HOW do i add in a new a href link so that the $("a").click
catches it?
5 minutes on stack overflow... great success!!! – ThePrimeagen Nov 23 '10 at 02:51
$(document.body).delegate("a", "click", function() {
andlive()
– ThePrimeagen Nov 23 '10 at 02:59