-
-
Save juarezpaf/152450 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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"> | |
<head> | |
<title>::jquery::</title> | |
<link rel="stylesheet" href="jquery-ui-theme/ui.core.css" type="text/css" /> | |
<link rel="stylesheet" href="jquery-ui-theme/ui.datepicker.css" type="text/css" /> | |
<link rel="stylesheet" href="jquery-ui-theme/humanity/ui.theme.css" type="text/css" /> | |
<style> | |
.ui-button:hover { border: 1px solid #444;cursor:pointer} | |
input { display:block;margin-top:5px} | |
</style> | |
</head> | |
<body> | |
<button class="ui-state-default ui-button ui-corner-all">Add Input</button> | |
<form> | |
<input type="text"> | |
</form> | |
<script language="JavaScript" type="text/javascript" src="jquery/jquery-1.3.2.min.js"></script> | |
<script type="text/javascript" src="jquery/ui/jquery-ui.js"></script> | |
<script type="text/javascript" src="jquery/ui/i18n/ui.datepicker-pt-BR.js"></script> | |
<script> | |
$(function(){ | |
var $form = $('form') | |
,dtPicker = function() { | |
$(this).datepicker({ showAnim: 'fadeIn',duration:'fast' }); | |
}; | |
$('button').bind('click',function(){ | |
var ipt = document.createElement('input'); | |
$(ipt).map(dtPicker); | |
$form.append(ipt); | |
}) | |
$form.children().map(dtPicker); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment