Skip to content

Instantly share code, notes, and snippets.

@Asenar
Created October 31, 2012 12:06
Show Gist options
  • Save Asenar/3986699 to your computer and use it in GitHub Desktop.
Save Asenar/3986699 to your computer and use it in GitHub Desktop.
something like this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<link href="/js/jquery/jquery.cleditor.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery.cleditor.js"></script>
<script type="text/javascript" src="/js/jquery/jquery.form.js"></script>
<script type="text/javascript">
$("#myform").submit(function(e){
e.preventDefault();
// some stufff
$(this).ajax({
success:function(data){
$("#container").html(data);
}
});
});
</script>
</head>
<body>
<div id="container">
<form id="myform">
...
</form>
</div>
</body>
<form >BLABLA</form>
<script type="text/javascript">
$(".apartment-sublang").each(function(){
console.log("yep "+$(this).attr("id"));
/* protect_them = $(this).find("input[type=text], input[type=checkbox], input[type=radio], textarea, select"); */
protect_them = $(this).find("input, textarea, select");
protect_them.bind('change', function(e){
$(".sublang-control").addClass("protect");
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment