[jQuery] Dynamically set function settings?

2007-07-20 Thread juliandormon


Hey all,
I am using the innerFade plug-in, though my question could apply to any
function.

Inner fade takes a bunch of divs or images or paragraphs, and animates them
if they fall within a class. There are certain parameters that you specify
when you call innerFade into action, such as speed, fade type, etc.
I would like my users to choose what the options (parameters) are for the
fading effect and store these in a Database. It would be no problem to write
these functions on the fly from the server side but my app uses one page
with ajax. I cannot reload the page.

Is it possible to write javascript dynamically so new functions are created
with the new parameters once the user makes a change? These functions need
to be added to the head of my page because they get called after other
functions. In other words, the new functions interact with the javascript
that's already on the page. I guess they could be written elsewhere
dynamically within a main function and I simply call this remote function
and thereby any sub  functions that have been written to it. Is this
possible?

It would be great if the parameters could be written into the div's class
(which could be done via ajax) and extracted from there by the plug-in. Is
this possible?

Thanks in advance!
-- 
View this message in context: 
http://www.nabble.com/Dynamically-set-function-settings--tf4120797s15494.html#a11719436
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: superfish delay not working

2007-07-20 Thread Joel Birch


On 21/07/2007, at 11:09 AM, cpsengine wrote:

I have a single-level css dropdown and wanted to add a delay, so I
setup superfish. It's working as I can see the animation when I mouse
over my menu, but the mouse delay isn't working. I think I need to add
the sfHover class somewhere into my css, but can't find exactly what I
need to change to get this working. I was using the demo CSS file as
an example but could not get it to work. Here's my CSS

#header #nav { position: absolute; list-style: none; right: 0px; top:
60px; background: #323232; }
#header #nav li { z-index:999; position: relative; padding: 0px 8px;
display: inline; text-transform: uppercase; font-size: 14px; line-
height: 30px; height: 30px; font-weight: bold; }
#header #nav li a { color: #ccc; text-decoration: none; }
#header #nav li a:hover { color: #fff; }
#header #nav li ul { position: absolute; top: -999em; background:
#323232; width: 175px; }
#header #nav li:hover ul { top: 17px; left: 0px; }
#header #nav li ul li { line-height: 24px; display: block; height:
24px; font-size: 10px; color: #fff; text-transform: uppercase; font-
weight: normal; border-bottom: 1px solid #444; }
#header #nav li ul li:hover { background-color: #393939; }
#header #nav li.superfish li:hover ul, #header #nav .superfish li
li:hover ul { top: -999em; }

nav is the id of my ul, and I'm implementing like this:

$(document).ready(function(){
$("ul#nav").superfish({
delay:  500,
speed:  'slow'
});
});

Any ideas?


Superfish works by using the sfHover class instead of the normal  
CSS :hover rules. You need the sfHover class to make the hovers work  
in IE6 anyway, so when javascript is available the CSS class  
'superfish' is added to the element you called superfish on and the  
CSS changes :hover descendants of .superfish to remain hidden. It's  
important that your sfHover rules override that and position the  
submenus to be visible, just as your pure CSS :hovers will when  
javascript is not available.


So that's the theory. The interplay of CSS rules overriding correctly  
is kind of fiddly so in practice it is easiest to begin with the demo  
CSS files so you have a working menu, then alter that CSS to style it  
as you wish.


