Login   Register  
PHP Classes
elePHPant
Icontem

File: test.html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Roberts  >  OnHTML  >  test.html  >  Download  
File: test.html
Role: Auxiliary data
Content type: text/plain
Description: Documentation
Class: OnHTML
Generate a HTML page to be shown with JavaScript
Author: By
Last change:
Date: 2 years ago
Size: 616 bytes
 

Contents

Class file image Download
<!doctype html>
<html>
<head>
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="js/jquery.onhtml.js"></script>
	
	<script type="text/javascript">
		$(document).ready(function(){
			$('.onhtml').bind('click',function(){
				$('#content').onHtml(
					$(this).attr('data-onhtml'),
					{ part1: "Somedata", part2: "Some other data" }
				);
			});
		});
	</script>
	
</head>
<body>
	<div>
		<button type="button" class="onhtml" data-onhtml="php/data.php">Load content</button>
	</div>
	<div id="content">Default content</div>
</body>
</html>