Im not quite sure what to search for to sort out this problem.
I am getting syntax error with the following code because i have 2 (no idea what to call them) in the .sortable options. Would you be able to tell me what i have done wrong with this code?
Im using a placeholder and also a connectWith from this page http://jqueryui.com/demos/sortable/#portlets and there doesnt seem to be any examples showing how to write both of them at the same time.
The syntax error is not there when i comment out
placeholder: "placeholder-highlighting"
or
connectWith: ".sortable-content"
My code is below:
$(function() {
$( ".sortable-content" ).sortable({
placeholder: "placeholder-highlighting"
connectWith: ".sortable-content"
});
$( ".sortable" ).disableSelection();
});
Bonus points for telling me what they are called!
They are called options. You are calling the "sortable" method and then saying "use these options instead of the default options (if there are any)".
ReplyDeleteYou need to put a comma between each option!
$(function() {
$( ".sortable-content" ).sortable({
placeholder: "placeholder-highlighting",
connectWith: ".sortable-content"
});
$( ".sortable" ).disableSelection();
});