Help with jQuery
-
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__));
- The topic ‘Help with jQuery’ is closed to new replies.