[jQuery] Re: show/hide based on list selection

2007-10-17 Thread Karl Swedberg
Belinda, you can also use the .change() method on the   
element if you want (the part you commented out was just fine).  Then  
you can either get the selected option's value like this ...


q(this).text()

or its text like this ...

q(':selected',this).text()

As Olaf mentioned, the real problem was that you were trying to find q 
('input[name=sweets]') when you should have been using q('select 
[name=sweets]')



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Oct 17, 2007, at 8:54 PM, Olaf Bosch wrote:



Belinda M. Giardine schrieb:
I have found this question in the archives and set up a test page  
based on the responses I have found.  But for me it is not  
working, the section is hidden and doesn't reappear no matter what  
is selected.  I have tried several different browsers.  The real  
task is on a more complex page, I am just trying to get the simple  
test to work first.


and here the full function:

q(document).ready(function(){
  q("div.subSection").hide();
  q("option").click (function() {
var opt = q(this).text();
alert (opt);   // delete this row
if (opt == "Cookie") {
  q("div.subSection").show();
} else {
  q("div.subSection").hide();
}
  });
});


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---




[jQuery] Re: Self-directed Animations

2007-10-17 Thread John Resig

see:
http://docs.jquery.com/Release:jQuery_1.2/Effects#Extensible_Animations

It sounds like that might solve the issue for you.

--John

On 10/17/07, oravecz <[EMAIL PROTECTED]> wrote:
>
> It's fine that jQuery has all of these great built-in animation
> routines, but I have a situation where I want to control the objects
> in a way that goes beyond property changes over time.
>
> Is there a way to take advantage of jQuery's timer pooling and easing
> code while performing the animation steps myself? I would envision a
> callback mechanism that animate() invokes at each step passing in the
> context and state that the fx function handles now.
>
> I'm using the 1.1.4 codebase, but I can switch to 1.2 if this feature
> is in there. Based on the updated docs, I don't think there is this
> capability in there now. Plugins perhaps?
>
> Thanks,
> jim
>
>


[jQuery] Self-directed Animations

2007-10-17 Thread oravecz

It's fine that jQuery has all of these great built-in animation
routines, but I have a situation where I want to control the objects
in a way that goes beyond property changes over time.

Is there a way to take advantage of jQuery's timer pooling and easing
code while performing the animation steps myself? I would envision a
callback mechanism that animate() invokes at each step passing in the
context and state that the fx function handles now.

I'm using the 1.1.4 codebase, but I can switch to 1.2 if this feature
is in there. Based on the updated docs, I don't think there is this
capability in there now. Plugins perhaps?

Thanks,
jim



[jQuery] Re: if's 'n else's

2007-10-17 Thread Shmax

Well, that seems to work, for now, though I'm still puzzled. Thanks
much!


On Oct 17, 5:20 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> It looks like the .load ajax will still fire even if the selector returns an
> empty result.  Not sure why that is exactly, but you can easily work around
> it like so:
>
> if ( $("#appendMe").size() ) {
> $("#appendMe").load( etc. );
>
> }
>
> -- Josh
>
>
>
> - Original Message -
> From: "Shmax" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Wednesday, October 17, 2007 4:55 PM
> Subject: [jQuery] if's 'n else's
>
> > I'm just not getting it. My web pages are generally generated
> > dynamically. To get specific, I'm using jQuery/Ajax to make a category
> > selector widget, just like the one you use on eBay to sell stuff.
> > Here's what it looks like in a basic, test environment:
> >http://www.shmax.com/pick_cat
>
> > So far so good.
>
> > Here's what gets called when the document finishes loading:
>
> > $(document).ready(function(){
> >   AttachCatPicker();
>
> >   $("#appendMe").load( "/include/record_selector.php",  { cat_id: 1,
> > action: "choose_cat" }, AttachCatPicker );
> > });
>
> > Also well and good. The page loads, the  with id "appendMe" is
> > found, my server side php is invoked, outputs the html for the select
> > widgets, and everything is fine.
>
> > The problem is that the "load" seems to get called whether "appendMe"
> > is found or not. In other words, even pages that don't have the
> > "appendMe" div on it are calling "load", invoking my php code for
> > populating the select boxes, and so on. What the heck is going on? I
> > thought that doing $("appendMe").load is saying "find me all nodes in
> > the DOM with an id of 'appendMe', and for each one fill it with the
> > contents generated by record_selector.php".
>
> > Do I have that totally wrong, or what?
>
> > Thanks much!
>
> > - shmax- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: Updating the id of an a tag

2007-10-17 Thread Bruce MacKay

Thanks Glen, for both the solution and useful tip.

Cheers,

Bruce


At 02:13 p.m. 17/10/2007, you wrote:

Instead of .id() try attr("id",yourStringHere)

One tip is to make your string in a variable right before it.
That way you can easily alert the string to see if its coming up correctly.

Glen

On 10/17/07, Bruce MacKay 
<[EMAIL PROTECTED]> wrote:

Hello folks,

I'm having problems with the following line of code

$("[EMAIL PROTECTED]'del_']").id("del_*" +pb+"_"+iA+"_ck");

in the function below.

What I'm trying to do is replace the id of the a tag from its 
existing id of 'del_'  to 'del_*x_y_ck', where x and y are the 
variables pb and iA.


I know pb and iA are being 'received' by the function - the 
querystring generated by the get statement is correct.


I'm sure this function has worked previously, so perhaps my problem 
is based in a version update of jQuery, but perhaps it was only 
working previously in my dreams.


Any help appreciated.

Cheers

Bruce

function editAppAsset(ej) {
var temp=new Array();
temp=ej.split('_');
var pb = temp[1];
var iA = temp[2];
$("#wrka").show();
$.get("scripts/ajax_ramosus 
_editor.asp?id=16b&pblID="+pb+"&assetID="+iA +"&q="  + new 
Date().getTime(), function(responseText){

$("[EMAIL PROTECTED]'del_']").id("del_*"+pb+"_"+iA+"_ck");
var options = {dataType: 'json', before: showRequest, after: 
afterAppAsset};
$('#editor_form').submit(function() 
{$(this).ajaxSubmit(options);return false;});

});
};



[jQuery] Re: questions about jeditable plugin

2007-10-17 Thread [EMAIL PROTECTED]

Thanks.

On 10月17日, 下午6时04分, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> On Oct 17, 2007, at 4:55 AM, [EMAIL PROTECTED] wrote:
>
> > Sorry, I described before incomplete
> > 1, When using jeditable plugin, how to style the activated input field
> > or textarea field which is changed from editable text, specially for
> > the height of input. I can't see the code when the editable text
> > change to input field.
>
> * @param String  options[cssclass]  CSS class to apply to input form.  
> 'inherit' to copy from parent.
> * @param String  options[style] Style to apply to input form  
> 'inherit' to copy from parent.
>
> > 2, When using jeditable plugin, how to add validate to the activated
> > input field or textarea field for preventing some malicious people
> > empty the data.
>
> Best option would be to write custom input type which uses 3rd party  
> validation plugin. I try to find some time today to write an example  
> and post it here.
>
> --
> Mika Tuupolahttp://www.appelsiini.net/



[jQuery] Re: Stopping event propagation on non-standard event types

2007-10-17 Thread Jörn Zaefferer


Jonathan Sharp schrieb:
I'll take a shot at that as I've been using some custom events in 
components being built and it'd be a nice behavior to have. And allow 
for a decoupling of callbacks that we have with developers currently.
Gives me some interesting ideas for veto-based validation events. Think 
of an ajaxForm method that triggers a validation event and cancels the 
submit accordingly. Mike actually implemented something similar long ago 
in the form plugin, but I guess it lacked the decoupled model of custom 
events to get adopted.


Be sure to share your implementation!

-- Jörn


[jQuery] Re: [NEWS] Humanized Messages

2007-10-17 Thread Sean Catchpole

Very Cool.

~Sean


[jQuery] Re: creating drop down menus with JQuery?

2007-10-17 Thread [EMAIL PROTECTED]

To give you an update on this, I tried to exaggerate the effect, I put
-100 for both offsetX and offsetY,

$('ul.jd_menu').jdMenu({
offsetX: -100,
offsetY: -100,
activateDelay: 20,
hideDelay: 20
});

but it didn't seem to move the menu

http://groups.google.com/group/jquery-en/browse_thread/thread/4793fc4e34ebb5c1

 - Dave

On Oct 17, 1:22 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> Try passing in with your defaults (using either positive or negative
> numbers) and see if that helps at all.
> offsetX: 4,
> offsetY: 2,
>
> Cheers,
> -js
>
> On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I do.  It is
>
> >http://elearningrd.info/portal/test.php
>
> > - Dave
>
> > On Oct 17, 10:09 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > Do you have a URL of a sample page?
>
> > > -js
>
> > > On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > wrote:
>
> > > > I tried setting all the padding attributes in the jdMenu.slate.css
> > > > file to zero, but still no luck -- the menu appears away (to the
> > > > bottom and right) of the graphic).  On your web site, you mention the
> > > > plug-in supports relative positioning.  Is there an example somewhere
> > > > on the site?  I can just model my code off the example.
>
> > > > Thanks for your replies, - Dave
>
> > > > On Oct 17, 9:29 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > > > The menu positioning code uses absolute positioning. Try removing
> > the
> > > > > padding in CSS on the LI which should then make the menu appear
> > directly
> > > > > below the arrow.
>
> > > > > Cheers,
> > > > > -js
>
> > > > > On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > > Beautiful.  This may also be a non-jdMenu question but I'll throw
> > this
> > > > > > out there.  I want my drop-down menu to appear right beneath the
> > arrow
> > > > > > image, whereever the arrow may be positioned on the screen.  But
> > when
> > > > > > I insert the "relative" style in the  tag:
>
> > > > > >
> > > > > > > > > > > border="0"
> > > > > > align="middle" height="16" width="16" />
> > > > > >
> > > > > > > > > > > title="Edit
> > > > > > Module Title" class="editLink" href="#">Edit Module Title
>
> > > > > > > > > > > class="myspaceLink" href="#" title="Export MySpace HTML">Export
> > > > > > MySpace HTML
> > > > > >
> > > > > >
> > > > > >
>
> > > > > > The menu actually appears quite away (to the right and bottom) of
> > the
> > > > > > arrow.  It does this for both PC IE and Firefox, although I can't
> > tell
> > > > > > if the distances are the same.  Any advice for relatively lining
> > up
> > > > > > the menu directly beneath the image?
>
> > > > > > Thanks, - Dave
>
> > > > > > On Oct 16, 3:56 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > > > > > I think this is less of a jdMenu specific thing but you could do
> > > > > > something
> > > > > > > like the following:
>
> > > > > > > Assuming:
> > > > > > > 
> > > > > > > Text  > > > > > align="middle"
> > > > > > > height="16" width="16" />...
>
> > > > > > > $('ul.jd_menu > li').hover(function() {
> > > > > > > $('> img', this).attr('src', 'url-to-image.jpg');},
>
> > > > > > > function() {
> > > > > > > $('> img', this).attr('src', 'url-to-other-image.jpg');
>
> > > > > > > });
>
> > > > > > > -js
>
> > > > > > > On 10/16/07, [EMAIL PROTECTED] <
> > [EMAIL PROTECTED]>
> > > > > > wrote:
>
> > > > > > > > Thanks for this info.  Worked great.
>
> > > > > > > > One more small question.  To trigger the appearance of a
> > drop-down
> > > > > > > > menu, I have an image of an arrow
>
> > > > > > > >  > align="middle"
> > > > > > > > height="16" width="16" />
>
> > > > > > > > but when the user rolls over the image, I'd like the source of
> > the
> > > > > > > > image to change to something else to indicate the menu is
> > > > "active".
> > > > > > > > How do I do this with jdMenu?
>
> > > > > > > > - Dave
>
> > > > > > > > On Oct 16, 2:28 pm, "Jonathan Sharp" <[EMAIL PROTECTED]>
> > wrote:
> > > > > > > > > $('ul.jd_menu').jdMenu({
> > > > > > > > > activateDelay: 100
>
> > > > > > > > > });
>
> > > > > > > > > Should work, here are the other options:
> > > > > > > > > showDelay: 150 hideDelay: 550
>
> > > > > > > > > Sorry there isn't any documentation yet.
>
> > > > > > > > > -js
>
> > > > > > > > > On 10/16/07, [EMAIL PROTECTED] <
> > > > [EMAIL PROTECTED]>
> > > > > > > > wrote:
>
> > > > > > > > > > Hey Chris, Thanks for this recommendation.  One thing I'm
> > > > noticing
> > > > > > > > > > when playing with this is that when I roll over the item
> > that
> > > > is
> > > > > > > > > > supposed to tr

