Hi, I'm trying to understand how to do this. Unfortunatly my jS/jQuery is a very limited but I am learning. I've just hit a snag because I'm trying to learn how to disable an active function.
I have this function, I would like to be able to disable it when I click on a button. Do I name the function then unbind it? And if I unbind it can I rebind it? I'm sorta just trying to get the concept down. Could I also do it with an if statement? I think that'd be slightly more complicated. I'm trying to learn how to name functions and enable/disable them atm. Not sure if $(function myFunction() { }); is the valid way of writing that.
- $(function () {
$( "#zone1, #zone2, #zone3" ).droppable({
accept: "#DW1",
drop: function( event, ui ) {
ui.draggable.animate({height:"332px"});
$("#DW1box").animate({height:"298px"});
}
});
$( "#zone4, #zone5, #zone6" ).droppable({
accept: "#DW1",
drop: function( event, ui ) {
ui.draggable.animate({height:"182px"});
$("#DW1box").animate({height:"148px"});
}
});
$( "#zone7, #zone8, #zone9" ).droppable({
accept: "#DW1",
drop: function( event, ui ) {
ui.draggable.animate({height:"122px"});
$("#DW1box").animate({height:"88px"});
}
});
});
Anyhow thanks for reading :) Sorry for the simple questions, hope they are ok here.