converting some jquery into scripty

Just a quick question is there an easy method to convert jQuery script over to scriptaculous script?

What I have is, I have finally finished creating the webyep longtext menu, and it uses a little bit of jQuery to track the mouse position and then make the menu appear after the users has highlighted the text… but ideally I need to supply two versions of the menu plugin… one in jQuery based for those users using that framework and the other version in scriptaculous based framework… I am not even sure if scriptaculous has the same functionality as I just dont use it… :o(
Here is the basic script I am using

 $(document).ready(function() {
  var mouseX = 0;
  var mouseY = 0;
  $("#mytext").mousemove(function(e) {
  // track mouse position
  mouseX = e.pageX;
  mouseY = e.pageY;
  });
  $("#mytext").mousedown(function() {
  $("#menu").fadeOut("1000");
  });
  // get the mouse position and show the menu
  $("#mytext").select(function() {
  if ($('#news').attr('checked'))
  $("#menu").css("top", mouseY - 30).css("left", mouseX + 10).show().fadeIn("1000");
  });
  // Begining of webyep popup menu buttons //
  
  // 1 wrap selected text in a WebyYep tag //
  $("#bold").click(function() {
  	formatText(document.getElementById('mytext'),'<BOLD ','>')
  		$("#menu").fadeOut("1000");
  });
  //End of webyep popup menu buttons// 	
  });

I have a pure bit of javascript to place the correct formating around the chosen text which works fine, but its the effects and mouse positioning that is the problem part?
Does anyone know how to do this in scriptaculous framework?

cheers for any help
max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Give this a try. I wasn’t sure about your formatText function, where
is that defined? Also, there’s no equivalent to the jQuery
select(callback) function, so I cheated and observed mouseup over that
field. You could add a test for the selected text (look at my Lookup
page for an example of getting a text selection in a cross-browser
manner) if that proves to be a requirement.

Walter

On Feb 14, 2011, at 12:01 PM, max wrote:

Just a quick question is there an easy method to convert jQuery
script over to scriptaculous script?

What I have is, I have finally finished creating the webyep longtext
menu, and it uses a little bit of jQuery to track the mouse position
and then make the menu appear after the users has highlighted the
text… but ideally I need to supply two versions of the menu
plugin… one in jQuery based for those users using that framework
and the other version in scriptaculous based framework… I am not
even sure if scriptaculous has the same functionality as I just dont
use it… :o(
Here is the basic script I am using

$(document).ready(function() {
 var mouseX = 0;
 var mouseY = 0;
 $("#mytext").mousemove(function(e) {
 // track mouse position
 mouseX = e.pageX;
 mouseY = e.pageY;
 });
 $("#mytext").mousedown(function() {
 $("#menu").fadeOut("1000");
 });
 // get the mouse position and show the menu
 $("#mytext").select(function() {
 if ($('#news').attr('checked'))
 $("#menu").css("top", mouseY - 30).css("left", mouseX +  

10).show().fadeIn(“1000”);
});
// Begining of webyep popup menu buttons //

 // 1 wrap selected text in a WebyYep tag //
 $("#bold").click(function() {
 	formatText(document.getElementById('mytext'),'<BOLD ','>')
 		$("#menu").fadeOut("1000");
 });
 //End of webyep popup menu buttons// 	
 });

I have a pure bit of javascript to place the correct formating
around the chosen text which works fine, but its the effects and
mouse positioning that is the problem part?
Does anyone know how to do this in scriptaculous framework?

cheers for any help
max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hello Walt.

I am soooo stuck… on a very simple task it seems… I am woking with 5.5. Can you forward me the instructions on how to do this.

Thanks for your help and patience.

Karen Thomas

This message is intended only for the use of the addressee and may contain information that is both privileged and confidential. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Any images are copyright 2011 Karen Thomas Designs, until release is obtained.

On Feb 14, 2011, at 12:35 PM, Walter Lee Davis wrote:

Give this a try. I wasn’t sure about your formatText function, where is that defined? Also, there’s no equivalent to the jQuery select(callback) function, so I cheated and observed mouseup over that field. You could add a test for the selected text (look at my Lookup page for an example of getting a text selection in a cross-browser manner) if that proves to be a requirement.

https://gist.github.com/826216

Walter

On Feb 14, 2011, at 12:01 PM, max wrote:

Just a quick question is there an easy method to convert jQuery script over to scriptaculous script?

What I have is, I have finally finished creating the webyep longtext menu, and it uses a little bit of jQuery to track the mouse position and then make the menu appear after the users has highlighted the text… but ideally I need to supply two versions of the menu plugin… one in jQuery based for those users using that framework and the other version in scriptaculous based framework… I am not even sure if scriptaculous has the same functionality as I just dont use it… :o(
Here is the basic script I am using

$(document).ready(function() {
var mouseX = 0;
var mouseY = 0;
$(“#mytext”).mousemove(function(e) {
// track mouse position
mouseX = e.pageX;
mouseY = e.pageY;
});
$(“#mytext”).mousedown(function() {
$(“#menu”).fadeOut(“1000”);
});
// get the mouse position and show the menu
$(“#mytext”).select(function() {
if ($(‘#news’).attr(‘checked’))
$(“#menu”).css(“top”, mouseY - 30).css(“left”, mouseX + 10).show().fadeIn(“1000”);
});
// Begining of webyep popup menu buttons //

// 1 wrap selected text in a WebyYep tag //
$("#bold").click(function() {
	formatText(document.getElementById('mytext'),'<BOLD ','>')
		$("#menu").fadeOut("1000");
});
//End of webyep popup menu buttons// 	
});

I have a pure bit of javascript to place the correct formating around the chosen text which works fine, but its the effects and mouse positioning that is the problem part?
Does anyone know how to do this in scriptaculous framework?

cheers for any help
max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hello Walt.

I am soooo stuck… on a very simple task it seems… I am woking with 5.5. Can you forward me the instructions on how to do this.

Thanks for your help and patience.

Karen Thomas

www.ccacres.com

This message is intended only for the use of the addressee and may contain information that is both privileged and confidential. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Any images are copyright 2011 Karen Thomas Designs, until release is obtained.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry, was this in response to Max’s question about jQuery somehow?

Could you please start a new thread, post a link to the page where you
are trying to create your effect, and a specific question about what
you’ve tried and where it’s gone off the rails? I’m happy to help, but
I am not a psychic, sadly.

Walter

On Feb 14, 2011, at 1:06 PM, Karen Thomas wrote:

Hello Walt.

I am soooo stuck… on a very simple task it seems… I am woking
with 5.5. Can you forward me the instructions on how to do this.

Thanks for your help and patience.

Karen Thomas

www.ccacres.com

This message is intended only for the use of the addressee and may
contain information that is both privileged and confidential. If
you are not the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you
have received this communication in error, please erase all copies
of the message and its attachments and notify us immediately. Any
images are copyright 2011 Karen Thomas Designs, until release is
obtained.

On Feb 14, 2011, at 12:35 PM, Walter Lee Davis wrote:

Give this a try. I wasn’t sure about your formatText function,
where is that defined? Also, there’s no equivalent to the jQuery
select(callback) function, so I cheated and observed mouseup over
that field. You could add a test for the selected text (look at my
Lookup page for an example of getting a text selection in a cross-
browser manner) if that proves to be a requirement.

https://gist.github.com/826216

Walter

On Feb 14, 2011, at 12:01 PM, max wrote:

Just a quick question is there an easy method to convert jQuery
script over to scriptaculous script?

What I have is, I have finally finished creating the webyep
longtext menu, and it uses a little bit of jQuery to track the
mouse position and then make the menu appear after the users has
highlighted the text… but ideally I need to supply two versions
of the menu plugin… one in jQuery based for those users using
that framework and the other version in scriptaculous based
framework… I am not even sure if scriptaculous has the same
functionality as I just dont use it… :o(
Here is the basic script I am using

$(document).ready(function() {
var mouseX = 0;
var mouseY = 0;
$(“#mytext”).mousemove(function(e) {
// track mouse position
mouseX = e.pageX;
mouseY = e.pageY;
});
$(“#mytext”).mousedown(function() {
$(“#menu”).fadeOut(“1000”);
});
// get the mouse position and show the menu
$(“#mytext”).select(function() {
if ($(‘#news’).attr(‘checked’))
$(“#menu”).css(“top”, mouseY - 30).css(“left”, mouseX +
10).show().fadeIn(“1000”);
});
// Begining of webyep popup menu buttons //

// 1 wrap selected text in a WebyYep tag //
$(“#bold”).click(function() {
formatText(document.getElementById(‘mytext’),‘<BOLD ‘,’>’)
$(“#menu”).fadeOut(“1000”);
});
//End of webyep popup menu buttons//
});

I have a pure bit of javascript to place the correct formating
around the chosen text which works fine, but its the effects and
mouse positioning that is the problem part?
Does anyone know how to do this in scriptaculous framework?

cheers for any help
max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

hahahaaaa… I see… :slight_smile: so sorry…

I posted last night on freeway talk and have not had a response.

I need to have an image enlarge while mousing over.

Karen Thomas

This message is intended only for the use of the addressee and may contain information that is both privileged and confidential. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Any images are copyright 2011 Karen Thomas Designs, until release is obtained.

On Feb 14, 2011, at 1:33 PM, Walter Lee Davis wrote:

Sorry, was this in response to Max’s question about jQuery somehow?

Could you please start a new thread, post a link to the page where you are trying to create your effect, and a specific question about what you’ve tried and where it’s gone off the rails? I’m happy to help, but I am not a psychic, sadly.

Walter

On Feb 14, 2011, at 1:06 PM, Karen Thomas wrote:

Hello Walt.

I am soooo stuck… on a very simple task it seems… I am woking with 5.5. Can you forward me the instructions on how to do this.

Thanks for your help and patience.

Karen Thomas

www.ccacres.com

This message is intended only for the use of the addressee and may contain information that is both privileged and confidential. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Any images are copyright 2011 Karen Thomas Designs, until release is obtained.

On Feb 14, 2011, at 12:35 PM, Walter Lee Davis wrote:

Give this a try. I wasn’t sure about your formatText function, where is that defined? Also, there’s no equivalent to the jQuery select(callback) function, so I cheated and observed mouseup over that field. You could add a test for the selected text (look at my Lookup page for an example of getting a text selection in a cross-browser manner) if that proves to be a requirement.

https://gist.github.com/826216

Walter

On Feb 14, 2011, at 12:01 PM, max wrote:

Just a quick question is there an easy method to convert jQuery script over to scriptaculous script?

What I have is, I have finally finished creating the webyep longtext menu, and it uses a little bit of jQuery to track the mouse position and then make the menu appear after the users has highlighted the text… but ideally I need to supply two versions of the menu plugin… one in jQuery based for those users using that framework and the other version in scriptaculous based framework… I am not even sure if scriptaculous has the same functionality as I just dont use it… :o(
Here is the basic script I am using

$(document).ready(function() {
var mouseX = 0;
var mouseY = 0;
$(“#mytext”).mousemove(function(e) {
// track mouse position
mouseX = e.pageX;
mouseY = e.pageY;
});
$(“#mytext”).mousedown(function() {
$(“#menu”).fadeOut(“1000”);
});
// get the mouse position and show the menu
$(“#mytext”).select(function() {
if ($(‘#news’).attr(‘checked’))
$(“#menu”).css(“top”, mouseY - 30).css(“left”, mouseX + 10).show().fadeIn(“1000”);
});
// Begining of webyep popup menu buttons //

// 1 wrap selected text in a WebyYep tag //
$(“#bold”).click(function() {
formatText(document.getElementById(‘mytext’),‘<BOLD ‘,’>’)
$(“#menu”).fadeOut(“1000”);
});
//End of webyep popup menu buttons//
});

I have a pure bit of javascript to place the correct formating around the chosen text which works fine, but its the effects and mouse positioning that is the problem part?
Does anyone know how to do this in scriptaculous framework?

cheers for any help
max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Dave replied to that thread last night, and posted an example to his
server, too. You should have a look.

Walter

On Feb 14, 2011, at 1:35 PM, Karen Thomas wrote:

I posted last night on freeway talk and have not had a response.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks walter… this is more than I could have hoped for.
The format text is defined in another pure bit of javascript which replaced the jQuery plugin version (which just didn’t work correctly)

I didn’t think there was a select(callback) function but the mouseup should be fine because I use a checkbox to activate menu… so if people, are just copying bits of text the menu wont appear but if they click on the checkbox then the menu is activated… I will have a go with what you have given me and I will come back to you if I have some problems.

again thanks
byyyee 4 now

max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m interested in this function also! Were can I find this information?

On Feb 15, 2011, at 10:35 AM, max wrote:

Thanks walter… this is more than I could have hoped for.
The format text is defined in another pure bit of javascript which replaced the jQuery plugin version (which just didn’t work correctly)

I didn’t think there was a select(callback) function but the mouseup should be fine because I use a checkbox to activate menu… so if people, are just copying bits of text the menu wont appear but if they click on the checkbox then the menu is activated… I will have a go with what you have given me and I will come back to you if I have some problems.

again thanks
byyyee 4 now

max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I read about the select(callback) function at the jQuery site.
Basically, it’s an event listener that fires whenever the target has a
text selection. It only works on the content of text input (form)
fields, or maybe textareas (not sure, I skimmed). The callback
function receives the calling element, and probably the text content
of the current selection (again, I skimmed).

I wrote something last year that gets a selection from any part of the
page, so you can use it outside of the context of a form field:

http://scripty.walterdavisstudio.com/lookup

Mine is Prototype-based, naturally, so it works within Freeway.

Walter

On Feb 15, 2011, at 10:52 AM, Dan Baker wrote:

I’m interested in this function also! Were can I find this
information?

On Feb 15, 2011, at 10:35 AM, max wrote:

Thanks walter… this is more than I could have hoped for.
The format text is defined in another pure bit of javascript which
replaced the jQuery plugin version (which just didn’t work correctly)

I didn’t think there was a select(callback) function but the
mouseup should be fine because I use a checkbox to activate menu…
so if people, are just copying bits of text the menu wont appear
but if they click on the checkbox then the menu is activated… I
will have a go with what you have given me and I will come back to
you if I have some problems.

again thanks
byyyee 4 now

max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Did you ever get a reply to this? I am curious what type of code that would be.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I don’t recall ever receiving one myself. Maybe someone else knows.

On Apr 19, 2011, at 9:15 PM, D-Sand wrote:

Did you ever get a reply to this? I am curious what type of code that would be.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Did you miss this one? (replying to my own reply back in February to
bring it back up to the top of the thread)

Walter

On Feb 15, 2011, at 11:21 AM, Walter Lee Davis wrote:

I read about the select(callback) function at the jQuery site.
Basically, it’s an event listener that fires whenever the target has
a text selection. It only works on the content of text input (form)
fields, or maybe textareas (not sure, I skimmed). The callback
function receives the calling element, and probably the text content
of the current selection (again, I skimmed).

I wrote something last year that gets a selection from any part of
the page, so you can use it outside of the context of a form field:

http://scripty.walterdavisstudio.com/lookup

Mine is Prototype-based, naturally, so it works within Freeway.

Walter

On Feb 15, 2011, at 10:52 AM, Dan Baker wrote:

I’m interested in this function also! Were can I find this
information?

On Feb 15, 2011, at 10:35 AM, max wrote:

Thanks walter… this is more than I could have hoped for.
The format text is defined in another pure bit of javascript which
replaced the jQuery plugin version (which just didn’t work
correctly)

I didn’t think there was a select(callback) function but the
mouseup should be fine because I use a checkbox to activate
menu… so if people, are just copying bits of text the menu wont
appear but if they click on the checkbox then the menu is
activated… I will have a go with what you have given me and I
will come back to you if I have some problems.

again thanks
byyyee 4 now

max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The reply is here

http://freewaytalk.net/thread/view/85522#m_85539

D


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter
Thanks for this
its been some weeks since I could devote time to this part of the webyep project (work has taken president over projects) but I hope to come back to it very very soon… so if I don’t get very far with the jquery to scripty conversion, then like the old saying goes… I will be back!!!

Max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options