The hoverIntent plugin is not required for the timed delay on  
mouseout to work - hoverIntent is only used (when it's available) to  
provide a similar effect on mouseover.


Joel Birch.



[jQuery] Re: Effect - Slide Up/Down

2007-07-20 Thread debussy007


Thank you all for your nice tips !!
In my case it is better to change effect,
fadeIn / fadeOut

My table is quiete complexe and I ahd troubles with the slide Up / Down.

FadIn / Out works perfectly in FireFox, but not in IE 6 ! There is no effect
at all.
Here is my example :
(u will not like my HTML / CSS, it's because I want to display and align
elemnts in a complex way) :

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">



jQuery(document).ready(function() {
$("#level2").hide();
$("#goLevel2").click(function(){
$("#level2:hidden").fadeIn("slow");
});
$("#backLevel1").click(function(){
$("#level2:visible").fadeOut("slow");
});
});










Search



Test



Test
Test
Test



 to 



Test
Test
Test


 


Test



Test
Test


 


 # More Options >> 







   
 # < 
> Rick,
> 
> That looks really great. Might be time to update the version of  
> jQuery on that site, though, because FF2 Mac gets the initial flicker  
> on the slideDown due to a jquery.js bug which has since been fixed.
> 
> Also, Erik Beeson did some fantastic work with this, using iFrames:
> http://erikandcolleen.com/erik/projects/jquery/content_table/
> 
> Of course, if you don't mind using a different effect, the fadeIn/ 
> fadeOut effects work just fine out of the box with table rows.
> 
> 
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
> On Jul 20, 2007, at 9:31 PM, Rick Faircloth wrote:
> 
>> Oops… the URL should be:
>>
>>
>>
>> http://ha2.whitestonemedia.com/cfm/church_calendar.cfm
>>
>>
>>
>> Sorry…
>>
>>
>>
>> From: jquery-en@googlegroups.com [mailto:jquery- 
>> [EMAIL PROTECTED] On Behalf Of Rick Faircloth
>> Sent: Friday, July 20, 2007 9:23 PM
>> To: jquery-en@googlegroups.com
>> Subject: [jQuery] Re: Effect - Slide Up/Down
>>
>>
>>
>> I know this may sound goofy as a solution, but when I first starting
>>
>> working jQuery, one of the first things I tried to do was slide a  
>> table row.
>>
>>
>>
>> As you said, Glen, it’s not a pretty sight.  I tried something a  
>> little more
>>
>> radical.  I use separate *tables* for each row with each table  
>> wrapped in a div.
>>
>> In other words, each row was a table in a div.
>>
>>
>>
>> I code ColdFusion, so I was outputting a query and looping it and  
>> would
>>
>> have one table as a row of general info, and the second table right  
>> below
>>
>> it (initially hidden) would hold details.
>>
>>
>>
>> A whole table would slide much more smoothly.
>>
>>
>>
>> Go to this link and click on any row in the church calendar and  
>> you’ll see what
>>
>> I mean…
>>
>>
>>
>> http://ha2.whitestonemedia.com/cfm/calendar.cfm
>>
>>
>>
>> Rick
>>
>>
>>
>> From: jquery-en@googlegroups.com [mailto:jquery- 
>> [EMAIL PROTECTED] On Behalf Of Glen Lipka
>> Sent: Friday, July 20, 2007 6:59 PM
>> To: jquery-en@googlegroups.com
>> Subject: [jQuery] Re: Effect - Slide Up/Down
>>
>>
>>
>> Couple of issues.
>> 1. You can use SlideToggle to reduce complexity alot.
>> $("input.oneButton").click(function(){
>>   $("#level2").slideToggle("slow");
>> });
>>
>> However, you may WANT two buttons.
>>
>> 2. You can't really slideup a TR.  Its not that flexible in that.
>> I whipped up a demo to show a possible solution.
>> http://www.commadot.com/jquery/selectors/slidingRow.htm
>>
>> There probably is an easier way, but this was my first thought.
>>
>> Glen
>>
>>
>> On 7/20/07, debussy007 <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> Hi,
>>
>> I try to apply effect on a very basic example,
>> But I can't have it working.
>>
>> Can anyone help me with this ?
>>
>> 

[jQuery] Re: Effect - Slide Up/Down

2007-07-20 Thread Rick Faircloth
Thanks for the tips, Karl.

 

I haven't had time to do much with jQuery for a little while since

working with it for a couple of weeks.

 

I'll check out the new version and Erik's work.

 

Rick

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Karl Swedberg
Sent: Friday, July 20, 2007 10:36 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Effect - Slide Up/Down

 

Rick, 

 

That looks really great. Might be time to update the version of jQuery on
that site, though, because FF2 Mac gets the initial flicker on the slideDown
due to a jquery.js bug which has since been fixed.





Also, Erik Beeson did some fantastic work with this, using iFrames:

http://erikandcolleen.com/erik/projects/jquery/content_table/

 

Of course, if you don't mind using a different effect, the fadeIn/fadeOut
effects work just fine out of the box with table rows.

 

 

--Karl

_

Karl Swedberg

www.englishrules.com

www.learningjquery.com

 





 

On Jul 20, 2007, at 9:31 PM, Rick Faircloth wrote:





Oops. the URL should be:

 

 
http://ha2.whitestonemedia.com/cfm/church_calendar.cfm

 

Sorry.

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Faircloth
Sent: Friday, July 20, 2007 9:23 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Effect - Slide Up/Down

 

I know this may sound goofy as a solution, but when I first starting

working jQuery, one of the first things I tried to do was slide a table row.

 

As you said, Glen, it's not a pretty sight.  I tried something a little more

radical.  I use separate *tables* for each row with each table wrapped in a
div.

In other words, each row was a table in a div.

 

I code ColdFusion, so I was outputting a query and looping it and would

have one table as a row of general info, and the second table right below

it (initially hidden) would hold details.

 

A whole table would slide much more smoothly.

 

Go to this link and click on any row in the church calendar and you'll see
what

I mean.

 

 
http://ha2.whitestonemedia.com/cfm/calendar.cfm

 

Rick

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Glen Lipka
Sent: Friday, July 20, 2007 6:59 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Effect - Slide Up/Down

 

Couple of issues.
1. You can use SlideToggle to reduce complexity alot.
$("input.oneButton").click(function(){
  $("#level2").slideToggle("slow"); 
});

However, you may WANT two buttons. 

2. You can't really slideup a TR.  Its not that flexible in that.
I whipped up a demo to show a possible solution.
 
http://www.commadot.com/jquery/selectors/slidingRow.htm 

There probably is an easier way, but this was my first thought.

Glen




On 7/20/07, debussy007 <  [EMAIL PROTECTED]>
wrote:



Hi,

I try to apply effect on a very basic example,
But I can't have it working. 

Can anyone help me with this ?

Thank you !!

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
http://www.w3.org/1999/xhtml> http://www.w3.org/1999/xhtml";
xml:lang="en" lang="en">


#level2 {background-color:#DFEBFF;}

$(document).ready(function(){ 
$("input.buttonBslidedown").click(function(){
$("#level2:hidden").slideDown("slow");
});
$("input.buttonBslideup ").click(function(){
$("#level2:visible").slideUp("slow");
});
});


 


 


row 1, cell 1
row 1, cell 2


row 2, cell 1
row 2, cell 2


--
View this message in context:

http://www.nabble.com/Effect---Slide-Up-Down-tf4119902s15494.html#a11717084 
Sent from the JQuery mailing list archive at  
Nabble.com.

 





 



[jQuery] Re: Problem with jQuery + Dimension plugin + Autocomplete plugin + Float

2007-07-20 Thread Brandon Aaron

Are you using units other than pixels for anything?

--
Brandon Aaron

On 7/20/07, Mark <[EMAIL PROTECTED]> wrote:




Hi Brandon,
It is difficult to create an example, because it is a complex
application, and the autocomplete is highly customized.
And also I am going vacations right now, and I will be back in August.
This is a big DIV, and inside has two DIVs one floated left, and the
other floated right.
And inside the floated DIVs, it is positioning an absolute DIV (for
the autocomplete) with Dimensions.

In Mozilla works fine, the problem is in IEbut in IE7 it works
fine also, so I have to check the IE version for using my patch.

When I am back, I will try to send you an example, if still needed.

Bye!

On 17 jul, 16:45, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> Could you still send me an example of the issue you are having?
>
> --
> Brandon Aaron
>
> On 7/17/07, Mark <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I've downloaded the latest version of dimensions and still having the
> > same problem (anyway it is working with my "combined position fix"
> > using position and offset in MSIE).
>
> > On 16 jul, 01:28, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> > > You can grab the latest from SVN from google code here:
> >http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/
>
> > > --
> > > Brandon Aaron
>
> > > On 7/15/07, Mark <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Brandon,
> > > > I am using the rc1 version of the dimensions plugin, with jQuery
> > > > 1.1.2.
> > > > I have made several modifications to the autocomplete component so
I
> > > > cant just upgrade, I will have to check the improvments and try to
> > > > apply them.
> > > > I dont have the sources here, but tomorrow I will try to post you
an
> > > > example.
> > > > Where can I download the latest version of dimensions ?
>
> > > > Thanks
> > > > Mark
>
> > > > On 15 jul, 00:36, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> > > > > Actually, what version of the autocomplete plugin are you using.
It
> > > > looks
> > > > > like the latest depends on the dimensions plugin. Perhaps you
should
> > > > grab
> > > > > both the latest versions of the dimensions and the autocomplete
> > plugins.
>
> > > > > --
> > > > > Brandon Aaron
>
> > > > > On 7/14/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hey Mark,
>
> > > > > > Could you possibly post an example of the issue? I'm having
> > trouble
> > > > > > following what exactly is going on. Also, try grabbing the
latest
> > > > version of
> > > > > > Dimensions from SVN as it has been recently updated.
>
> > > > > > --
> > > > > > Brandon Aaron
>
> > > > > > On 7/14/07, Mark <[EMAIL PROTECTED] > wrote:
>
> > > > > > > Hi!
> > > > > > > I am using jQuery with the autocomplete plugin.
> > > > > > > Everything was right, but I had to float the div, which
contains
> > all
> > > > > > > input components, so the result div of the autocomplete
became
> > crazy
> > > > > > > about finding its position.
>
> > > > > > > So, I downloaded the Dimensions plugin, and the following is
> > > > > > > happening:
>
> > > > > > > In Mozilla it works fine, and the offset function gets the
same
> > > > > > > results as the autocomplete built in findPos function.
>
> > > > > > > But in explorer, in order to position the window properly I
had
> > to
> > > > > > > call dimensions.position() for the top value and
> > dimensions.offset()
> > > > > > > for the left value...
>
> > > > > > > So I am using it now with if ($.browser.msie)...
>
> > > > > > > Anyone knows why it is happening? ...maybe I am doing
something
> > > > wrong
> > > > > > > with the floats...
>
> > > > > > > If this is an IE bug, maybe could be fixed in the dimensions
> > plugin.
>
> > > > > > > Thanks
> > > > > > > Mark.- Ocultar texto de la cita -
>
> > > > > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> > > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -




[jQuery] Re: Problem with jQuery + Dimension plugin + Autocomplete plugin + Float

2007-07-20 Thread Mark


Hi Brandon,
It is difficult to create an example, because it is a complex
application, and the autocomplete is highly customized.
And also I am going vacations right now, and I will be back in August.
This is a big DIV, and inside has two DIVs one floated left, and the
other floated right.
And inside the floated DIVs, it is positioning an absolute DIV (for
the autocomplete) with Dimensions.

In Mozilla works fine, the problem is in IEbut in IE7 it works
fine also, so I have to check the IE version for using my patch.

When I am back, I will try to send you an example, if still needed.

Bye!

On 17 jul, 16:45, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> Could you still send me an example of the issue you are having?
>
> --
> Brandon Aaron
>
> On 7/17/07, Mark <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I've downloaded the latest version of dimensions and still having the
> > same problem (anyway it is working with my "combined position fix"
> > using position and offset in MSIE).
>
> > On 16 jul, 01:28, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> > > You can grab the latest from SVN from google code here:
> >http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/
>
> > > --
> > > Brandon Aaron
>
> > > On 7/15/07, Mark <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Brandon,
> > > > I am using the rc1 version of the dimensions plugin, with jQuery
> > > > 1.1.2.
> > > > I have made several modifications to the autocomplete component so I
> > > > cant just upgrade, I will have to check the improvments and try to
> > > > apply them.
> > > > I dont have the sources here, but tomorrow I will try to post you an
> > > > example.
> > > > Where can I download the latest version of dimensions ?
>
> > > > Thanks
> > > > Mark
>
> > > > On 15 jul, 00:36, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> > > > > Actually, what version of the autocomplete plugin are you using. It
> > > > looks
> > > > > like the latest depends on the dimensions plugin. Perhaps you should
> > > > grab
> > > > > both the latest versions of the dimensions and the autocomplete
> > plugins.
>
> > > > > --
> > > > > Brandon Aaron
>
> > > > > On 7/14/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hey Mark,
>
> > > > > > Could you possibly post an example of the issue? I'm having
> > trouble
> > > > > > following what exactly is going on. Also, try grabbing the latest
> > > > version of
> > > > > > Dimensions from SVN as it has been recently updated.
>
> > > > > > --
> > > > > > Brandon Aaron
>
> > > > > > On 7/14/07, Mark <[EMAIL PROTECTED] > wrote:
>
> > > > > > > Hi!
> > > > > > > I am using jQuery with the autocomplete plugin.
> > > > > > > Everything was right, but I had to float the div, which contains
> > all
> > > > > > > input components, so the result div of the autocomplete became
> > crazy
> > > > > > > about finding its position.
>
> > > > > > > So, I downloaded the Dimensions plugin, and the following is
> > > > > > > happening:
>
> > > > > > > In Mozilla it works fine, and the offset function gets the same
> > > > > > > results as the autocomplete built in findPos function.
>
> > > > > > > But in explorer, in order to position the window properly I had
> > to
> > > > > > > call dimensions.position() for the top value and
> > dimensions.offset()
> > > > > > > for the left value...
>
> > > > > > > So I am using it now with if ($.browser.msie)...
>
> > > > > > > Anyone knows why it is happening? ...maybe I am doing something
> > > > wrong
> > > > > > > with the floats...
>
> > > > > > > If this is an IE bug, maybe could be fixed in the dimensions
> > plugin.
>
> > > > > > > Thanks
> > > > > > > Mark.- Ocultar texto de la cita -
>
> > > > > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> > > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -



[jQuery] Re: Effect - Slide Up/Down

2007-07-20 Thread Karl Swedberg

Rick,

That looks really great. Might be time to update the version of  
jQuery on that site, though, because FF2 Mac gets the initial flicker  
on the slideDown due to a jquery.js bug which has since been fixed.


Also, Erik Beeson did some fantastic work with this, using iFrames:
http://erikandcolleen.com/erik/projects/jquery/content_table/

Of course, if you don't mind using a different effect, the fadeIn/ 
fadeOut effects work just fine out of the box with table rows.



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



On Jul 20, 2007, at 9:31 PM, Rick Faircloth wrote:


Oops… the URL should be:



http://ha2.whitestonemedia.com/cfm/church_calendar.cfm



Sorry…



From: jquery-en@googlegroups.com [mailto:jquery- 
[EMAIL PROTECTED] On Behalf Of Rick Faircloth

Sent: Friday, July 20, 2007 9:23 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Effect - Slide Up/Down



I know this may sound goofy as a solution, but when I first starting

working jQuery, one of the first things I tried to do was slide a  
table row.




As you said, Glen, it’s not a pretty sight.  I tried something a  
little more


radical.  I use separate *tables* for each row with each table  
wrapped in a div.


In other words, each row was a table in a div.



I code ColdFusion, so I was outputting a query and looping it and  
would


have one table as a row of general info, and the second table right  
below


it (initially hidden) would hold details.



A whole table would slide much more smoothly.



Go to this link and click on any row in the church calendar and  
you’ll see what


I mean…



http://ha2.whitestonemedia.com/cfm/calendar.cfm



Rick



From: jquery-en@googlegroups.com [mailto:jquery- 
[EMAIL PROTECTED] On Behalf Of Glen Lipka

Sent: Friday, July 20, 2007 6:59 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Effect - Slide Up/Down



Couple of issues.
1. You can use SlideToggle to reduce complexity alot.
$("input.oneButton").click(function(){
  $("#level2").slideToggle("slow");
});

However, you may WANT two buttons.

2. You can't really slideup a TR.  Its not that flexible in that.
I whipped up a demo to show a possible solution.
http://www.commadot.com/jquery/selectors/slidingRow.htm

There probably is an easier way, but this was my first thought.

Glen


On 7/20/07, debussy007 <[EMAIL PROTECTED]> wrote:



Hi,

I try to apply effect on a very basic example,
But I can't have it working.

Can anyone help me with this ?

Thank you !!

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

script>