357
google mAPs, youtube, And jQuery mobIle
//add click listener to save marker button
go ogle.maps.event.addDomListener(saveBtn, "click",
function(event) {
JQuery Form Validation
//form input validation rules per input
//location and description are the targeted input fields
//location value is set to it's own ID instead of 'required'
// so that addMethod() can override it with a custom RegEx
filter
//this regex matches the server side php regex
$("#markerForm").validate({
rules: {
location: "location",
desc: {
required: true,
minlength: 5,
maxlength: 80
}
},
messages: {
desc: {
required: "Please enter a description",
mi nlength: "Your description must be at least 5
characters ...