Skip to content

Instantly share code, notes, and snippets.

@MarkNijhof
Created November 10, 2010 21:52
Show Gist options
  • Save MarkNijhof/671596 to your computer and use it in GitHub Desktop.
Save MarkNijhof/671596 to your computer and use it in GitHub Desktop.
Example_1.js
<script type="text/javascript">
function submit_form() {
$('#form_abc').submit();
}
</script>
<!-- Some other HTML or something else //-->
<script type="text/javascript">
function submit_form() {
$('#form_xyz').submit();
}
</script>
<script type="text/javascript" src="/javascripts/form_abc_handling.js"></script>
<script type="text/javascript" src="/javascripts/form_xyz_handling.js"></script>
<!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">
<head>
<title>Cre8ive Thought</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#block').css('background-color', 'green');
});
</script>
</head>
<body>
<div id="block" class="square" style="width:100px;height:100px;border:solid black 1px;"></div>
<div id="block" class="square" style="width:100px;height:100px;border:solid black 1px;"></div>
</body>
</html>
<!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">
<head>
<title>Cre8ive Thought</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.square').css('background-color', 'green');
});
</script>
</head>
<body>
<div id="block" class="square" style="width:100px;height:100px;border:solid black 1px;"></div>
<div id="block" class="square" style="width:100px;height:100px;border:solid black 1px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment