the simplest jeditable example does not work on my page

342 views Asked by At

Sorry I think I have a stupid mistake somewhere but I spend 2hours on this now... arg. I just want to try out jeditable on my website, so I included the following in my header

<script type="text/JavaScript"
    src="js/jquery.jeditable.js"></script>
<script type="text/JavaScript">
    $(document).ready(function() {
        $('.edit').editable('whereever');
    });
    </script>

I have the jeditable.js file in a folder called js amongs my templates Now I include

<div class="edit" id="div_1">Edit me</div>

in my site (body) and nothing happens

I am also loading jquery

<script src="https://ajax.googleapis.com
/ajax/libs/jquery/1.11.2/jquery.min.js">  
</script>

what am I doing wrong? f

further test: As suggested I modified the jquery statement to

<script type="text/JavaScript">
    $(document).ready(function() {
        console.log("hello!");
        $('.edit').editable('whereever');
    });
    </script>

but the hello output never appears in the console...

just in case there are conflicts between different .js files (if that exists) here is the entire set of js files I include

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
        <!-- Latest compiled and minified JavaScript -->
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.js"></script>
<!-- Latest compiled and minified Locales -->
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/locale/bootstrap-table.min.js"></script>
<script src="../static/js/bootstrap.min.js"></script>

<script type="text/JavaScript" src="js/jquery.jeditable.js"></script>
<script type="text/JavaScript">
    $(document).ready(function() {
        console.log("hello!");
        $('.edit').editable('whereever');
    });
</script>

<script type="text/x-mathjax-config">
        MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$']]}});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
0

There are 0 answers