Reputation: 536
I am calling a function which consist of jQuery code to make the div resizable. the resizable functions work correctly for first time.but it doesn't work for second and next time. I added alert to that function to check the call of function.Function calls but the resizable doesn't work.Why is that happening?And what is the solution? the code is here:
function rezDesc() {
alert('resize');
$(function () {
$("#placeDescHere").resizable({
ghost: true,
alsoResize: '#LabelDesc',
handles: " e, s"
});
});
}
Upvotes: 0
Views: 1124
Reputation: 337560
The inner function block is not required.
function rezDesc()
{
alert('resizze');
$( "#placeDescHere" ).resizable({
ghost: true,
alsoResize:'#LabelDesc',
handles: " e, s"
});
}
Upvotes: 1
Reputation: 339786
Take the inner function call out of its $(function() { ... })
block.
function rezDesc()
{
alert('resizze');
$("#placeDescHere" ).resizable({
ghost: true,
alsoResize:'#LabelDesc',
handles: " e, s"
});
}
Upvotes: 1