Where to append the puzzle pieces By default the list will be appended to the pieces container If this option is provided, createPiecesContainer will not be invoked
Add the background to the slots
Css classes to use.
Update this option will reconstruct the markup and the progress will be lost.
Class for the wrapper when the backgroundInSlots option is true
Class for the wrapper and the root element for when the puzzle is completed
Class for the disabled state
Class for the wrapper when the feedbackOnHover option is true
Class for the pieces
Class for the piece when has been dropped or is hover a correct slot
Class for the disabled pieces
Class for the piece when has been dropped or is hover an incorrect slot
Class for the pieces container
Root element
Class for the slots
Class for the slot when the correct piece is hover or has been dropped
Class for the disabled slots
Class for the slots when have a piece placed
Class for the slot when the incorrect piece is hover or has been dropped
Class for the slots container
Class for the wrapper
Num of columns for the puzzle. Update this option will reconstruct the markup and the progress will be lost
Disable the widget
Add the feedback class to the piece when is above the correct or incorrect slot
Initial height of the image. If it's provided, will be used for the initialization instead of wait for the image to be loaded
Number of pieces to resolve from the beginning
Namespace for events. Update this option will reconstruct the markup and the progress will be lost
If true, the pieces only could be dropped in the correct slots. If the piece is dropped in an incorrect slot, will be reverted to the previous position
Randomize the starting position of the pieces
Num of rows for the puzzle. Update this option will reconstruct the markup and the progress will be lost
Initial width of the image. If it's provided, will be used for the initialization instead of wait for the image to be loaded
Override the default creation of each piece. The piece is the draggable item of the puzzle
Override the default creation of the pieces container
Override the default creation of each slot. The slot is where the piece of the puzzle could be dropped
Override the default creation of the slots container The slots container will be appended to the wrapper
Override the default creation of the wrapper
Generated using TypeDoc
Options for the plugin
All the options could be updated using the jquery ui widget method
Please note, when some options are updated, the markup of the widget is re-created and the progress of the puzzle will be lost.
For example
$("someSelector").snapPuzzle("option","rows",4);
For multiple options Because set options could reconstruct the component, if more that one option will be provided, pass an object instead of key-value
Multiple options
$("someSelector").snapPuzzle("option",{ columns:4, rows:2, backgroundInSlots:false });