[jQuery] Re: show/hide based on list selection

2007-10-17 Thread Olaf Bosch


Belinda M. Giardine schrieb:
I have found this question in the archives and set up a test page based on 
the responses I have found.  But for me it is not working, the section is 
hidden and doesn't reappear no matter what is selected.  I have tried 
several different browsers.  The real task is on a more complex page, I am 
just trying to get the simple test to work first.


and here the full function:

q(document).ready(function(){
  q("div.subSection").hide();
  q("option").click (function() {
var opt = q(this).text();
alert (opt);   // delete this row
if (opt == "Cookie") {
  q("div.subSection").show();
} else {
  q("div.subSection").hide();
}
  });
});


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---


[jQuery] Re: continuous action while mouseover

2007-10-17 Thread Brian Cherne
Unfortunately, I have very little time this afternoon/evening (perhaps not
enough time to write a proper response)... but I'll try:

If the time between timeout calls is NOT important (ex: to update the
position of an element) then use setInterval. It basically acts like a
self-calling timeout, except that if the cpu is taxed the intervals can be
forced together. So a 13ms interval should fire at 13ms, 26ms, 39ms, etc...
but if the cpu/browser has other things to think about it may fire at 13ms,
38ms, 39ms... or something like that. If you're just updating the position
of something on screen it won't really matter because this will give you the
fastest response/update time. You should be able to find setInterval
examples anywhere on the internet.

A self-calling timeout acts like setInterval, except you're guaranteed some
separation between calls (because even if one is slightly delayed, the next
will always be #ms later). You would want to use this if the separation of
time is important (if you're doing some comparison between the previous
location and the current location, for instance). You can find a complex
example of this in the hoverIntent plug-in (look for the "compare"
function). The basic idea is that in the function your timeout calls, it
calls itself again if a certain condition is met. A simple example: (I
haven't written JavaScript in a while so someone may want to check if this
works)

var f = function(){
   /* do stuff */
   if ( something ) {
   t = setTimeout( f, 13 );
   }
};
var t = setTimeout( f, 13 );

Good luck,
Brian.

On 10/17/07, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote:
>
>  Brian,
>
> could you fastly elaborate (with a basic code sample if possible) on how
> to do this:
>
>  use a self-calling timer to do any additional math/logic with those
> coordinates
>
>
> Thanks a lot for your time and help!
>
> alex
>
>  --
> *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Brian Cherne
> *Sent:* mercredi 17 octobre 2007 17:35
> *To:* jquery-en@googlegroups.com
> *Subject:* [jQuery] Re: continuous action while mouseover
>
> OnMouseOver
> - capture initial position
> - start onMouseMove listening
>
> OnMouseMove
> - capture mouse postion
>
> OnMouseOut
> - stop onMouseMove listening
>
> Note 1) OnMouseMove is a very cpu-expensive event. It literally fires with
> every tiny little move of the mouse. You'll want to you have onMouseMove
> handler very very simple to keep from maxing out the user's cpu. If
> possible, you may consider having onMouseMove store just mouse coordinates
> and use a self-calling timer to do any additional math/logic with those
> coordinates. The fastest timer (~13ms) is still much better (more
> cpu-friendly) than onMouseMove.
>
> Note 2) You may consider using hover instead of onMouseOver/onMouseOut ...
> unless you only have the one object and won't have to worry about executing
> onMouseOver with every crease in the DOM structure.
>
> I hope this helps.
>
> Brian.
>
> On 10/17/07, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi friends,
> >
> > i was wondering: how can i trigger an action while the mouse stays on a
> > specific area of the screen?
> >
> > i tried the following code: it works ONCE (when the mouseover event is
> > triggered) but not continuously, while the mouse i over my "active" zone.
> >
> > var centerX = $('#datascape').width()/2;
> > stepX = 240;
> > var $datascapeViewport = $('#ds-viewport');
> > $datascapeViewport.css({position: 'relative',left: 0+'px'})
> > .bind('mouseover',function(e){
> > var minX = $(this).width();
> > minX=-minX;
> > var maxX = 0;
> > var newLeft = 0;
> > var Position = $(this).offset();
> > if (e.pageX >= centerX) {
> > newLeft = Position.left-stepX;
> > } else
> > {
> > newLeft = parseInt(Position.left) + stepX;
> > }
> > //alert("\nposition.left="+Position.left
> > +"\nnewLeft="+newLeft+"\nstepX="+stepX);
> > newLeft = -newLeft;
> > if ((newLeftminX)) {
> > $(this).animate({left: newLeft+'px'},1000);
> > }
> > });
> >
> > just for background, i'm trying to have a very wide image scroll
> > horizontally according to the mouse position on the X axis, center being no
> > scroll, left position meaning scroll image right, and invertedly.
> >
> >
> > Thanks for your insight!
> >
> > Alexandre
> >
> > Ce message Envoi est certifié sans virus connu.
> > Analyse effectuée par AVG.
> > Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date:
> > 16/10/2007 14:14
> >
> >
> >
>
> Ce message Envoi est certifié sans virus connu.
> Analyse effectuée par AVG.
> Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date:
> 16/10/2007 14:14
>


[jQuery] Re: show/hide based on list selection

2007-10-17 Thread Olaf Bosch


Belinda M. Giardine schrieb:
I have found this question in the archives and set up a test page based on 
the responses I have found.  But for me it is not working, the section is 
hidden and doesn't reappear no matter what is selected.  I have tried 
several different browsers.  The real task is on a more complex page, I am 
just trying to get the simple test to work first.


is not changing in the content and you have not INPUT in your page.
Try in this direction:

q(document).ready(function(){
q("div.subSection").hide();
alert("Hello there"); //does this
q("option").click (function() {
alert("and woop"); //does this


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---


[jQuery] Re: if's 'n else's

2007-10-17 Thread Josh Nathanson


It looks like the .load ajax will still fire even if the selector returns an 
empty result.  Not sure why that is exactly, but you can easily work around 
it like so:


if ( $("#appendMe").size() ) {
   $("#appendMe").load( etc. );
}

-- Josh

- Original Message - 
From: "Shmax" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Wednesday, October 17, 2007 4:55 PM
Subject: [jQuery] if's 'n else's




I'm just not getting it. My web pages are generally generated
dynamically. To get specific, I'm using jQuery/Ajax to make a category
selector widget, just like the one you use on eBay to sell stuff.
Here's what it looks like in a basic, test environment: 
http://www.shmax.com/pick_cat


So far so good.

Here's what gets called when the document finishes loading:

$(document).ready(function(){
  AttachCatPicker();

  $("#appendMe").load( "/include/record_selector.php",  { cat_id: 1,
action: "choose_cat" }, AttachCatPicker );
});

Also well and good. The page loads, the  with id "appendMe" is
found, my server side php is invoked, outputs the html for the select
widgets, and everything is fine.

The problem is that the "load" seems to get called whether "appendMe"
is found or not. In other words, even pages that don't have the
"appendMe" div on it are calling "load", invoking my php code for
populating the select boxes, and so on. What the heck is going on? I
thought that doing $("appendMe").load is saying "find me all nodes in
the DOM with an id of 'appendMe', and for each one fill it with the
contents generated by record_selector.php".

Do I have that totally wrong, or what?

Thanks much!

- shmax





[jQuery] Using jQuery and ajax to retrieve and append to table on scroll

2007-10-17 Thread [EMAIL PROTECTED]

Hi

Sorry if this is duplicate post but i ddint see my previous post after
hitting submit.

If you visit www.dzone.com you'll notice that as you scroll down on
the main page and if you are apout to approact the end of the page
(while scrolling)...another 23 results are grabbed and appended to the
list or table w/e it is.

I am very new to jQuery and this feature looks very fascinating to
me.  Is there anyone who knows how to do this or knows a tutorial
related to this feature.

Thanks
-Bhaarat Sharma



[jQuery] Re: How to dynamically load javascript from a database instead of using getscript?

2007-10-17 Thread Mark Lacas

Got it.

My answer to my own questiong and other's responses.

I'm using a perl cgi to access the database and it turns out I didn't
even have to use eval.

I just insert the script chunk with the inspector code from that
database.

$("#"+dp_id + " .dp_inspector_code").append( safescript( '

[jQuery] Re: [NEWS] Humanized Messages

2007-10-17 Thread SterlingK

That's actually pretty cool.  I like it.

With regards to Sean O, I gotta say I'm really getting to the end of
caring too much about ie6 anymore - it's been long enough and makes us
miss out on too many fun apps like this.



[jQuery] help - Mineral search program

2007-10-17 Thread Cut

I'm creating a js/jquery script that will accept a 
rock, submit the rock to a database via php, and use the xml returned
to populate a select list, which will replace the text input.

I have the multiple input generation working, database submit working,
and I can parse the xml.

I can't seem to get a reference back to the correct div that holds the
correct  so I can replace it.


CODE:
//I'm a javascript/jquery beginner, so I'm sure there are multiple
mistakes.




//--ajaxError handling snipped--


//Global variables
var numDivs = 0;
var divstring = "div";

//This creates a new text input when the ADD ANOTHER ROCK is
clicked.
function createRockDescSearch() {

  //this creates a div to hold the input element and search+
remove buttons
  //the divid increments so that each div has its own unique
id

  var newDiv = document.createElement("div");
  var divid = divstring + numDivs;
  $(newDiv).attr("id", divid);
  $('').appendTo(newDiv);
  $('').attr("value", "Search For
Rock").click(function()
  {getRockList(this);}).appendTo(newDiv);
  $('').attr("value", "Remove This
Rock").appendTo(newDiv);
  $(newDiv).appendTo("#rock-form");
  numDivs = numDivs + 1;
} //end createRockDescSearch()

 //this function gets the xml from the php-database script
function getRockList(self) {
  var currentdiv = $(self).parent().attr("id");
  var foodtext = $(self).parent().children(":first").attr("value");

  $.ajax({
  type: "GET",
  url: "getRockList.php",
  data: { currentdiv: currentdiv , rocktext: rocktext },
  datatype: 'xml',
  error: function() {
alert('Something is not right with ajax function.');
},
  success: function(xml){
var curdiv = $("currentdiv", xml).text();   
  //for
getting id
var selectList = document.createElement("select");

$("rock", xml).each(function() {
  var optn = document.createElement("option");
  optn.text = $(this).text();
  $(selectList).append(optn);
  });//end each function

 //FIND CORRECT DIV

//DOES NOT WORK IN JAVASCRIPT, MUCH LESS
JQUERY
var rightdiv =
document.getElementById(curdiv);

//REPLACE DIV's TEXT INPUT WITH THE SELECT
LIST
$(rightdiv).children(":first").remove();
$(selectList).prependTo(rightdiv);

 }//end success function
   }); //end ajax function
   } //end getRockList()


  
  




  
  


  



[jQuery] show/hide based on list selection

2007-10-17 Thread Belinda M. Giardine

I have found this question in the archives and set up a test page based on 
the responses I have found.  But for me it is not working, the section is 
hidden and doesn't reappear no matter what is selected.  I have tried 
several different browsers.  The real task is on a more complex page, I am 
just trying to get the simple test to work first.

The test page is at
http://globin.bx.psu.edu/phencode-test/t.html

Thanks,
Belinda



[jQuery] if's 'n else's

2007-10-17 Thread Shmax

I'm just not getting it. My web pages are generally generated
dynamically. To get specific, I'm using jQuery/Ajax to make a category
selector widget, just like the one you use on eBay to sell stuff.
Here's what it looks like in a basic, test environment: 
http://www.shmax.com/pick_cat

So far so good.

Here's what gets called when the document finishes loading:

$(document).ready(function(){
   AttachCatPicker();

   $("#appendMe").load( "/include/record_selector.php",  { cat_id: 1,
action: "choose_cat" }, AttachCatPicker );
 });

Also well and good. The page loads, the  with id "appendMe" is
found, my server side php is invoked, outputs the html for the select
widgets, and everything is fine.

The problem is that the "load" seems to get called whether "appendMe"
is found or not. In other words, even pages that don't have the
"appendMe" div on it are calling "load", invoking my php code for
populating the select boxes, and so on. What the heck is going on? I
thought that doing $("appendMe").load is saying "find me all nodes in
the DOM with an id of 'appendMe', and for each one fill it with the
contents generated by record_selector.php".

Do I have that totally wrong, or what?

Thanks much!

- shmax



[jQuery] multiple JCarousels in ie7

2007-10-17 Thread Frosev

Hi i have multiple carousels all images show in firefox although only
the first image shows up in ie7. I'm pulling the image filepaths from
a database and loading images like that. The number of carousels is
defined by how many galleries a user has. Anyone know how to go about
solving this problem? Thanks



[jQuery] Re: Superfish, bgiframe, jQuery 1.2

2007-10-17 Thread kauaicoder

Hi Joel,

Thanks for the reply. Here's the url where you can view the problem
http://hcs.gts.tsu.biz/test.html. I actually don't need to use the
bgiframe plugin since I don't have any select elements on the page but
I'd like to know I can use it for future projects. If you hover over
the "About Kawaikini" or "Curriculum" menus you'll see part of the
word false behind the buttons. The bgiframe plugin is version 2.1.1
and jquery is version 1.2

Thanks,
Gary

On Oct 16, 5:12 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > Aloha,
>
> > When I use the bgiframe plugin with the superfish menus I get a white
> > background behind the pulldown and the word "false" behind the
> > pulldown in msie 6.0 on XP.
>
> > Thanks,
> > Gary
>
> Hi Gary,
>
> This rings a bell. I think it happened to me once and it ended up
> being caused by some simple mistake which I can't quite remember.
> Check that you definitely have the most up-to-date version of the
> bgiframe plugin. My money is on that being the issue. If that doesn't
> fix it, could you provide a link so we can have a look?
>
> Cheers
> Joel Birch.



[jQuery] Using jQuery to load content from DB on scroll

2007-10-17 Thread [EMAIL PROTECTED]

Hi

I'm sure most of you have visited the DZone website.  As you might
have noticed they have a jquery functionality where when the user is
about to scroll to the end of the page ..25 or so more results are
fetched and appended to the already shown list.  I am Very new to
jquery and love its goodies. Just wondering if someone knows of a
plugin or tutorial that shows how to achieve this?

I'd greatly appreciate any help

Thanks
-bhaarat



[jQuery] Re: jQuery 1.2.1 and Interface/ui Sortable Bug?

2007-10-17 Thread df-sean

In the meantime...

What's the latest working version I can use which will work even on
Safari? Do I need to downgrade jquery too? If someone could tell me
which versions I need to get going right away, I'd really appreciate
it. Thanks!

Sean



[jQuery] Re: multiple ajax selects; dynamic selects don't support onchange?

2007-10-17 Thread [EMAIL PROTECTED]

NICE WORK INDEED!!

while i got mine working using the livequery plugin, turned out to be
the binding issue... i think i might take a look at yours... looks
nice, quite responsive for a huge database.

On Oct 4, 11:22 am, "Web Specialist" <[EMAIL PROTECTED]>
wrote:
> Rob
>
> great job.
>
> Two questions:
>
> - how to use your plugin in update pages(with selected item);
> - it is possible to start a function after last select field is loaded?
>
> Cheers
>
> 2007/9/27, Rob D <[EMAIL PROTECTED]>:
>
>
>
> > Hi Karl,
>
> > Thanks for your feedback, I will certainly make that modification you
> > have suggested.
>
> > Ya know you really do lean something new everyday ;)
>
> > Kind regards
>
> > Rob
>
> > Karl Rudd wrote:
> > > Very nice.
>
> > > I know it's only a demo but you could reduce size of the JSON
> > > responses by about 60% (or more) if you used smaller key strings,
> > > something like "v" and "t" instead of "optionValue" and
> > > "optionDisplay". For the 2500+ records for NSW it makes a huge
> > > difference.
>
> > > Like I said, very nice work.
>
> > > I do so love how jQuery allows you remove all the fluff and you can
> > > just get things done.
>
> > > Karl Rudd
>
> > > On 9/27/07, Rob D <[EMAIL PROTECTED]> wrote:
>
> > >> [EMAIL PROTECTED] wrote:
>
> > >>> Hi all,
>
> > >>> i'm creating a search interface based on select dropdown methods.. the
> > >>> user selects the option from the first menu and the second is created
> > >>> dynamically using ajax. their is a third option which will be
> > >>> populated based on their selection of the second dropdown. however
> > >>> this does not work... seems the onchange method isn't workin? any
> > >>> ideas guys? here's a snippet of my code
>
> > >>> 
> > >>>   $("#jumpMenu").change(function()
> > >>>   {
> > >>>   var x = $(this).val();
> > >>>   $.ajax({
> > >>>   type: "GET",
> > >>>   url:
> > "/bookstore/includes/israel_mod/ajax.php",
> > >>>   data: "type=division&catId=" + x,
> > >>>   dataType: "html",
> > >>>   success: function(html){
> > >>>   $("#department_select").html(html);
> > >>>   },
> > >>>   error: function(msg){
> > >>>   alert( "An Error: " + msg );
> > >>>   }
> > >>>   });
> > >>>   });
>
> > >>>   $("#jumpMenu2").change(function()
> > >>>   {
> > >>>   var z = $(this).val();
> > >>>   alert(z);
>
> > >>>   });
>
> > >>> NOTE: #jumpMenu2 is the second dropdown that doesn't seem to be taking
> > >>> the change event (i put a test alert, but it doesn't work), this is
> > >>> also the dynamically generated select .. would it be .. because it is
> > >>> appended into the html? any ideas
>
> > >>> thanks a lot, this has me wtih a massive migraine, can't figure out
> > >>> why it wouldn't accept the onchange funchtion
>
> > >>> Israel
>
> > >> Hi Israel
>
> > >> Check out my recently announced plugin called LinkedSelects.
>
> > >>http://www.msxhost.com/jquery/linked-selects/json/
>
> > >> It might be of assistance to you!
>
> > >> Cheers
>
> > >> Rob



[jQuery] Re: [NEWS] liScroll Plugin

2007-10-17 Thread Guy Fraser

GianCarlo Mingati wrote:
> Hi all.
> http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html
> This is my scrolling news ticker plugin for jQuery.
>   

Nice plugin. Would it be possible to have the plugin automatically add 
the divs and the class to the ul? That way any unordered list could be 
turned in to a ticker without modifying the source HTML. This would be 
particularly useful in portal systems where it's often impossible to get 
the raw HTML changed at source.

It would also be nice if you could make it compatible with the Hover 
Intent plugin - when available, this would allow the ticker to continue 
scrolling if the mouse quickly passes over it (eg. if I'm just moving 
the mouse to some other link outside the ticker, but the mouse goes over 
the ticker en-route): http://jquery.com/plugins/project/hoverIntent

BTW, I was extremely impressed by the brevity of the code :)

Guy


[jQuery] accordion setting height: 0px, overflow-y: hidden

2007-10-17 Thread gregarious

Hi,

I'm using the accordion widget that came with the recent release of
jQuery UI and I'm having trouble getting the right height of the
second content of the accordion. The code is as follow:

  $(function(){
$("#side-content").accordion();
  });
  $(function(){
// Load the tags and after clicking on a tag add it to the input text
function get_tags(category) {
$("div#tags").load('/monitored/tag_cloud/'+category, function () {
$("div#side-content div#tags p").click( function () {
$("input#search_text").val(jQuery(this).text());
});
});
}
// After clicking on a category fill in the select box, retrieve the
tags associated
// with such category and activate the second accordion
$("div#side-content div#categories p").click( function () {
cat = jQuery(this).text();
$("select#category").val(cat);
get_tags(cat);
$("div#side-content").activate(1);
});
  });

Initially the first content of the accordion is open with a set of
categories enclosed in  tags. Once a user click on one such a tag
I'd like to set it in a select box, retrieve a set of tags associated
to it, load them in the second content of the accordion and then
activate this second content (via $("div#side-content").activate(1);).
The problem with the code above is that the tags are retrieved but the
style of the content has the following attributes and settings:
height: 0px and overflow-y: hidden.
As a results the tags are there but are not shown.
Please note that if I don't activate programmatically the second tab
and I activate it myself manually (that is, without $("div#side-
content").activate(1);) than the problem doesn't occur. I also tried
to set autoheight: true but in this case the length of the second
content is limited by the content of the first one because initially
the second one is empty (after the tags are retrieved this is much
larger than the first and only a small part is shown).

Do you have any suggestion on how can avoid this problem?
Any help will be very appreciated.

Thanks and regards



[jQuery] Tabs and Cookies

2007-10-17 Thread khinester

Hello,
I am trying to implement the tabs jquery, but I would like for the
browser to remember the tab selected on page refresh.

Following details within another post, I have the following:









var TABS_COOKIE = 'tabs_cookie';
$("#container-1 ul").tabs((parseInt($.cookie(TABS_COOKIE))
|| 1,{
 onClick: function(clicked){
   var lastTab = $
(clicked).parents("ul").find("li").index(clicked.parentNode) + 1;
   $.cookie(TABS_COOKIE, lastTab);},
 fxSlide: true,
 fxFade:  true,
 fxSpeed: "normal"

   });
  


News
Jobs
Branches


  {news}


  ${jobs}


  ${branches}




But this does not work for me at all.

This code however works, which is the standard code from the demo.



[jQuery] Re: 1.2.1 remove() forgets bindings?

2007-10-17 Thread Collin Allen

Cool, the native DOM .removeChild(x) worked as needed, but I just have
to be sure to make my code clean up after itself where necessary.
Thanks for the tip!

On Oct 17, 1:44 am, Wizzud <[EMAIL PROTECTED]> wrote:
> The change was deliberate, because most people use remove() to
> (literally) remove the element(s) in question, and any bound events
> were getting left behind in the jQuery data cache (along with any
> other element-assigned data held there) and possibly causing memory
> leakage.
>
> If you want to keep an element for possible later re-insertion then
> instead of removing it you might simply either hide() it in place, or
> create something like a trash bin ( style='display:none;'>) and move temporarily unwanted elements
> there.
>
> Alternatively, I *think* you could use the native removeChild() method
> on the element, store the return, and later re-insert it (natively
> again). This would leave jQuery's data cache in place for the element
> so any bound events or element-assigned data *should* still be there.
> Of course, you could then be incurring the same probability of memory
> leakage that the change was put in place to prevent!
>
> On Oct 16, 11:21 pm, Collin Allen <[EMAIL PROTECTED]> wrote:
>
> > Hello again all!
>
> > I just upgraded one of my web apps to jQuery 1.2.1, and noticed
> > that .remove() no longer retains event handler bindings (i.e., if I
> > have a .click() bound to an element). Previously, I was assigning the
> > the return value of .remove() to a variable to stash a small chunk of
> > the page in memory, and append it back in later on. In jQuery 1.1.2, I
> > could recall it from memory, complete with previously bound click
> > events and all, but in 1.2.1 it doesn't appear to work that way. Is
> > there a better way to go about this and make it work in 1.2.1?
>
> > Thanks for your continued support for such a great library!
>
> > (Apologies if this shows up twice -- my initial post didn't appear,
> > even after a few hours...)



[jQuery] accordion setting height: 0px, overflow-y: hidden

2007-10-17 Thread gregarious

Hi,

I'm using the accordion plugin that came with the first release of
jQuery UI and I'm having some troubles getting the right height of the
second content of the accordion.
The code is as follow:

  $(function(){
$("#side-content").accordion();
  });
  $(function(){
function get_tags(category) {
$("div#tags").load('/monitored/tag_cloud/'+category, function () {
$("div#side-content div#tags p").click( function () {
$("fieldset#main-criteria
input#search_text").val(jQuery(this).text());
});
});
}
// After clicking on a category fill in the select box, retrieve
new tags, insert them
// in the second content and activate it
$("div#side-content div#categories p").click( function () {
cat = jQuery(this).text();
$("select#category").val(cat);
get_tags(cat);
$("div#side-content").activate(1);
});
  });

I'm creating an accordion for two content parts (identified by divs).
The first content part is filled with some categories (enclosed in 
tags). Once I click on one such category I'd like to use it to fill in
a select box, pass it to the get_tags function to retrieve some
related tags, insert them in the second content part of the accordion
and finally activate this second part. Everything goes well except
that the tags are not shown in the second content part because the
style is set automatically set to: height: 0px and overflow-y: hidden
(that is everything over 0px is hidden).
This doesn't happen if I don't activate programmatically the second
content (via $("div#side-content").activate(1)) and instead I do it
manually by clicking on it.
Any suggestion on how to solve this problem? I tried for example
setting {autoheight: true} but in this case the height is limited by
the number of element appearing in the first content (so only a small
part of the second content is shown once loaded because the content of
the second part is larger).

Any help would be very appreciated

Thanks and regards



[jQuery] Re: Flash and jQuery

2007-10-17 Thread Pyrolupus

ActionScript (inside the Flash movie):  getURL("javascript:$('#" + id
+ "').hide()");

Better yet, create a hider function that does the work:

ActionScript:
getURL("javascript:hideElem('" + id + "')");

JavaScript:
function hideElem(elemID) {
  //error checking, verification, etc.
  $('#' + elemID + ').hide();
}

Pyro

On Oct 16, 1:21 pm, rsmolkin <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I tried doing this
>
> $(document).ready(function(){
>  $('#link_menu1').bind('click', function () {
>  $('#mainTable').hide();});
>
> });
>
> But it's not working.  I think Flash is still taking away the click
> event.  Can you please help me figure out how can I detect the click
> in flash and then have it call the jQuery function to hide the
> element?  I am using sIFR'd links, so somewhere in the created Flash
> movie I think I have to detect a click and then call the javascript
> function, but I have no idea how to actually do it.  Please help.
>
> -Roman
>
> On Oct 14, 2:06 pm, Pyrolupus <[EMAIL PROTECTED]> wrote:
>
> > I originally thought that it was justFlashand JavaScript
> > interaction, in which case you'd use the
> > getUrl('javascript:yourfunc()') ActionScript statement, but it sounds
> > more like you just want your previously working links to continue
> > working the way you remember them.
>
> > I skimmed the sIFR docs and found the following:
>
> >http://wiki.novemberborn.net/sifr/FAQ#replacing-links
>
> > That *might* answer your question, but without a code example of what
> > you're trying to accomplish, I can't be sure.  If you are simply
> > trying to use a link to get your show/hide behavior, then the link
> > above still helps you:  essentially, you just want to wrap the sIFRed
> > text/element that you want to use for show/hide functionality and then
> > use that instead:
>
> > Ugly Text to be
> > Prettified
>
> > (script area)
> > sIFR.replace(sifrMe, blah, blah)  //I don't use sIFR, correct as
> > necessary
>
> > $('#showHideThing1').bind('click', function () {
> >   myShowHideFunc(this);
>
> > });
>
> > So, you replace the "siferMe" item and bind your click event to
> > showHideThing1.
>
> > Pyro
>
> > On Oct 14, 11:55 am, pixelwizzard <[EMAIL PROTECTED]> wrote:
>
> > > Hi Guys,
>
> > > Did you figure this out?
>
> > > I have a problem with links that were converted using sIFR and then I need
> > > to use them to do a show/hide usingjQueryand it looks likeFlashis
> > > stealing my click event, so the click event never gets called byjquery.
>
> > > Is there any way to getFlashto trigger the event for a specific link?
>
> > > Thanks,
> > > -Roman
>
> > > njsuperfreak wrote:
>
> > > > Sweet! Good Find Brett, and thanks Sam! I think I am definitely going
> > > > to experiment with this. looks interesting...
>
> > > > On Oct 4, 8:19 pm, Brett <[EMAIL PROTECTED]> wrote:
> > > >> Interesting, I googled up and found an example of
> > > >> this:http://www.quirksmode.org/js/flash_call.html
>
> > > >> NotjQueryas such in the demo, but any function you write can refer
> > > >> tojQuery.
>
> > > >> On Oct 5, 8:10 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>
> > > >> > yourflashwould need to be wmode=transparent
>
> > > >> > and you'd need to call a javascript function from withinflashthat in
> > > >> turn
> > > >> > calls the grey box function
>
> > > >> > sincejqueryapplies the onclick event to all anchors with a class of
> > > >> > greybox you'll need simluar code inside you function that you call 
> > > >> > from
> > > >> >flash.
>
> > > >> > getURL('javascript:callGreyboxFromFlash()');
>
> > > >> > - S
>
> > > >> > On 04/10/2007, njsuperfreak <[EMAIL PROTECTED]> wrote:
>
> > > >> > > CanFlashcommunicate withjQuery? I would like to useflashto
> > > >> > > interact withjQuerylike opening up a dialogbox using the greybox.js
> > > >> > > plugin. How would I go about doing that any ideas?
>
> > > >> > > The code is activated by the class="greybox"
>
> > > --
> > > View this message in 
> > > context:http://www.nabble.com/Flash-and-jQuery-tf4569724s27240.html#a13159151
> > > Sent from thejQueryGeneral Discussion mailing list archive at 
> > > Nabble.com.- Hide quoted text -
>
> > - Show quoted text -



[jQuery] Re: jQuery 1.2.1 and Interface/ui Sortable Bug?

2007-10-17 Thread df-sean

Thanks Richard. I suppose I can wait a week ;-)

Cheers.



[jQuery] draggable and droppable tabs

2007-10-17 Thread scottnath

I am trying to create draggable/droppable tabs. I've got it partly
built, but I'd love some community input on this.

A working model can be seen here:

http://scottnath.com/tabs/draggable_tabs.html

Below I will paste the jquery code I'm using. First, here are some
issues I'm running into that I really need some help with:

1) tabs can only be moved once
2) moving tabs from left-to-right works, but not vice/versa
3) I'm having trouble figuring out the dragged tabs original index



jQuery code:

$(document).ready(function(){
   bindBehavior();
});
function bindBehavior(){
   $("#left_left > ul").tabs();
   $("#left_right > ul").tabs();
   $(".draggableItem").Draggable({
   revert: true
   });
   $(".tabsList").Droppable({
   accept: "draggableItem",
   ondrop: function (drag){
   var thisId = $(this).attr("id");
   // gets the id of the container that the
draggable's tab content should end up in
   var thisParent = $(this).parent().attr("id");
   // gets the moved tab id by using the href
   var dragAHref = $
(drag).children("a").attr("href");
   // remove the leading # sign
   var dragTabId = dragAHref.substring(1);
   // gets the clickable-tab content
   var dragAContent = $
(drag).children("a").text();
   // gets the id of the container that the
draggable's tab content resides in
   var dragParent = $
("#"+dragTabId).parent().attr("id");
   // if it didn't move to a new spot, do nothing
   if(dragParent == thisParent){
   return;
   }
   // finds the htmlobject that is the dragged
LI's corresponding tab
   var dragTab = $("#"+dragTabId).get(0);
   // gets tab LI index
   var dragIndex = $
("li.draggableItem").index(drag);
   // next: put content of tab into newly created
tab
   var movedTabContent = $("#"+dragTabId).html();
   // for some reason, the index seems to come out
one too many
   dragIndex--;
   // remove the tab from where it came from
   $("#"+dragParent+ " ul").tabsRemove(dragIndex);
   // add this tab to where it was dragged
   $("#"+thisId).tabsAdd('#'+dragTabId,
dragAContent);
   // need to add this class
   $("#"+dragTabId).addClass('tabContent');
   // populate the tab-div
   $("#"+dragTabId).html(movedTabContent);

   bindBehavior();
   }
   });
}



Thank you to anyone who can help. I really appreciate it.

Scott Nath

ps: sorry if this is a repost, but my original is not longer found
when I search for it.



[jQuery] Re: Syntax for bind using a string from a variable for the callback functions name

2007-10-17 Thread Mark Lacas

Got it, here is how I did it.  Works great!
Thanks all.
ml

$( ".object" ).each( function() {
var element = this;
var dblclick_func = $( "#"+element.id +
" .dp_properties").attr("dp_dblclick_func");

if ( typeof( dblclick_func ) != "undefined" ) {
$(element).bind( "dblclick", function() { eval( 
dblclick_func
+"()" ); } );
} else {
$(element).bind( "dblclick", { source: "Move"   },
doubleclick_handler );
}
});



[jQuery] Re: continuous action while mouseover

2007-10-17 Thread Rick Faircloth
Yeah, Karl… that was pretty sad.

Where’d you say got that BS in education?

 

:o)

 

Rick

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jonathan Sharp
Sent: Wednesday, October 17, 2007 4:18 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: continuous action while mouseover

 

It's ok Karl, we all have our days sometimes that doesn't make sense.

 

You beat me to the post. Also take a look at the jdNewsScroll
(http://jdsharp.us/jQuery/plugins/jdNewsScroll/) that has code to start/stop
the scrolling of news items based upon the mouse entering/leaving. Hope this
helps some. 

 

Cheers,

-js

 

On 10/17/07, Karl Swedberg <[EMAIL PROTECTED]> wrote: 

Yikes, you'd never be able to tell from my post below that I used to teach
English. Sorry if it confused anyone. Here is what I meant to write (with
corrections inside the asterisks): 


 

Jonathan Sharp created a plugin that *does* something very similar to what
you're going for here. Maybe you can grab some ideas *from* it?

 

--Karl

 

On Oct 17, 2007, at 3:38 PM, Karl Swedberg wrote:





Hi Alexandre, 


 

Jonathan Sharp created a plugin that doesn't something very similar to what
you're going for here. Maybe you can grab some ideas for it?


 

http://jdsharp.us/jQuery/plugins/AutoScroll/

 


 

--Karl

_

Karl Swedberg

www.englishrules.com  

www.learningjquery.com  


 

 

 

On Oct 17, 2007, at 12:59 PM, Alexandre Plennevaux wrote:






 

Hi friends,


 

i was wondering: how can i trigger an action while the mouse stays on a
specific area of the screen?


 

i tried the following code: it works ONCE (when the mouseover event is
triggered) but not continuously, while the mouse i over my "active" zone.


 

var centerX = $('#datascape').width()/2;

stepX = 240;

var $datascapeViewport = $('#ds-viewport');

$datascapeViewport.css({position: 'relative',left: 0+'px'})

.bind('mouseover',function(e){

var minX = $(this).width();

minX=-minX;

var maxX = 0;

var newLeft = 0;

var Position = $(this).offset();

if (e.pageX >= centerX) {

newLeft = Position.left-stepX;

} else

{

newLeft = parseInt(Position.left) + stepX;

}

//alert("\nposition.left="+Position.left
+"\nnewLeft="+newLeft+"\nstepX="+stepX);

newLeft = -newLeft;

if ((newLeftminX)) {

$(this).animate({left: newLeft+'px'},1000);

}

});


 

just for background, i'm trying to have a very wide image scroll
horizontally according to the mouse position on the X axis, center being no
scroll, left position meaning scroll image right, and invertedly. 


 


 

Thanks for your insight!


 

Alexandre


 

Ce message Envoi est certifié sans virus connu.

Analyse effectuée par AVG.

Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date: 16/10/2007
14:14


 


 


 

 

 



[jQuery] Re: continuous action while mouseover

2007-10-17 Thread Alexandre Plennevaux
Brian,
 
could you fastly elaborate (with a basic code sample if possible) on how to do 
this: 
 
 use a self-calling timer to do any additional math/logic with those coordinates
 
 
Thanks a lot for your time and help!
 
alex

   _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian 
Cherne
Sent: mercredi 17 octobre 2007 17:35
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: continuous action while mouseover


OnMouseOver
- capture initial position
- start onMouseMove listening

OnMouseMove
- capture mouse postion

OnMouseOut
- stop onMouseMove listening

Note 1) OnMouseMove is a very cpu-expensive event. It literally fires with 
every tiny little move of the mouse. You'll want to you have onMouseMove 
handler very very simple to keep from maxing out the user's cpu. If possible, 
you may consider having onMouseMove store just mouse coordinates and use a 
self-calling timer to do any additional math/logic with those coordinates. The 
fastest timer (~13ms) is still much better (more cpu-friendly) than 
onMouseMove. 

Note 2) You may consider using hover instead of onMouseOver/onMouseOut ... 
unless you only have the one object and won't have to worry about executing 
onMouseOver with every crease in the DOM structure.

I hope this helps.

Brian.


On 10/17/07, Alexandre Plennevaux mailto:[EMAIL PROTECTED]"[EMAIL 
PROTECTED]> wrote: 


Hi friends,

i was wondering: how can i trigger an action while the mouse stays on a 
specific area of the screen? 

i tried the following code: it works ONCE (when the mouseover event is 
triggered) but not continuously, while the mouse i over my "active" zone.

var centerX = $('#datascape').width()/2;
stepX = 240;
var $datascapeViewport = $('#ds-viewport');
$datascapeViewport.css({position: 'relative',left: 0+'px'})
.bind('mouseover',function(e){
var minX = $(this).width(); 
minX=-minX;
var maxX = 0;
var newLeft = 0;
var Position = $(this).offset();
if (e.pageX >= centerX) {
newLeft = Position.left-stepX;
} else 
{
newLeft = parseInt(Position.left) + stepX;
}
//alert("\nposition.left="+Position.left 
+"\nnewLeft="+newLeft+"\nstepX="+stepX);
newLeft = -newLeft; 
if ((newLeftminX)) {
$(this).animate({left: newLeft+'px'},1000);
}
});

just for background, i'm trying to have a very wide image scroll horizontally 
according to the mouse position on the X axis, center being no scroll, left 
position meaning scroll image right, and invertedly. 


Thanks for your insight!

Alexandre

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date: 16/10/2007 
14:14 






Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date: 16/10/2007 
14:14
 


[jQuery] Re: continuously search for elements in a document

2007-10-17 Thread Wizzud

Ummm . no.

This onBlur stuff that's in .NET somewhere - what is it triggering on?
If it is triggering on known elements (known to you that is), and it
is actually a blur event, can you not add your own blur event handler
to the same elements and hide/show the LIs that way?


On Oct 17, 1:11 pm, rich <[EMAIL PROTECTED]> wrote:
> 4 lines down to 1! Works perfectly; I didn't know you could do some of
> those things. I've only been working with javascript/jQuery for a few
> days.
>
> - Errors are the only things in the ul.errors list
> - .NET handles the hiding/showing of the span's.  It does it in a way
> that I'm not really sure if I can augment (yet. still working on it)
>
> Hiding is working fine. You're right, since my code hides LI's on
> pageLoad (via my js) and span's are being hidden/shown continuously
> (via .NET's 'magic'  on onBlur) -- my error's are not showing due to
> LI's being hidden.
>
> Any idea how I can loop through the page to continuously monitor spans
> and detect if they've been shown/hidden, then show/hide my LI's in
> response?
>
> On Oct 17, 5:20 am, Wizzud <[EMAIL PROTECTED]> wrote:
>
> > I'm not sure how much this is going to help, given that my knowledge
> > of ASP.NET is zilch but...
>
> > As an aside, from jQuery v1.2, your initial page load code could be
> > simplified to ...
>
> >  $('ul.errors li:has(span:hidden)').hide();
>
> > But ... I get the impression that the errors are the only things in
> > the ul.errors li structure?
> > If so, why hide the errors (the spans) themselves?
> > Why not just hide/show the relevant li, leaving the span visible?
> > Or is this governed by ASP?
>
> > If you are hiding the li parents of hidden spans at page load, then
> > the onblur activation of the hidden error message must be making the
> > parent li visible as well, otherwise you wouldn't be able to see the
> > error. Equally obviously, something must be hiding the error messages
> > when not needed or you wouldn't be asking the question in the first
> > place. So if the 'show'er is capable of showing the parent li, why
> > can't the 'hide'r be capable of hiding the parent li?
>
> > Whatever is doing the show/hide of the errors themselves (the spans)
> > also needs to do the show/hide of the list item parents.
> > Or it needs to be able to kick off a function that does it (same as
> > your initial page load code).
> > Or maybe trigger a custom event that will do it.
>
> > Just thinking out loud.
>
> > On Oct 16, 8:29 pm, rich <[EMAIL PROTECTED]> wrote:
>
> > > (Using jQuery w/ ASP.NET 2.0)
>
> > > I have a few error prompts that are in hidden spans inside 's.  I
> > > need to hide the LI's when the error prompt is hidden.
>
> > > Example:
> > > $(document).ready(function() {
> > > //hide empty error spans
> > > $('ul.errors li span').each(function(i){
> > > if($(this).css("display") == "none") {
> > > $(this).parent().hide();
> > > };
> > > });
>
> > > });
>
> > > This works, but only on page load.  These error prompts display as
> > > needed on onBlur (via .NET default methods).
>
> > > How can I continuously scan the document for these error prompts and
> > > show/hide the parent LI's when the prompts show/hide?
>
> > > Thanks,
> > > -rich



[jQuery] UI - Sortables: How do you get the new order?

2007-10-17 Thread jason

I'm sure I'm missing something obvious, but how do you retrieve the
new order of a sortable list?

Thanks,
Jason



[jQuery] tablesorter and tr odd even coloring problem

2007-10-17 Thread FrankTudor

Hi all, I have a table built dynamically (serverside).  I have table
sorter on the table and when I sort it sorts the colors or the rows as
well.  It is very irritating and I am not sure how to correct it.

I tried repopulating the class via jquery labeling each odd and even
but siince the page doesn't post back it doesn't hold past the first
page load.


Here is a sample snippet of my code:



$(document).ready(function()
{
$('.becker tbody tr:odd').removeClass();
$('.becker tbody tr:even').removeClass();
$('.becker tbody tr:odd').addClass('row0 odd');
$('.becker tbody tr:even').addClass('row1 even');
}
);






Reps 
ID
Folder ID
Date
Submitted
City
State
Approval
Request
Attachments






Any suggestions would be very helpful...



[jQuery] [NEWS] PQuery v0.2 for jQuery 1.2 released

2007-10-17 Thread Rey Bango


PQuery is a set of helper classes for JQuery JavaScript library.This 
library allows you to easily integrate AJAX , Effects and other JQuery 
functionality into your PHP scripts.IT has a small foot print and is 
compatible with PHP4 and PHP5.


Details here:

http://www.ngcoders.com/php/updates-pquery-v02-for-jquery-12/



[jQuery] Re: Bind event that should be executed first

2007-10-17 Thread Fabien Meghazi

> >if (v.form()) // runs form validation and returns true if successful
> >// you have to dig into the validation source
> > to figure this out
> > [...]
> Granted, documentation still needs a lot of work, but the method is
> documented here:
> http://jquery.bassistance.de/api-browser/plugins.html#jQueryvalidatorprotoypeform

Hi Jörn,

Exhuming an old thread, but it might be handy for other people.

When using validator.form() the error messages are shown but the first
error input is not focussed. Is this the normal behaviour ? If yes, is
there a method I can call for validator so it will focus the first
error field in case validate fails ?

-- 
Fabien Meghazi

Website: http://www.amigrave.com
Email: [EMAIL PROTECTED]
IM: [EMAIL PROTECTED]


[jQuery] Re: Stopping event propagation on non-standard event types

2007-10-17 Thread Jonathan Sharp
On 10/17/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
>
>
> Jonathan Sharp schrieb:
> > I'll take a shot at that as I've been using some custom events in
> > components being built and it'd be a nice behavior to have. And allow
> > for a decoupling of callbacks that we have with developers currently.
> Gives me some interesting ideas for veto-based validation events. Think
> of an ajaxForm method that triggers a validation event and cancels the
> submit accordingly. Mike actually implemented something similar long ago
> in the form plugin, but I guess it lacked the decoupled model of custom
> events to get adopted.
>
> Be sure to share your implementation!


I will for sure!


-- Jörn
>


[jQuery] Re: creating drop down menus with JQuery?

2007-10-17 Thread Jonathan Sharp
Now that I think about it, the offsets only apply to sub menus. Try this
instead. I quickly tested it so I think it has a chance at working.

ul.jd_menu ul {
margin-left: -8px;
margin-top: -13px;
}

Cheers,
-js


On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> To give you an update on this, I tried to exaggerate the effect, I put
> -100 for both offsetX and offsetY,
>
>$('ul.jd_menu').jdMenu({
>offsetX: -100,
>offsetY: -100,
>activateDelay: 20,
>hideDelay: 20
>});
>
> but it didn't seem to move the menu
>
>
> http://groups.google.com/group/jquery-en/browse_thread/thread/4793fc4e34ebb5c1
>
> - Dave
>
> On Oct 17, 1:22 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > Try passing in with your defaults (using either positive or negative
> > numbers) and see if that helps at all.
> > offsetX: 4,
> > offsetY: 2,
> >
> > Cheers,
> > -js
> >
> > On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
> >
> >
> >
> >
> >
> > > I do.  It is
> >
> > >http://elearningrd.info/portal/test.php
> >
> > > - Dave
> >
> > > On Oct 17, 10:09 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > > Do you have a URL of a sample page?
> >
> > > > -js
> >
> > > > On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > > wrote:
> >
> > > > > I tried setting all the padding attributes in the jdMenu.slate.css
> > > > > file to zero, but still no luck -- the menu appears away (to the
> > > > > bottom and right) of the graphic).  On your web site, you mention
> the
> > > > > plug-in supports relative positioning.  Is there an example
> somewhere
> > > > > on the site?  I can just model my code off the example.
> >
> > > > > Thanks for your replies, - Dave
> >
> > > > > On Oct 17, 9:29 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > > > > The menu positioning code uses absolute positioning. Try
> removing
> > > the
> > > > > > padding in CSS on the LI which should then make the menu appear
> > > directly
> > > > > > below the arrow.
> >
> > > > > > Cheers,
> > > > > > -js
> >
> > > > > > On 10/16/07, [EMAIL PROTECTED] <
> [EMAIL PROTECTED]>
> > > > > wrote:
> >
> > > > > > > Beautiful.  This may also be a non-jdMenu question but I'll
> throw
> > > this
> > > > > > > out there.  I want my drop-down menu to appear right beneath
> the
> > > arrow
> > > > > > > image, whereever the arrow may be positioned on the
> screen.  But
> > > when
> > > > > > > I insert the "relative" style in the  tag:
> >
> > > > > > > style="position:
> > > > > > > relative; left:
> > > > > > > 0px; top: 0px;">
> > > > > > > alt=""
> > > > > > > border="0"
> > > > > > > align="middle" height="16" width="16" />
> > > > > > >
> > > > > > > id="editTitle__ID__"
> > > > > > > title="Edit
> > > > > > > Module Title" class="editLink" href="#">Edit Module
> Title
> >
> > > > > > > id="myspace__ID__"
> > > > > > > class="myspaceLink" href="#" title="Export MySpace
> HTML">Export
> > > > > > > MySpace HTML
> > > > > > >
> > > > > > >
> > > > > > >
> >
> > > > > > > The menu actually appears quite away (to the right and bottom)
> of
> > > the
> > > > > > > arrow.  It does this for both PC IE and Firefox, although I
> can't
> > > tell
> > > > > > > if the distances are the same.  Any advice for relatively
> lining
> > > up
> > > > > > > the menu directly beneath the image?
> >
> > > > > > > Thanks, - Dave
> >
> > > > > > > On Oct 16, 3:56 pm, "Jonathan Sharp" <[EMAIL PROTECTED]>
> wrote:
> > > > > > > > I think this is less of a jdMenu specific thing but you
> could do
> > > > > > > something
> > > > > > > > like the following:
> >
> > > > > > > > Assuming:
> > > > > > > > 
> > > > > > > > Text  > > > > > > align="middle"
> > > > > > > > height="16" width="16" />...
> >
> > > > > > > > $('ul.jd_menu > li').hover(function() {
> > > > > > > > $('> img', this).attr('src', 'url-to-image.jpg');},
> >
> > > > > > > > function() {
> > > > > > > > $('> img', this).attr('src', 'url-to-other-image.jpg');
> >
> > > > > > > > });
> >
> > > > > > > > -js
> >
> > > > > > > > On 10/16/07, [EMAIL PROTECTED] <
> > > [EMAIL PROTECTED]>
> > > > > > > wrote:
> >
> > > > > > > > > Thanks for this info.  Worked great.
> >
> > > > > > > > > One more small question.  To trigger the appearance of a
> > > drop-down
> > > > > > > > > menu, I have an image of an arrow
> >
> > > > > > > > >  > > align="middle"
> > > > > > > > > height="16" width="16" />
> >
> > > > > > > > > but when the user rolls over the image, I'd like the
> source of
> > > the
> > > > > > > > > image to change to something else to indicate the menu is
> > > > > "active".
> > > > > > > > > How do I do this with jdMenu?
> >
> > > > > > > > > - 

[jQuery] Re: Stopping event propagation on non-standard event types

2007-10-17 Thread Jonathan Sharp
I'll take a shot at that as I've been using some custom events in components
being built and it'd be a nice behavior to have. And allow for a decoupling
of callbacks that we have with developers currently.

Cheers,
-js


On 10/17/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
>
>
> Jonathan Sharp schrieb:
> > $(window)
> >  .bind('testEvent', function(e) {
> >   alert('1');
> >   e.stopPropagation();
> >   e.preventDefault();
> >   return false;
> >  })
> >  .bind('testEvent', function() {
> >   alert('2');
> >  })
> >  .trigger('testEvent');
> >
> > The above code doesn't stop the testEvent from triggering the second
> > alert. Is the propagation prevention just for standard events such as
> > 'click', etc.?
> Yep. jQuery makes no attempt to implement any of those two for custom
> events. But its an interesting idea and not too hard to implement.
>
> If you want to give an implementation a try, you'd have to start at this
> line:
>
> data.unshift( this.fix({ type: type, target: element }) );
>
> You could provide implementations for preventDefault and stopPropagation
> here.
>
> The jQuery.event.handle method would have to be modified to check if one
> of those two was called and cancel event handling when dealing with
> triggered events.
>
> -- Jörn
>


[jQuery] Re: Stopping event propagation on non-standard event types

2007-10-17 Thread Jörn Zaefferer


Jonathan Sharp schrieb:

$(window)
 .bind('testEvent', function(e) {
  alert('1');
  e.stopPropagation();
  e.preventDefault();
  return false;
 })
 .bind('testEvent', function() {
  alert('2');
 })
 .trigger('testEvent');
 
The above code doesn't stop the testEvent from triggering the second 
alert. Is the propagation prevention just for standard events such as 
'click', etc.?
Yep. jQuery makes no attempt to implement any of those two for custom 
events. But its an interesting idea and not too hard to implement.


If you want to give an implementation a try, you'd have to start at this 
line:


data.unshift( this.fix({ type: type, target: element }) );

You could provide implementations for preventDefault and stopPropagation 
here.


The jQuery.event.handle method would have to be modified to check if one 
of those two was called and cancel event handling when dealing with 
triggered events.


-- Jörn


[jQuery] Re: How do I completely overwrite an event?

2007-10-17 Thread Jonathan Sharp
If you're using jquery-1.2+ you can do the following to just wipe out your
events:

$('#BLAH').bind('click.myfn', function() { ... });
$('#BLAH').unbind('click.myfn').bind('click.myfn', function() { ... });

This will only replace your event (myfn can be whatever you want) otherwise
if you do unbind('click') it will remove all click events.

Cheers,
-js


On 10/16/07, Karl Rudd <[EMAIL PROTECTED]> wrote:
>
>
> That's correct. If you want to "overwrite" the existing event you'll
> have to "unbind" it first. To use your example:
>
> $('##BLAH').click(function(){window.status+='a';});
> $('##BLAH').unbind('click').click(function(){window.status+='b';});
>
> Karl Rudd
>
> On 10/17/07, nick <[EMAIL PROTECTED]> wrote:
> >
> > It seems that jquery is "appending" new events to any existing event
> > handler. eg:
> >
> > $('##BLAH').click(function(){window.status+='a';});
> > $('##BLAH').click(function(){window.status+='b';});
> >
> > Clicking 'BLAH' you get 'ab' on the status bar instead of 'a'??
> >
> >
>


[jQuery] Re: continuous action while mouseover

2007-10-17 Thread Jonathan Sharp
It's ok Karl, we all have our days sometimes that doesn't make sense.

You beat me to the post. Also take a look at the jdNewsScroll (
http://jdsharp.us/jQuery/plugins/jdNewsScroll/) that has code to start/stop
the scrolling of news items based upon the mouse entering/leaving. Hope this
helps some.

Cheers,
-js


On 10/17/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> Yikes, you'd never be able to tell from my post below that I used to teach
> English. Sorry if it confused anyone. Here is what I meant to write (with
> corrections inside the asterisks):
>
> Jonathan Sharp created a plugin that *does* something very similar to what
> you're going for here. Maybe you can grab some ideas *from* it?
>
> --Karl
>
>  On Oct 17, 2007, at 3:38 PM, Karl Swedberg wrote:
>
> Hi Alexandre,
>
> Jonathan Sharp created a plugin that doesn't something very similar to
> what you're going for here. Maybe you can grab some ideas for it?
>
>
> http://jdsharp.us/jQuery/plugins/AutoScroll/
>
>
>
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
>  On Oct 17, 2007, at 12:59 PM, Alexandre Plennevaux wrote:
>
>
>
> Hi friends,
>
>
> i was wondering: how can i trigger an action while the mouse stays on a
> specific area of the screen?
>
>
> i tried the following code: it works ONCE (when the mouseover event is
> triggered) but not continuously, while the mouse i over my "active" zone.
>
>
> var centerX = $('#datascape').width()/2;
> stepX = 240;
> var $datascapeViewport = $('#ds-viewport');
> $datascapeViewport.css({position: 'relative',left: 0+'px'})
> .bind('mouseover',function(e){
> var minX = $(this).width();
> minX=-minX;
> var maxX = 0;
> var newLeft = 0;
> var Position = $(this).offset();
> if (e.pageX >= centerX) {
> newLeft = Position.left-stepX;
> } else
> {
> newLeft = parseInt(Position.left) + stepX;
> }
> //alert("\nposition.left="+Position.left
> +"\nnewLeft="+newLeft+"\nstepX="+stepX);
> newLeft = -newLeft;
> if ((newLeftminX)) {
> $(this).animate({left: newLeft+'px'},1000);
> }
> });
>
>
> just for background, i'm trying to have a very wide image scroll
> horizontally according to the mouse position on the X axis, center being no
> scroll, left position meaning scroll image right, and invertedly.
>
>
>
>
> Thanks for your insight!
>
>
> Alexandre
>
>
> Ce message Envoi est certifié sans virus connu.
> Analyse effectuée par AVG.
> Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date:
> 16/10/2007 14:14
>
>
>
>
>
>
>
>
>
>


[jQuery] Stopping event propagation on non-standard event types

2007-10-17 Thread Jonathan Sharp
$(window)
 .bind('testEvent', function(e) {
  alert('1');
  e.stopPropagation();
  e.preventDefault();
  return false;
 })
 .bind('testEvent', function() {
  alert('2');
 })
 .trigger('testEvent');

The above code doesn't stop the testEvent from triggering the second alert.
Is the propagation prevention just for standard events such as 'click',
etc.?

-js


[jQuery] Re: continuous action while mouseover

2007-10-17 Thread Karl Swedberg
Yikes, you'd never be able to tell from my post below that I used to  
teach English. Sorry if it confused anyone. Here is what I meant to  
write (with corrections inside the asterisks):


Jonathan Sharp created a plugin that *does* something very similar to  
what you're going for here. Maybe you can grab some ideas *from* it?


--Karl

On Oct 17, 2007, at 3:38 PM, Karl Swedberg wrote:


Hi Alexandre,

Jonathan Sharp created a plugin that doesn't something very similar  
to what you're going for here. Maybe you can grab some ideas for it?


http://jdsharp.us/jQuery/plugins/AutoScroll/


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Oct 17, 2007, at 12:59 PM, Alexandre Plennevaux wrote:



Hi friends,

i was wondering: how can i trigger an action while the mouse stays  
on a specific area of the screen?


i tried the following code: it works ONCE (when the mouseover  
event is triggered) but not continuously, while the mouse i over  
my "active" zone.


var centerX = $('#datascape').width()/2;
stepX = 240;
var $datascapeViewport = $('#ds-viewport');
$datascapeViewport.css({position: 'relative',left: 0+'px'})
.bind('mouseover',function(e){
var minX = $(this).width();
minX=-minX;
var maxX = 0;
var newLeft = 0;
var Position = $(this).offset();
if (e.pageX >= centerX) {
newLeft = Position.left-stepX;
} else
{
newLeft = parseInt(Position.left) + stepX;
}
	//alert("\nposition.left="+Position.left +"\nnewLeft="+newLeft 
+"\nstepX="+stepX);

newLeft = -newLeft;
if ((newLeftminX)) {
$(this).animate({left: newLeft+'px'},1000);
}
});

just for background, i'm trying to have a very wide image scroll  
horizontally according to the mouse position on the X axis, center  
being no scroll, left position meaning scroll image right, and  
invertedly.



Thanks for your insight!

Alexandre

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date:  
16/10/2007 14:14









[jQuery] .get works in Firefox, but not IE

2007-10-17 Thread cfdvlpr

Here's some code I have that works great in Firefox.
But in IE, it this line does nothing: $
('#bottomHalfofThickbox').html(updatedSamples);

function redecorate(){
$('.removeSample').click(function(){
var productID = $(this).attr("productID");
$.get("/viewSampleDetail/removeSampleFromCart.cfm", { 
productID:
productID },function(updatedSamples){

$('#bottomHalfofThickbox').html(updatedSamples);
$('#bottomHalfofThickbox').html('test');
redecorate();
});
});

This line works in IE: $('#bottomHalfofThickbox').html('test');
I'm guessing that there's an error in removeSampleFromCart.cfm, but IE
doesn't seem to show me that error like FF and firebug would.

Any ideas on how I could debug this issue further?



[jQuery] Re: continuous action while mouseover

2007-10-17 Thread Karl Swedberg

Hi Alexandre,

Jonathan Sharp created a plugin that doesn't something very similar  
to what you're going for here. Maybe you can grab some ideas for it?


http://jdsharp.us/jQuery/plugins/AutoScroll/


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Oct 17, 2007, at 12:59 PM, Alexandre Plennevaux wrote:



Hi friends,

i was wondering: how can i trigger an action while the mouse stays  
on a specific area of the screen?


i tried the following code: it works ONCE (when the mouseover event  
is triggered) but not continuously, while the mouse i over my  
"active" zone.


var centerX = $('#datascape').width()/2;
stepX = 240;
var $datascapeViewport = $('#ds-viewport');
$datascapeViewport.css({position: 'relative',left: 0+'px'})
.bind('mouseover',function(e){
var minX = $(this).width();
minX=-minX;
var maxX = 0;
var newLeft = 0;
var Position = $(this).offset();
if (e.pageX >= centerX) {
newLeft = Position.left-stepX;
} else
{
newLeft = parseInt(Position.left) + stepX;
}
	//alert("\nposition.left="+Position.left +"\nnewLeft="+newLeft 
+"\nstepX="+stepX);

newLeft = -newLeft;
if ((newLeftminX)) {
$(this).animate({left: newLeft+'px'},1000);
}
});

just for background, i'm trying to have a very wide image scroll  
horizontally according to the mouse position on the X axis, center  
being no scroll, left position meaning scroll image right, and  
invertedly.



Thanks for your insight!

Alexandre

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date:  
16/10/2007 14:14







[jQuery] Close Thickbox and Make the Parent Window go to href

2007-10-17 Thread cfdvlpr

Here's a function I have that doesn't quite do what I want it too:
$('.closeWindow').click(function(){
parent.tb_remove();  //This closes the thickbox
parent.location.href=$(this).href();  // This tries to load the href
url in the thickbox right as it closes it
});

What can I replace parent.location.href=$(this).href(); with to make
this parent window go to the correct url?



[jQuery] Re: showing div#test3 when url is domain.com/page.php#test3

2007-10-17 Thread Jörn Zaefferer


stef schrieb:

on my test.php page i have a set of divs, the visibility of which is
toggled via a menu that uses jquery toggle(). the menu points to
domain.com#test1 - domain.com#test2 - domain.com#test3 and the divs
are #test1, #test2 and #test3. #test1 is shown by default, when the
page loads by using css to hide all divs but #div1

id like #test3 to appear if some one clicks a link from an external
page that points to domain.com/test.php#3 - is that possible?

is klaus' history plugin the most appropriate solution for this? if
so, how do i get started? i read the documentation in the file but
cant quite figure it out. or is there a better way of doing it?

basically if some one clicks on a link pointing to domain.com/
test.php#test3 i want the default #div1 hidden and #div3 shown.
  

There are two plugins that implement url-based "activation" of some content:
http://dev.jquery.com/view/trunk/plugins/treeview/
http://dev.jquery.com/view/trunk/plugins/accordion/

In both cases you'd have to look for the "navigation" option. That 
should give you an idea about how to implement your own solution.


-- Jörn


[jQuery] Re: Java Server Faces and JQuery

2007-10-17 Thread Jörn Zaefferer


Joe schrieb:

Does anyone have experience using JQuery with Java Server Faces?
  
The id-encoding isn't helpful to select elements via jQuery. Using 
class-selectors instead can ease the pain. All in all, jQuerys 
unobtrusive nature is still very helpful when working with JSF.


About components: I haven't seen a single JSF component that used 
jQuery. Instead all those fancy component frameworks/libraries reinvent 
the wheel again and again, and implement the same stuff over and over again.


If you happen to work in a portlet enviroment (eg. JSR 168 compatible), 
forget about JSF. Don't waste your valuable time. I can provide you with 
a compiled list of reason, though I'd have to translate that first.


If you still have a choice: Currently my stack is Spring (with Hibernate 
or iBatis), Spring MVC with Freemarker as View, and both jQuery and Ext 
for the client-side. The tool support for Freemarker is bad, otherwise 
its a great stack I can highly recommend - at least today.


Let me know if you have any specific questions, I guess I could rant 
about this topic for a few hours :-)


