-1

I included jeditable in my existing webpage.

$.editable is undefined.

I am not able to call or use the editable function to edit fields

What is the proper way to include jQuery plugins like this?

jwpfox
  • 5,124
  • 11
  • 45
  • 42
Akshay Vijay Jain
  • 13,461
  • 8
  • 60
  • 73

2 Answers2

0

Why $.editable? In manual you must use $(".some_element").editable().

Basic usage

<div class="edit" id="div_1">Dolor</div>
<div class="edit_area" id="div_2">Lorem ipsum dolor sit amet, consectetuer
adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore
magna aliquam erat volutpat.</div>

Javascript:

 $(document).ready(function() {
     $('.edit').editable('http://www.example.com/save.php');
 });

Please read more at documentation: http://www.appelsiini.net/projects/jeditable

Dave
  • 2,764
  • 2
  • 15
  • 27
0

Actually i was facing issue adding many jquery plugins.
Problem is that I am working with Salesforce page, aura framework, so when adding script, the script is added in the head

I do not know how to control the loading order here, to jeditable.js gets loaded but because of some order mismatch it is not properly attached

That's why the error

Solution:
Now I am using $.getScript("address of jeditable uploaded to salesforce server")
and this is working fine

Akshay Vijay Jain
  • 13,461
  • 8
  • 60
  • 73