Entries Tagged 'Mootools' ↓

Mootools Sortables Clone Not Under Mouse Pointer

When running mootools sortables, when dragging the cloned element around sometimes the cloned element is offset from the mouse pointer. There is a simple method to avoid this. See the enclosing container to position relative. Like so

<ul style=”position:relative”>
<li>sortable</li>
<li>sortable</li>
<li>sortable</li>
<li>sortable</li>
<li>sortable</li>
</ul>

and that’s it.

MooTools Form Request Resets/Reverts Value in Inputs

Mootools Form.Request will automatically reset a form on submission. To prevent this you must turn on the resetForm: options to false. That would look like this:

var formRequest = new Form.Request($(‘myFormID’), $(‘myTargetDivToLoadRequest’), {
resetForm: false
});