Regards
Jörn


[jQuery] Re: continuous action while mouseover

2007-10-17 Thread Alexandre Plennevaux
hi brian,
 
i just found out you are the one behind the excellent hoverIntent plugin! i 
will change my code to use your plugin and follow your advises, although some 
of which may have me posting again on this list soon :).
 
thanks much!
 
alexandre

   _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian 
Cherne
Sent: mercredi 17 octobre 2007 17:35
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: continuous action while mouseover


OnMouseOver
- capture initial position
- start onMouseMove listening

OnMouseMove
- capture mouse postion

OnMouseOut
- stop onMouseMove listening

Note 1) OnMouseMove is a very cpu-expensive event. It literally fires with 
every tiny little move of the mouse. You'll want to you have onMouseMove 
handler very very simple to keep from maxing out the user's cpu. If possible, 
you may consider having onMouseMove store just mouse coordinates and use a 
self-calling timer to do any additional math/logic with those coordinates. The 
fastest timer (~13ms) is still much better (more cpu-friendly) than 
onMouseMove. 

Note 2) You may consider using hover instead of onMouseOver/onMouseOut ... 
unless you only have the one object and won't have to worry about executing 
onMouseOver with every crease in the DOM structure.

I hope this helps.

Brian.


On 10/17/07, Alexandre Plennevaux mailto:[EMAIL PROTECTED]"[EMAIL 
PROTECTED]> wrote: 


