9Apr/150
Notepad++ Emmet jQuery Template
Here's a little addition I've made for the excellent Notepad++ plugin Emmet. It's a shortcut that creates a HTML5 template with a link to jQuery "jquery-2.1.3.min.js" and a "$(document).ready" function, as shown below.
It's straightforwards to do, and requires three additions to Emmet's "snippets.json" file, that is located in the Notepad++ direction "\plugins\EmmetNPP\emmet\".
Addition 1, to?the section "snippets", a child of "html":
"jqdocready": "\\$(document).ready(function() {\n\n});"
Additions 2 and 3, to?the section "abbreviations", a child of "html":
"docjq2":"html>(head>meta[charset=UTF-8]+title{${1:Document}}+script[src=http://code.jquery.com/jquery-2.1.3.min.js]+script[type=text/javascript]>jqdocready)+body", "html:5jq2":"!!!+docjq2[lang=${lang}]",
In situ, the three additions look like this:
Obviously, make changes at your own risk, but if done correctly, this will work. Cheers m'dears,
Leave a comment