Skip to content

Instantly share code, notes, and snippets.

@asika32764
Created May 5, 2014 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asika32764/858dbd7a4f741505d354 to your computer and use it in GitHub Desktop.
Save asika32764/858dbd7a4f741505d354 to your computer and use it in GitHub Desktop.
// Example JS
var RxresidentList = {
/**
*
*/
init : function(option, $)
{
this.root = option.root || 'http://localhost';
this.option = option;
this.table = $('#table');
this.row = $('.row');
this.registerEvent(option);
},
registerEvent : function(option)
{
$('#table').click(function(){
this.addNewRow();
})
},
addNewRow : function()
{
}
};
// --------------
<script>
var option = {
root : '<?php echo Juri::root();?>'
};
var option = <?php json_encode($json, JSON_PRETTY_PRINT); ?>;
jQuery.noConflict($);
jQuery(documnet).ready(function($)
{
RxresidentList.init(option, $);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment