if (typeof $.monstra == 'undefined') $.monstra = {}; $.monstra.snippets = { init: function() { }, showEmbedCodes: function(name) { $('#shortcode').html('{snippet get="'+name+'"}'); $('#phpcode').html('<?php echo Snippet::get("'+name+'"); ?>'); $('#embedCodes').modal(); } }; $(document).ready(function(){ $.monstra.snippets.init(); });