• I am creating a plugin which has settings for users to modify in their dashboard. One of these settings pages needs to contain a list of items which I would like to be sorted using jQuery’s drag and drop sort feature. My first attempt at getting this to work was a completely failure, resulting in me messing up the dashboard entirely. Can someone please point me in the right direction for this?

    Here is what I need in a bit more detail incase it’s of use:

    [Link 1] [Link 2] [Link 3] [+]

    The links above displayed inline like that which are grabbed from some storage place (mysql database?). Users can drag and drop them to sort them, or press the [+] button to add a new one. When the user is done, somehow the order is saved.

    I don’t even know where to start here, so any help would be appreciated!

    SIDE NOTE: I can’t even figure out how to correctly call a javascript file. I called a stylesheet like this: (I think this is correct?)
    wp_enqueue_style('my-plugin-css', plugins_url('style.css',__FILE__));

    But calling javascript files like this isn’t working:
    wp_enqueue_script('my-plugin-js', plugins_url('functions.js',__FILE__));

Viewing 1 replies (of 1 total)
  • Thread Starter cdenk

    (@cdenk)

    All I really need now is to know how to use the wp_enqueue_script function. I can get it to show my javascript link in the head, but my functions don’t work. Echoing the link in the body does work, however, so this is what I’m currently doing.

Viewing 1 replies (of 1 total)
  • The topic ‘Help with jQuery’ is closed to new replies.