March 8, 2012
resizable on text area element not working
Question by Goldy
i have started to learning Jquery and i can’t activate the resizable function.
i downloaded the core Jquery and the UI.
all working well, the animate,scroll,effects and more
BUT the resizable functions kinda stack and i have no idea why.
i have been marked the resizable pack and check if the UI have it and its have.
i try to activate it in safari , chrome ,ff on the latest versions .
<script type="text/javascript" src="../scripts/Jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../scripts/Jquery/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
/*not working , we need to check why its not readable.*/
$('p').resizable('enable');
$('textarea').resizable({
handles: "se",
grid : [20, 20],
minWidth :153,
minHeight :100,
maxHeight :200,
containment: 'parent'
});
});
</script>
Answer by Ngalam City
if you’ve loaded all ??
try it :
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#resizable { width: 100px; height: 100px; background: silver; }
</style>
<script>
$(document).ready(function() {
$("#resizable").resizable();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="resizable"></div>
</body>
</html>