The pastebin link may help if my wording doesn’t. I basically have a site that contains a bunch of custom sortables. Although the user can remove them no problem – they can never add them.
Any time a sortable needs to be added to the site I have to write up a set of identical parameters and the only thing that changes is the ID number (you can see the example in my pastebin).
How could I set this up as a loop instead of some 2000 line javascript file that contains X amount of identical blocks.
You could supply an array of the IDs necessary from the database with PHP and get an AJAX routine to bring this back as a JSON array, then iterate over that.
The jQuery could then be as follows: (I’m not sure how you use your routines)