Hi friends,

i was wondering: how can i trigger an action while the mouse stays on a 
specific area of the screen? 

i tried the following code: it works ONCE (when the mouseover event is 
triggered) but not continuously, while the mouse i over my "active" zone.

var centerX = $('#datascape').width()/2;
stepX = 240;
var $datascapeViewport = $('#ds-viewport');
$datascapeViewport.css({position: 'relative',left: 0+'px'})
.bind('mouseover',function(e){
var minX = $(this).width(); 
minX=-minX;
var maxX = 0;
var newLeft = 0;
var Position = $(this).offset();
if (e.pageX >= centerX) {
newLeft = Position.left-stepX;
} else 
{
newLeft = parseInt(Position.left) + stepX;
}
//alert("\nposition.left="+Position.left 
+"\nnewLeft="+newLeft+"\nstepX="+stepX);
newLeft = -newLeft; 
if ((newLeftminX)) {
$(this).animate({left: newLeft+'px'},1000);
}
});

just for background, i'm trying to have a very wide image scroll horizontally 
according to the mouse position on the X axis, center being no scroll, left 
position meaning scroll image right, and invertedly. 


Thanks for your insight!

Alexandre

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date: 16/10/2007 
14:14 






Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.14.13/1074 - Date: 16/10/2007 
14:14
 


