[Webinar] Streamline your web hosting managementRegister Today


Know which handle was used for resizable

Posted on 2010-03-23
Medium Priority
Last Modified: 2012-05-09
I have an area that is using jQuery's .resizable();

The handles are e,se,s.

I have different functions I need to perform based on the which handle was used for resizing. I tried the browser event object by using event.target but it returns the element being resized, not the handle.

Does any one have any ideas of how to know which handle is being used?

Thanks is advance!
Question by:Shaye Larsen
LVL 82

Accepted Solution

hielo earned 2000 total points
ID: 28359644

<!DOCTYPE html>
  <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.4/jquery.min.js"></script>
	<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> -->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
	<style type="text/css">
    #resizable { width: 100px; height: 100px; background: beige; }
  $(document).ready(function() {
  	var options={	handles: 'e,se,s'
				,start: function(event, ui) {
					var handle=$(this).css("cursor").split("-")[0];
					$("#handleName").html("Handle: "+handle); 
<body style="font-size:62.5%;">
<div id="resizable"></div>
<div id="handleName"></div>

Open in new window


Author Closing Comment

by:Shaye Larsen
ID: 31706021
Great thinking to use the cursor name! Wonderful solution, thanks!

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

611 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question