automatically by adding a class that is observed.
$(document).ready(function(){
if($(".addRecord").length) {
addRecord();
}
});
> ---Original Message---
> From: Dave Maharaj :: WidePixels.com
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Function help
>
I have this function:
$('#new').live('click', addRecord);
function addRecord() {
var data = $('#add').serialize();
$.ajax({
type: "post",
url: "/manage/add",
data: data,
dataType: 'json',
success: function(response){
if (response.status === true
2 matches
Mail list logo