[jQuery] Re: [NEWS] Humanized Messages

2007-10-17 Thread Michael Geary

> http://binarybonsai.com/archives/2007/10/15/humanized-messages-for-jquery/

Ugh. Am I the only one who doesn't like this user interface at all?

I click in the middle of the screen. A message appears up at the top - where
I'm not looking - AND another bouncy message appears at the BOTTOM of the
screen, so it tries to draw my eye in two directions at once.

Then, when I finally notice the message at the top, I follow my natural
instinct and move the mouse toward it - and it immediately disappears!

Not user friendly.

-Mike



[jQuery] Re: creating drop down menus with JQuery?

2007-10-17 Thread Jonathan Sharp
Try passing in with your defaults (using either positive or negative
numbers) and see if that helps at all.
offsetX: 4,
offsetY: 2,

Cheers,
-js


On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I do.  It is
>
> http://elearningrd.info/portal/test.php
>
> - Dave
>
> On Oct 17, 10:09 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > Do you have a URL of a sample page?
> >
> > -js
> >
> > On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
> >
> >
> >
> >
> >
> > > I tried setting all the padding attributes in the jdMenu.slate.css
> > > file to zero, but still no luck -- the menu appears away (to the
> > > bottom and right) of the graphic).  On your web site, you mention the
> > > plug-in supports relative positioning.  Is there an example somewhere
> > > on the site?  I can just model my code off the example.
> >
> > > Thanks for your replies, - Dave
> >
> > > On Oct 17, 9:29 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > > The menu positioning code uses absolute positioning. Try removing
> the
> > > > padding in CSS on the LI which should then make the menu appear
> directly
> > > > below the arrow.
> >
> > > > Cheers,
> > > > -js
> >
> > > > On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > > wrote:
> >
> > > > > Beautiful.  This may also be a non-jdMenu question but I'll throw
> this
> > > > > out there.  I want my drop-down menu to appear right beneath the
> arrow
> > > > > image, whereever the arrow may be positioned on the screen.  But
> when
> > > > > I insert the "relative" style in the  tag:
> >
> > > > >
> > > > > > > > > border="0"
> > > > > align="middle" height="16" width="16" />
> > > > >
> > > > > > > > > title="Edit
> > > > > Module Title" class="editLink" href="#">Edit Module Title
> >
> > > > > > > > > class="myspaceLink" href="#" title="Export MySpace HTML">Export
> > > > > MySpace HTML
> > > > >
> > > > >
> > > > >
> >
> > > > > The menu actually appears quite away (to the right and bottom) of
> the
> > > > > arrow.  It does this for both PC IE and Firefox, although I can't
> tell
> > > > > if the distances are the same.  Any advice for relatively lining
> up
> > > > > the menu directly beneath the image?
> >
> > > > > Thanks, - Dave
> >
> > > > > On Oct 16, 3:56 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > > > > I think this is less of a jdMenu specific thing but you could do
> > > > > something
> > > > > > like the following:
> >
> > > > > > Assuming:
> > > > > > 
> > > > > > Text  > > > > align="middle"
> > > > > > height="16" width="16" />...
> >
> > > > > > $('ul.jd_menu > li').hover(function() {
> > > > > > $('> img', this).attr('src', 'url-to-image.jpg');},
> >
> > > > > > function() {
> > > > > > $('> img', this).attr('src', 'url-to-other-image.jpg');
> >
> > > > > > });
> >
> > > > > > -js
> >
> > > > > > On 10/16/07, [EMAIL PROTECTED] <
> [EMAIL PROTECTED]>
> > > > > wrote:
> >
> > > > > > > Thanks for this info.  Worked great.
> >
> > > > > > > One more small question.  To trigger the appearance of a
> drop-down
> > > > > > > menu, I have an image of an arrow
> >
> > > > > > >  align="middle"
> > > > > > > height="16" width="16" />
> >
> > > > > > > but when the user rolls over the image, I'd like the source of
> the
> > > > > > > image to change to something else to indicate the menu is
> > > "active".
> > > > > > > How do I do this with jdMenu?
> >
> > > > > > > - Dave
> >
> > > > > > > On Oct 16, 2:28 pm, "Jonathan Sharp" <[EMAIL PROTECTED]>
> wrote:
> > > > > > > > $('ul.jd_menu').jdMenu({
> > > > > > > > activateDelay: 100
> >
> > > > > > > > });
> >
> > > > > > > > Should work, here are the other options:
> > > > > > > > showDelay: 150 hideDelay: 550
> >
> > > > > > > > Sorry there isn't any documentation yet.
> >
> > > > > > > > -js
> >
> > > > > > > > On 10/16/07, [EMAIL PROTECTED] <
> > > [EMAIL PROTECTED]>
> > > > > > > wrote:
> >
> > > > > > > > > Hey Chris, Thanks for this recommendation.  One thing I'm
> > > noticing
> > > > > > > > > when playing with this is that when I roll over the item
> that
> > > is
> > > > > > > > > supposed to trigger the appearance of the drop down menu,
> > > there is
> > > > > a
> > > > > > > > > one second delay getting the menu to appear.  Is this a
> > > setting
> > > > > > > > > somewhere that can be adjusted?  I'd like it to be
> > > > > instant.  Here's my
> > > > > > > > > code:
> >
> > > > > > > > >  > > > >http://www.w3.org/
> > > > > > > > > TR/REC-html40/strict.dtd">
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> >
> > > > > > > > > > > href="styles/jdMenu.css?"
> > > > > > > > > type="text/css" />
> >
> > > > > > > > > > > > > > > > > src="scripts/jquery.js">
> > > > > > > > > > > > > > > > 

