I am a novice at implementing jQuery add ons. I’d like to use editable on my site:
http://www.arashkarimzadeh.com/jquery/7-editable-jquery-plugin.html
I am using 2 jQuery add ons on my site already… but the packages had all files I need. So I have a scripts folder, with jquery-1.4.1… And then a folder for each ‘plugin’, such as ‘plupload’, and in there I have a whole lot of .js files and a few folders. This was a folder downloaded from the authors site.
With ‘editable’, they only provide a single .js file. What do I do with it (Where should I copy it on my site structure), and how do I ‘include’ it in my project, so that I can make use of the code they provide?
My html code looks like this:
<div id="editable"> Click Me </div>
and I have my function at the bottom of as ascx file:
.....
<script type="text/javascript">
$(function () {
$('#gallery a').lightBox({
imageBtnClose: '/lightbox/images/lightbox-btn-close.gif'
});
});
$(document).ready(function () {
$('div.editable').editable();
});
</script>
</asp:Content>
And I have this at the top of the file:
<script type="text/javascript" src="scripts/jquery.editable-1.3.3.js"></script>
Have you tried putting the .js file in your scripts folder? Then add this tag to your
<head>tag:Where the src points to your file.
Once that is done you should just use this (or any other settings you want) within another
<script>tag:Where
div.editableis the div you want to be editable.