Getting values from inline javascript

Hello Experts,

I am using the smoothZoom plugin. Below is an example of one list item.
I wounder if this is possible to get the values using jQuery e.g. the x value and the y value.
I need to get these values and use it in another script. Is it possible ? I know how to get values through classes and attributes but not like this. Thanks!

<li onmouseover="$('#plan').smoothZoom('focusTo', {x:876, y:1056, zoom:100, speed:10})">Point 1</li>

Open in new window

RefaelAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hieloCommented:
Exactly where is the plugin documented?  The one at https://github.com/kthornbloom/Smoothzoom has no 'focusTo' option.
RefaelAuthor Commented:
Hielo Hi. My script is not a slideshow plugin!
and my question was only how to access these values written in the page as shown in my script.
Julian HansenCommented:
If you simply want to pull the values from the jquery string in the onmouseover attribute this should do the trick
<!doctype html>
<html>
<head>
<title>Test</title>
</head>
<body>
<li id="target" onmouseover="$('#plan').smoothZoom('focusTo', {x:876, y:1056, zoom:100, speed:10})">Bing</li><br/>
Click anywhere on the document to extract the coordinates
<div id="result">
</div>
<script src="http://code.jquery.com/jquery.js"></script>

<script type="text/javascript">
$(function() {
  $('body').click(function() {
    var text = $('#target').attr('onmouseover');
    var pattern = /.*x:(\d+)?.*y:(\d+)/gi;
    var res = pattern.exec(text);
	$('#result').html('Result: x=' + res[1] + ' and y=' + res[2]);
  });
});
</script>

</body>
</html>

Open in new window

Working sample here

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RefaelAuthor Commented:
Julian Hansen perfect!  Exactly what i was looking for :-)) Thank you!
Julian HansenCommented:
You are welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.