[jQuery] Re: [NEWS] Humanized Messages

2007-10-17 Thread Rick Faircloth
Really, more than the pop-up messages, I was curious

about use of the messages tab at the bottom.  When

would someone want to have a running list of messages?

 

Rick

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Nathanson
Sent: Wednesday, October 17, 2007 12:47 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [NEWS] Humanized Messages

 

I think the cool thing about it is how it fades out on mousemove.  It's less
obtrusive than the usual native browser alert popup.  And, having a log of
messages could be useful in some implementations I suppose.

 

There's another plugin that's kind of unheralded that I stumbled over called
"Impromptu" that is similar in what it does.  Basically a configurable
replacement for the native browser alert.  Very slick.

 

-- Josh

 

- Original Message - 

From: Rick Faircloth   

To: jquery-en@googlegroups.com 

Sent: Wednesday, October 17, 2007 7:07 AM

Subject: [jQuery] Re: [NEWS] Humanized Messages

 

Whatever. please share with us some of your visions, Andy.

 

:o)

 

 

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Wednesday, October 17, 2007 9:55 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [NEWS] Humanized Messages

 

That's only because you're just not visionary enough Rick.

 

:)

 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Faircloth
Sent: Wednesday, October 17, 2007 8:53 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [NEWS] Humanized Messages

