Re: [jQuery] find mouse cooridate?

2007-01-02 Thread xmrcivicboix

Wow this forum rocks! such great help! Glad I made a switch from mootools!
Thanks again guys it worked!



wycats wrote:
> 
> I think pageX would be the appropriate method, not clientX. Are you
> looking
> for the mouse position relative to the page or relative to the element in
> question?
> 
> -- Yehuda
> 
> On 1/2/07, xmrcivicboix <[EMAIL PROTECTED]> wrote:
>>
>>
>> hi guys,
>>
>> I'm trying to find the mouse coordinate whenever I right click but it I
>> just
>> can't get passed this point. Here is my code:
>>
>> begin: function(){
>> var selectors = $("[EMAIL PROTECTED]");
>>
>> $.each(selectors, function(i) {
>> $(selectors[i]).bind("contextmenu", function() {
>>
>> eip.mouse(window.event); // THIS IS WHERE
>> I'M STUCK
>> });
>>
>> return true;
>> });
>> },
>>
>> mouse: function(evt){
>> alert(
>> "clientX value: " + evt.clientX + "\n" +
>> "clientY value: " + evt.clientY + "\n"
>> );
>> },
>> --
>> View this message in context:
>> http://www.nabble.com/find-mouse-cooridate--tf2908997.html#a8127350
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
> 
> 
> 
> -- 
> Yehuda Katz
> Web Developer | Wycats Designs
> (ph)  718.877.1325
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/find-mouse-cooridate--tf2908997.html#a8127849
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] find mouse cooridate?

2007-01-02 Thread Yehuda Katz

There's a browser issue here. IE supports window.event, while FF requires
event. jQuery works around this by accepting an "e" parameter to event
handlers, which will always return the event object.

begin: function(){
  var selectors = $("[EMAIL PROTECTED]");

  $.each(selectors, function(i) {
  $(selectors[i]).bind("contextmenu", function(e) {

  eip.mouse(e); // THIS IS WHERE I'M STUCK
  });

  return true;
  });
  },

mouse: function(evt){
  alert(
  "clientX value: " + evt.clientX + "\n" +
  "clientY value: " + evt.clientY + "\n"
  );
  },


On 1/2/07, bmsterling <[EMAIL PROTECTED]> wrote:



I use "event" not "window.event" and works fine.
--
View this message in context:
http://www.nabble.com/find-mouse-cooridate--tf2908997.html#a8127498
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] find mouse cooridate?

2007-01-02 Thread Yehuda Katz

I think pageX would be the appropriate method, not clientX. Are you looking
for the mouse position relative to the page or relative to the element in
question?

-- Yehuda

On 1/2/07, xmrcivicboix <[EMAIL PROTECTED]> wrote:



hi guys,

I'm trying to find the mouse coordinate whenever I right click but it I
just
can't get passed this point. Here is my code:

begin: function(){
var selectors = $("[EMAIL PROTECTED]");

$.each(selectors, function(i) {
$(selectors[i]).bind("contextmenu", function() {

eip.mouse(window.event); // THIS IS WHERE
I'M STUCK
});

return true;
});
},

mouse: function(evt){
alert(
"clientX value: " + evt.clientX + "\n" +
"clientY value: " + evt.clientY + "\n"
);
},
--
View this message in context:
http://www.nabble.com/find-mouse-cooridate--tf2908997.html#a8127350
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] find mouse cooridate?

2007-01-02 Thread bmsterling

I use "event" not "window.event" and works fine.
-- 
View this message in context: 
http://www.nabble.com/find-mouse-cooridate--tf2908997.html#a8127498
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] find mouse cooridate?

2007-01-02 Thread xmrcivicboix

hi guys,

I'm trying to find the mouse coordinate whenever I right click but it I just
can't get passed this point. Here is my code:

begin: function(){
var selectors = $("[EMAIL PROTECTED]");

$.each(selectors, function(i) {
$(selectors[i]).bind("contextmenu", function() { 

eip.mouse(window.event); // THIS IS WHERE I'M 
STUCK
});

return true;
});
},

mouse: function(evt){
alert(
"clientX value: " + evt.clientX + "\n" +
"clientY value: " + evt.clientY + "\n"
);
},
-- 
View this message in context: 
http://www.nabble.com/find-mouse-cooridate--tf2908997.html#a8127350
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/