It's an interesting app, but I'm not sure what the practical applications

may be. ???

 

Rick

 

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Wednesday, October 17, 2007 9:12 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [NEWS] Humanized Messages

 

That's fairly nice. I like the message log at the bottom. Nice touch.

 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeferson Koslowski
Sent: Tuesday, October 16, 2007 5:09 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] [NEWS] Humanized Messages

Found a new jquery plugin:
http://binarybonsai.com/archives/2007/10/15/humanized-messages-for-jquery/

>From the authors blog: "(...) It's simply a large and translucent message
that's displayed over the contents of your screen. (...)" 



[jQuery] Re: Updating the id of an a tag

2007-10-17 Thread Glen Lipka
Instead of .id() try attr("id",yourStringHere)

One tip is to make your string in a variable right before it.
That way you can easily alert the string to see if its coming up correctly.

Glen

On 10/17/07, Bruce MacKay <[EMAIL PROTECTED]> wrote:
>
>  Hello folks,
>
> I'm having problems with the following line of code
>
> $("[EMAIL PROTECTED]'del_']").id("del_*" +pb+"_"+iA+"_ck");
>
> in the function below.
>
> What I'm trying to do is replace the id of the a tag from its existing id
> of 'del_'  to 'del_*x_y_ck', where x and y are the variables pb and iA.
>
> I know pb and iA are being 'received' by the function - the querystring
> generated by the get statement is correct.
>
> I'm sure this function has worked previously, so perhaps my problem is
> based in a version update of jQuery, but perhaps it was only working
> previously in my dreams.
>
> Any help appreciated.
>
> Cheers
>
> Bruce
>
> function editAppAsset(ej) {
> var temp=new Array();
> temp=ej.split('_');
> var pb = temp[1];
> var iA = temp[2];
> $("#wrka").show();
> $.get("scripts/ajax_ramosus _editor.asp?id=16b&pblID="+pb+"&assetID="+iA
> +"&q="  + new Date().getTime(), function(responseText){
> $("[EMAIL PROTECTED]'del_']").id("del_*"+pb+"_"+iA+"_ck");
> var options = {dataType: 'json', before: showRequest, after:
> afterAppAsset};
> $('#editor_form').submit(function() {$(this).ajaxSubmit(options);return
> false;});
> });
> };
>


[jQuery] Re: hoverIntent help: firing dropdowns all at once (extreme novice)

2007-10-17 Thread Brian Cherne
Hi Claudina, I'm sorry I haven't much time today to help more directly, but
I'll trying setting you down the right path.

$("#topmenu li")
... will find all the LI tags inside of #topmenu and apply this behavior

$(#topmenu > li")
... will find only the LI tags that are direct children of #topmenu. I think
this is what you're intending to do.

You have only one UL.tags... I'm pretty sure you meant to have your first
nested UL to also have the "tag" class.

It's been a little while since I've worked with jQuery, so I may get this
next part a little more wrong ... but your makeTall, makeShort functions are
not inherently relative to the LI that calls them. So...

$("ul.tags")
... will match all UL tags with the className of "tags"

$("ul.tags",this)
... I think should find all the UL tags with a className of "tags" in the
scope of "this" (so inside the LI tag that called the function).

Hopefully someone else on the list can correct me if I've misled you.

This *shouldn't* impact using jQuery, but it may lead to browser issues
later on down the road... it's not valid to have DIV and FORM elements
inside a UL tag. You can get away with it for now, but eventually that's
something you should look into "fixing"

Also, it's great to learn jQuery by trying to do things on your own... but I
know there are plug-ins for dropdown menus. A popular one is Joel Birch's
"Superfish" menu...

http://users.tpg.com.au/j_birch/plugins/superfish/

Good luck,
Brian.


On 10/17/07, c.s. <[EMAIL PROTECTED]> wrote:
>
>
> I'm using the hoverIntent plugin to control a series of drop-down
> menus. I have it set up and it works save for the fact that if I hover
> over a li element it fires (displays) all the of drop-downs instead of
> doing it individually.
>
> I think I need to set up some sort of timer, or stop (?) This is my
> first js experience so I'm not quite sure how. Any help would be
> grealy apppreciated.
>
> The code looks like this:
>
> 
>
> 
>
>  type="text/javascript" charset="utf-8">
>  type="text/javascript" charset="utf-8">
> 
>
> $(document).ready(function(){
> $("#topmenu li ").hoverIntent({
> sensitivity: 1,
> interval: 1000,
> over: makeTall,
> timeout: 1000,
> out: makeShort
> });
> }); // close document.ready
>
> function makeTall(){  $("ul.tags").css({ display:"block"
> });}
> function makeShort(){  $("ul.tags").css({ display:"none"
> });}
>
>
>
> 
>
>
> 
>
> 
>
> 
> this is the main link
> 
> 
> 
> hello
> hello
> hello
> hello
> hello
> hello
> 
> 
> hello
> hello
> hello
> hello
> hello
> hello
> 
> 
> hello
> hello
> hello
> hello
> hello
> hello
> 
> 
> 
> 
> this is the main link
> 
> 
> 
> hello
> hello
> hello
> hello
> hello
> hello
> 
> 
> hello
> hello
> hello
> hello
> hello
> hello
> 
> 
> hello
> hello
> hello
> hello
> hello
> hello
> 
> 
> 
> 
> 
>
> 
> 
>
> Thanks.
>
>


[jQuery] Re: hoverIntent help: firing dropdowns all at once (extreme novice)

2007-10-17 Thread Olivier Percebois-Garve


You need to clean up your html :  is forbidden.
After a  there should always be a .  ans  should go 
around that.


Your functions  are targeting  "ul.tags". so it will show/hide all the 
markup inside of that tag.


-Olivier


c.s. wrote:

I'm using the hoverIntent plugin to control a series of drop-down
menus. I have it set up and it works save for the fact that if I hover
over a li element it fires (displays) all the of drop-downs instead of
doing it individually.

I think I need to set up some sort of timer, or stop (?) This is my
first js experience so I'm not quite sure how. Any help would be
grealy apppreciated.

The code looks like this:









$(document).ready(function(){
$("#topmenu li ").hoverIntent({
sensitivity: 1,
interval: 1000,
over: makeTall,
timeout: 1000,
out: makeShort
});
}); // close document.ready

function makeTall(){  $("ul.tags").css({ display:"block" });}
function makeShort(){  $("ul.tags").css({ display:"none" });}











this is the main link



hello
hello
hello
hello
hello
hello


hello
hello
hello
hello
hello
hello


hello
hello
hello
hello
hello
hello




this is the main link



hello
hello
hello
hello
hello
hello


hello
hello
hello
hello
hello
hello


hello
hello
hello
hello
hello
hello









Thanks.


  




[jQuery] Re: creating drop down menus with JQuery?

2007-10-17 Thread [EMAIL PROTECTED]

I do.  It is

http://elearningrd.info/portal/test.php

 - Dave

On Oct 17, 10:09 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> Do you have a URL of a sample page?
>
> -js
>
> On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I tried setting all the padding attributes in the jdMenu.slate.css
> > file to zero, but still no luck -- the menu appears away (to the
> > bottom and right) of the graphic).  On your web site, you mention the
> > plug-in supports relative positioning.  Is there an example somewhere
> > on the site?  I can just model my code off the example.
>
> > Thanks for your replies, - Dave
>
> > On Oct 17, 9:29 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > The menu positioning code uses absolute positioning. Try removing the
> > > padding in CSS on the LI which should then make the menu appear directly
> > > below the arrow.
>
> > > Cheers,
> > > -js
>
> > > On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > wrote:
>
> > > > Beautiful.  This may also be a non-jdMenu question but I'll throw this
> > > > out there.  I want my drop-down menu to appear right beneath the arrow
> > > > image, whereever the arrow may be positioned on the screen.  But when
> > > > I insert the "relative" style in the  tag:
>
> > > >
> > > > > > > border="0"
> > > > align="middle" height="16" width="16" />
> > > >
> > > > > > > title="Edit
> > > > Module Title" class="editLink" href="#">Edit Module Title
>
> > > > > > > class="myspaceLink" href="#" title="Export MySpace HTML">Export
> > > > MySpace HTML
> > > >
> > > >
> > > >
>
> > > > The menu actually appears quite away (to the right and bottom) of the
> > > > arrow.  It does this for both PC IE and Firefox, although I can't tell
> > > > if the distances are the same.  Any advice for relatively lining up
> > > > the menu directly beneath the image?
>
> > > > Thanks, - Dave
>
> > > > On Oct 16, 3:56 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > > > I think this is less of a jdMenu specific thing but you could do
> > > > something
> > > > > like the following:
>
> > > > > Assuming:
> > > > > 
> > > > > Text  > > > align="middle"
> > > > > height="16" width="16" />...
>
> > > > > $('ul.jd_menu > li').hover(function() {
> > > > > $('> img', this).attr('src', 'url-to-image.jpg');},
>
> > > > > function() {
> > > > > $('> img', this).attr('src', 'url-to-other-image.jpg');
>
> > > > > });
>
> > > > > -js
>
> > > > > On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > > Thanks for this info.  Worked great.
>
> > > > > > One more small question.  To trigger the appearance of a drop-down
> > > > > > menu, I have an image of an arrow
>
> > > > > >  > > > > > height="16" width="16" />
>
> > > > > > but when the user rolls over the image, I'd like the source of the
> > > > > > image to change to something else to indicate the menu is
> > "active".
> > > > > > How do I do this with jdMenu?
>
> > > > > > - Dave
>
> > > > > > On Oct 16, 2:28 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote:
> > > > > > > $('ul.jd_menu').jdMenu({
> > > > > > > activateDelay: 100
>
> > > > > > > });
>
> > > > > > > Should work, here are the other options:
> > > > > > > showDelay: 150 hideDelay: 550
>
> > > > > > > Sorry there isn't any documentation yet.
>
> > > > > > > -js
>
> > > > > > > On 10/16/07, [EMAIL PROTECTED] <
> > [EMAIL PROTECTED]>
> > > > > > wrote:
>
> > > > > > > > Hey Chris, Thanks for this recommendation.  One thing I'm
> > noticing
> > > > > > > > when playing with this is that when I roll over the item that
> > is
> > > > > > > > supposed to trigger the appearance of the drop down menu,
> > there is
> > > > a
> > > > > > > > one second delay getting the menu to appear.  Is this a
> > setting
> > > > > > > > somewhere that can be adjusted?  I'd like it to be
> > > > instant.  Here's my
> > > > > > > > code:
>
> > > > > > > >  > > >http://www.w3.org/
> > > > > > > > TR/REC-html40/strict.dtd">
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
>
> > > > > > > > > href="styles/jdMenu.css?"
> > > > > > > > type="text/css" />
>
> > > > > > > > > > > > > > > src="scripts/jquery.js">
> > > > > > > > > > > > > > > src="scripts/lib/bgiframe.js"> > > > > > > > script>
> > > > > > > >