[jQuery] Re: Updating ID in two places

2007-05-31 Thread Klaus Hartl


Smith, Allex wrote:

Instead I would apply a class to them like:

.boldClass {
font-weight:700;
}


You should avoid such presentational naming. If the look of it changes 
next week, the class name doesn't make sense any longer and to keep it 
maintainable you'd have to change the class name as well.


Derive class names from the function/meaning of the elements to add 
additional semantic to the element. In this case for example maybe 
something like "product-size". This class is completely independent from 
its presentation.


Class names like "bold", "blue", "right" are kind of like using inline 
styles in the first place.



-- Klaus


[jQuery] Re: onfocus filter question

2007-05-31 Thread John Resig


I think the fool-proof way would be to do something like adding a
class, for example:

$("input.text:not(.focused)").focus(function(){ ... }).addClass("focused");

That way you can run that line as many times as you want and it'll
never re-bind the focus event.

--John

On 5/31/07, John R <[EMAIL PROTECTED]> wrote:


I have a table with rows of input fields that is dynamic in that the
user can add / remove rows.  I'm trying to trigger a function whenever
the user clicks in any of the fields, so for example I use this:

$("input.text").focus( function() { alert("In textfield"); } );

After a row is dynamically added, I need to reapply this so the new
rows fields will trigger the function as well, but if I just use that
line again then the original rows get triggered twice.

So, I'm trying to figure out how to filter out all the fields that
already have a focus event attached.  Basically, how do I say "Give me
all input.text's that don't have an onfocus set?

Thanks
John




[jQuery] Re: Need help with interface slider on Firefox/Win

2007-05-31 Thread Mitch

On May 31, 6:33 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> On 5/31/07, Mitch <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to build a horizontal slider using the jQuery interface
> > plugin.  ...
>
> > Any help would be greatly appreciated.  Please let me know if you need
> > additional information.
>
> Some code samples would be great. Also, are you using the dimensions plugin?

I'm not using the dimensions plugin.

While assembling code samples I discovered the cause of my problem.
It's kind of embarrassing -- somehow I had given my document body's
position to relative.  Removing that fixed the problem.

Thanks for the help, though.



[jQuery] Re: DIV onresize

2007-05-31 Thread Ⓙⓐⓚⓔ

As far as I know, nothing works but  window.onresize


On 5/31/07, Glen Lipka <[EMAIL PROTECTED]> wrote:


Is there a way of putting a listener on a DIV that listens for it's height
changing?
Resize didnt do it I think.

Glen





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] DIV onresize

2007-05-31 Thread Glen Lipka

Is there a way of putting a listener on a DIV that listens for it's height
changing?
Resize didnt do it I think.

Glen


[jQuery] Interface plugins iselect and idrag

2007-05-31 Thread [EMAIL PROTECTED]

Hi,

I have some weird problems using the interface plugins iselect.js and
idrag.js.

One issue is the failure message I get when trying to use the
"onselect" event for the Selectable plugin.
Firebug brings up the failure message "a.get(0) has no properties"
when executing the Selectserialize function. Is there any special way
how to handle the select event or addressing the serialize function to
get the elements properly?

The other issue is somehow related to the first one. When I try to
drag multiple elements I declare the Selectable and Draggable
functions. The given demo works fine 
http://interface.eyecon.ro/demos/download.html.
But all selectable elements are positioned absolute, which is total
inadequate for my purposes, so I tried to change the properties to a
relative positioning of the elements but the multiple selection
doesn't work (elements out of the pointer focus "run" away). When I
pull the elements seperatley first, drag them and afterwards make a
multiple selection it works fine.

Does anyone succesfully implemented it in a different way or has a
solution for the relative positioning issue?

Thanks

Frank



[jQuery] Re: NEWS: jQuery Mentioned on MrBool.com

2007-05-31 Thread Rey Bango


Thanks for coming over and getting more feedback on jQuery, Marty. The 
community is very supportive of this project so anything that's written 
which may not be 100% on target will be scrutinized. Even better, 
though, is the fact that we try to work with the author in question to 
ensure accuracy in the hopes of getting the information updated.


Thanks again for coming over and please feel free to ask any questions. 
We're here to help.


Rey Bango
jQuery Team

martykube wrote:



On May 21, 4:22 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:

Rey, I'm a little dense here, but not exactly sure what he is trying to say
with this line:
"However, it does not support a reusable programming model like an object
oriented approach, so you should not expect thousands of lines of JQuery
code to be a good asset to your project"
can anyone clarify.  Is this a compliment or a knock against jquery?

I think they mean it as a knock, but I don't agree with the statement.

While it's true the plug-in architecture isn't a true OO model, you can
definitely build re-usable logic using the plug-ins.

And there's nothing preventing you to building all your code OO-based and
using jQuery to interact w/the DOM. In a nutshell, that's what jQuery really
is--a DOM helper.

-Dan


Hi,

I'm one of the authors of the article.

JQuery is obviously a solid product with a great following.

Here are my apologies for any offense given, no knock was intended.

You've raised some good points here.   I'll post a comment on the
article back to this thread.

Regards

Marty Kube




[jQuery] Re: Need help with interface slider on Firefox/Win

2007-05-31 Thread Richard D. Worth

On 5/31/07, Mitch <[EMAIL PROTECTED]> wrote:



I'm trying to build a horizontal slider using the jQuery interface
plugin.  ...

Any help would be greatly appreciated.  Please let me know if you need
additional information.



Some code samples would be great. Also, are you using the dimensions plugin?

- Richard


[jQuery] Re: Question about Superfish menu

2007-05-31 Thread Joel Birch


Hi Carleigh,

The HoverIntent plugin by Brian Cherne does exactly what you want. I  
had a go using it with Superfish when HoverIntent was still in beta  
and had some success but there were some glitches I didn't get  
around. Can't remember exactly what they were or which browsers they  
occurred in but there was work done on HoverIntent after that which  
may have addressed those issues anyway.


I recommend looking into replacing the mouseover parts of Superfish  
with the HoverIntent's version. You may find you need to do something  
like:


.hoverIntent(over,function() {}).hover(function() {}, out)

Good luck. I'll be very interested in how you go. Could you post your  
results back here?


Joel Birch.


On 01/06/2007, at 8:25 AM, Carleigh Romeis wrote:

Hello!

  I am working on creating a new navigation and I really like how  
the Superfish dropdown works.   However I would like to alter it a  
bit by adding a delay before the drop down occurs.  My goal is to  
create a menu so that when you rollover it there is a slight pause  
before the menu drops down, but if your mouse moves off of the nav  
button before the delay is over, then the menu does not drop down  
at all.   So far I have been unable to get something to work and I  
would appreciate any suggestions that you have to offer!



Thank you,

  Carleigh R.




[jQuery] onfocus filter question

2007-05-31 Thread John R

I have a table with rows of input fields that is dynamic in that the
user can add / remove rows.  I'm trying to trigger a function whenever
the user clicks in any of the fields, so for example I use this:

$("input.text").focus( function() { alert("In textfield"); } );

After a row is dynamically added, I need to reapply this so the new
rows fields will trigger the function as well, but if I just use that
line again then the original rows get triggered twice.

So, I'm trying to figure out how to filter out all the fields that
already have a focus event attached.  Basically, how do I say "Give me
all input.text's that don't have an onfocus set?

Thanks
John



[jQuery] "Line break" between label and input when using image

2007-05-31 Thread gee

Great work!

An issue I have experienced with both the original datePicker and v2
involves the date's text input field "breaking" to a new line when
using a button to trigger datePicker instead of the "Choose date"
text.

E.g., instead of:

Start date: [text input] [.png]

The display appears as:

Start date:
[text input][.png]

I gather it has something to do with using a float in the style
declaration for a.dp-choose-date. Before I wade into experimenting
with alternate style declarations, I am wondering if anyone else has
already come up with a different markup that allows a label, text
input, and date selector button to appear on the same line.



[jQuery] Question about Superfish menu

2007-05-31 Thread Carleigh Romeis
Hello!

  I am working on creating a new navigation and I really like how the
Superfish dropdown works.   However I would like to alter it a bit by adding
a delay before the drop down occurs.  My goal is to create a menu so that
when you rollover it there is a slight pause before the menu drops down, but
if your mouse moves off of the nav button before the delay is over, then the
menu does not drop down at all.   So far I have been unable to get something
to work and I would appreciate any suggestions that you have to offer!



Thank you,

  Carleigh R.


[jQuery] Re: NEWS: jQuery Mentioned on MrBool.com

2007-05-31 Thread martykube



On May 21, 4:22 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> >Rey, I'm a little dense here, but not exactly sure what he is trying to say
> >with this line:
>
> > "However, it does not support a reusable programming model like an object
> >oriented approach, so you should not expect thousands of lines of JQuery
> >code to be a good asset to your project"
>
> >can anyone clarify.  Is this a compliment or a knock against jquery?
>
> I think they mean it as a knock, but I don't agree with the statement.
>
> While it's true the plug-in architecture isn't a true OO model, you can
> definitely build re-usable logic using the plug-ins.
>
> And there's nothing preventing you to building all your code OO-based and
> using jQuery to interact w/the DOM. In a nutshell, that's what jQuery really
> is--a DOM helper.
>
> -Dan

Hi,

I'm one of the authors of the article.

JQuery is obviously a solid product with a great following.

Here are my apologies for any offense given, no knock was intended.

You've raised some good points here.   I'll post a comment on the
article back to this thread.

Regards

Marty Kube



[jQuery] Need help with interface slider on Firefox/Win

2007-05-31 Thread Mitch

I'm trying to build a horizontal slider using the jQuery interface
plugin.  When I click on the slider's indicator, the indicator jumps
well to the right of the mouse cursor.  This behavior manifests with
Firefox 2.0.0.4 / Windows; everything works correctly with IE 6.

The slider has a single indicator.  The slider's HTML elements are
nested inside several levels of  elements.

The slider is inside a div with CSS position:relative.  The slider has
position:relative, and the indicator  has position:absolute.

Any help would be greatly appreciated.  Please let me know if you need
additional information.



[jQuery] Re: Weirdness in IE

2007-05-31 Thread Joel Taylor
Richard, sorry for miss-understanding you.
However, thank you, thank you, thank you for pointing out my error I
changed that style to:
#content h1 + p, #content hr + p

and that fixed it!
oh my gosh.
mystery solved.

Joel

On 5/31/07, Richard D. Worth <[EMAIL PROTECTED]> wrote:
>
> On 5/31/07, Joel Taylor <[EMAIL PROTECTED]> wrote:
> >
> >
>
> > On 5/30/07, Richard D. Worth < [EMAIL PROTECTED]> wrote:
> > >
> > >
> > > I think I found a minimal test case for you. It's just IE, CSS, and
> > > DOM (no jQuery bug):
> > >
> > > ...
> > >
> > > Talk about weird. Removing either the  or the :hover{} seems
> > > to fix it. Looks like a strange IE bug.
> > >
> > > Ok, I tried both of those, and neither of them fixed the issue in IE7
> > (I didnt even check IE6)
>
>
> I'm using IE7 also. Those two things that I mentioned aren't fixes for
> your problem, they're just two things that make this minimal test case no
> longer a valid case for this IE bug (the bug being that the specified CSS
> doesn't update until you hover your mouse).
>
> The browser is doing what you have told it to do (albeit at a slightly
> off/late time, due to the bug). The css rule in ie7-styles.css says:
>
> #content H1 + P { MARGIN-TOP: -10px }
>
> When you insert a non-P just after that H1 (after the H1 and before the P)
> that P will no longer have a -10px top margin. That should happen as soon as
> you add the non-P element. In IE, it seems to be happening as soon as you
> hover your mouse on the document. I would guess your fix is change this
> rule, or add a similar one for your non-P element.
>
> - Richard
>
>
> >
>


[jQuery] Re: tabs plugin with imagebox?

2007-05-31 Thread Sean Catchpole


When I visit the page in both IE and Firefox it seems to load on top
of the page just fine.

~Sean


[jQuery] Re: Updating ID in two places

2007-05-31 Thread Sean Catchpole


I don't think that will work.
If "d" is your span, then it doesn't have an attribute of productSizeName.

Perhaps you should consider changing the html around a little, it
seems a little unorganized.

~Sean


[jQuery] Re: Updating ID in two places

2007-05-31 Thread cfdvlpr

Sorry, I left out too much context.  Here's more of my HTML code:

Select Size: 
  2 x 2
  2 x 4

And, here's more of the Jquery:

function switchSize(span){
d = $(span);
var ps = "#productSizeTitle";
$(ps).empty().append(d.attr('productSizeName'));
var ps2 = "#productSizeTitle2";
$(ps2).empty().append(d.attr('productSizeName'));
}



[jQuery] Re: Updating ID in two places

2007-05-31 Thread Smith, Allex

I'm a little confuse by you code.

I would drop using Id's for productSizeTitle and productSizeTitle2 or at
least setting your css for them by id.

Instead I would apply a class to them like:

.boldClass {
font-weight:700;
}

Then for the jQuery code:

$('#productSizeTitle').addClass("boldClass");
$('#productSizeTitle2').addClass("boldClass");

Does that help at all?

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cfdvlpr
Sent: Thursday, May 31, 2007 3:27 PM
To: jQuery (English)
Subject: [jQuery] Updating ID in two places



I have this CSS:

#productSizeTitle {
font-weight:700;
}
#productSizeTitle2 {
font-weight:700;
}

And, down in my HTML I want to display a span with this bold style
twice:

2 x 4
2 x 4

And, I have some Jquery that updates these two span elements:

var ps = "#productSizeTitle";
var ps2 = "#productSizeTitle2";
$(ps).empty().append(d.attr('productSizeName'));
$(ps2).empty().append(d.attr('productSizeName'));


I know there's a better way to do this. How can I condense this so that
it takes up fewer lines of code?



[jQuery] Updating ID in two places

2007-05-31 Thread cfdvlpr

I have this CSS:

#productSizeTitle {
font-weight:700;
}
#productSizeTitle2 {
font-weight:700;
}

And, down in my HTML I want to display a span with this bold style
twice:

2 x 4
2 x 4

And, I have some Jquery that updates these two span elements:

var ps = "#productSizeTitle";
var ps2 = "#productSizeTitle2";
$(ps).empty().append(d.attr('productSizeName'));
$(ps2).empty().append(d.attr('productSizeName'));


I know there's a better way to do this. How can I condense this so
that it takes up fewer lines of code?



[jQuery] Re: onhover Tips

2007-05-31 Thread SamCKayak

I was hoping for a bubbletip based on jQuery.  Bubbletips look great.


baassistance wont require another library and will meet my needs.  T

Thanks,

Sam



[jQuery] Re: onhover Tips

2007-05-31 Thread DaveG


Also check out clueTips: http://examples.learningjquery.com/62/

However, after also researching, I ended up with this non-jQ solution: 
http://web-graphics.com/mtarchive/001717.php It's very small, offers 3-d 
shadow effects, is easy to modify as needed.


 ~ ~ Dave

Sean Catchpole wrote:


The plugins page (http://docs.jquery.com/Plugins) has lots of great
scripts. I always recommend checking there first.

I recommend http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
for a tooltip plugin.

~Sean



[jQuery] tabs plugin with imagebox?

2007-05-31 Thread Robert Vidrine


Greetings,
I'm loving the tabs and imagebox plugins, but am having some trouble 
getting them to play nicely together.

I've used them here:


The problem is that when I launch the imagebox view of one of the 
images, it appears just behind the tabs (which are just in front of the 
shaded page).


I think this has got to be a (hopefully) simple CSS change in either the 
imagebox or tabs stylesheet, but I can't find exactly which property to 
modify.


Anyone like to chime in on this?

Thanks,
Robert Vidrine
Instructional Technology Specialist
Anthropology Department
Wake Forest University
Winston-Salem, NC



[jQuery] Re: Weirdness in IE

2007-05-31 Thread Richard D. Worth

On 5/31/07, Joel Taylor <[EMAIL PROTECTED]> wrote:






On 5/30/07, Richard D. Worth < [EMAIL PROTECTED]> wrote:
>
>
> I think I found a minimal test case for you. It's just IE, CSS, and DOM
> (no jQuery bug):
>
> ...
>
> Talk about weird. Removing either the  or the :hover{} seems
> to fix it. Looks like a strange IE bug.
>
> Ok, I tried both of those, and neither of them fixed the issue in IE7 (I
didnt even check IE6)



I'm using IE7 also. Those two things that I mentioned aren't fixes for your
problem, they're just two things that make this minimal test case no longer
a valid case for this IE bug (the bug being that the specified CSS doesn't
update until you hover your mouse).

The browser is doing what you have told it to do (albeit at a slightly
off/late time, due to the bug). The css rule in ie7-styles.css says:

#content H1 + P { MARGIN-TOP: -10px }

When you insert a non-P just after that H1 (after the H1 and before the P)
that P will no longer have a -10px top margin. That should happen as soon as
you add the non-P element. In IE, it seems to be happening as soon as you
hover your mouse on the document. I would guess your fix is change this
rule, or add a similar one for your non-P element.

- Richard


[jQuery] jQuery on attackr.com

2007-05-31 Thread Shaun Kester

jQuery has been mentioned on attackr.com. It was my turn to write a
quick article on web development and jQuery is an excellent muse.

http://www.attackr.com/file-uploads-with-ajax/



[jQuery] Re: $().load() not working in Opera?

2007-05-31 Thread warlock24

On 30 Maj, 16:26, "Jean Nascimento" <[EMAIL PROTECTED]> wrote:
> but u can do better with the design no? =P
>

and what is wrong with it? :)



[jQuery] Re: onhover Tips

2007-05-31 Thread Sean Catchpole


The plugins page (http://docs.jquery.com/Plugins) has lots of great
scripts. I always recommend checking there first.

I recommend http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
for a tooltip plugin.

~Sean


[jQuery] onhover Tips

2007-05-31 Thread SamCKayak

Any suggestions for onmouseover tip libraries?

Sam



[jQuery] Re: Adding Parameters in a function

2007-05-31 Thread tuliopaiva

I'm trying to add get a parameter with the id of the hidden input.
something like this:
=
function findValue(li, hidden_id) { //add the "hidden_id" parameter
if( li == null ) return alert("No match!");
// if coming from an AJAX call, let's use the id as the value
if( !!li.extra ) var sValue = li.extra[0];
// otherwise, let's just display the value in the text box
else var sValue = li.selectValue;
alert("The value you selected was: " + sValue);
$("#"+hidden_id).value = sValue; //set the value of the hidden
id
}
=
I don't know if is this the best way to do it :P
thank you.


On 31 maio, 17:29, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> >createAutoComplete = function() {
> >return $("#input_box").autocomplete("/buscarServidor/", {
> >delay:10,
> >minChars:2,
> >matchSubset:1,
> >matchContains:1,
> >cacheLength:10,
> >onItemSelect:selectItem,
> >onFindValue:findValue, //how can I add parameters
> here???
> >formatItem:formatItem,
> >autoFill:true
> >});
> >};
>
> >function findValue(li) {
> >if( li == null ) return alert("No match!");
> >// if coming from an AJAX call, let's use the id as the value
> >if( !!li.extra ) var sValue = li.extra[0];
> >// otherwise, let's just display the value in the text box
> >else var sValue = li.selectValue;
> >alert("The value you selected was: " + sValue);
> >}
>
> >
>
> >So, how can I add parameters in the "findValue" function?
>
> What are you actually trying to do? What kind of "parameters" are you
> looking to add?
>
> -Dan



[jQuery] Re: Colon Operator

2007-05-31 Thread Jonathan Sharp

I can't speak for John, but I asked about this about a month ago and
he was saying it was slated for the 1.2 release.

-js


On May 31, 2:46 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Rick Faircloth wrote:
> > Let's hope so... I want him to be in business
>
> > when I need him... I'm getting up in age, you know.  ;o)
>
> > Rick
>
> > PS - I didn't know xml files had colons!
>
> The colon in XML files, e.g. in tags to be precise, denotes a namespace
> the particular element belongs to. There is a special selector for
> namespaces (CSS 3). The following would select an element named bar
> belonging to the namespace foo ():
>
> foo|bar
>
> http://www.w3.org/TR/css3-selectors/#typenmsp
>
> The given example:
>
> $('xsl|template')
>
> But I don't know if jQuery currently supports this. It has been
> discussed but I can't remember the outcome.
>
> -- Klaus



[jQuery] Re: Adding Parameters in a function

2007-05-31 Thread Dan G. Switzer, II

>I would like to add a parameter with the id of the hidden input that
>will have the hidden value of the item.
>something like this:
>=
>function findValue(li, hidden_id) { //add the "hidden_id" parameter
>   if( li == null ) return alert("No match!");
>   // if coming from an AJAX call, let's use the id as the value
>   if( !!li.extra ) var sValue = li.extra[0];
>   // otherwise, let's just display the value in the text box
>   else var sValue = li.selectValue;
>   alert("The value you selected was: " + sValue);
>$("#"+hidden_id).value = sValue; //add this line
>}
>=

You can use a closure:

onFindValue:function (li){
return findValue(li, "myHiddenId");
}

-Dan



[jQuery] Re: Adding Parameters in a function

2007-05-31 Thread Ⓙⓐⓚⓔ

onFindValue:function(li){findValue(li,1,2,3,4)},

On 5/31/07, tuliopaiva <[EMAIL PROTECTED]> wrote:



I would like to add a parameter with the id of the hidden input that
will have the hidden value of the item.
something like this:
=
function findValue(li, hidden_id) { //add the "hidden_id" parameter
if( li == null ) return alert("No match!");
// if coming from an AJAX call, let's use the id as the value
if( !!li.extra ) var sValue = li.extra[0];
// otherwise, let's just display the value in the text box
else var sValue = li.selectValue;
alert("The value you selected was: " + sValue);
$("#"+hidden_id).value = sValue; //add this line
}
=
I dont't know if this is the best thing to do it...:P
[]'s


On 31 maio, 17:29, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> >createAutoComplete = function() {
> >return $("#input_box").autocomplete("/buscarServidor/", {
> >delay:10,
> >minChars:2,
> >matchSubset:1,
> >matchContains:1,
> >cacheLength:10,
> >onItemSelect:selectItem,
> >onFindValue:findValue, //how can I add parameters
> here???
> >formatItem:formatItem,
> >autoFill:true
> >});
> >};
>
> >function findValue(li) {
> >if( li == null ) return alert("No match!");
> >// if coming from an AJAX call, let's use the id as the value
> >if( !!li.extra ) var sValue = li.extra[0];
> >// otherwise, let's just display the value in the text box
> >else var sValue = li.selectValue;
> >alert("The value you selected was: " + sValue);
> >}
>
> >
>
> >So, how can I add parameters in the "findValue" function?
>
> What are you actually trying to do? What kind of "parameters" are you
> looking to add?
>
> -Dan





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: jQuery Autocomplete Mod

2007-05-31 Thread tuliopaiva

Other thing...

How Could I pass a string with the id of hidden field for the
"findValue" function??

Thank You.


On 31 maio, 14:32, tuliopaiva <[EMAIL PROTECTED]> wrote:
> It worked!
> Thank You!
>
> On 31 maio, 10:22, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
> wrote:
>
> > >Hello!
>
> > >First thing: I'm starting in jquery and my english is poor. :P
>
> > >I'm using Django + jquery autocomplete mod (http://www.pengoworks.com/
> > >workshop/jquery/autocomplete.htm) and it's working fine, but one thing
> > >doesn't works: the hidden value.
> > >For example, my string is "Tulio|123\n" where "Tulio" is the displayed
> > >information and "123" is (or not?) the hidden information.
> > >I only catch the information "Tulio" and I'm trying to catch the
> > >hidden information ("123") whithout success.
> > >Can You help me about this?
>
> > You need to specifically write code to copy. If you look at the example at:
>
> >http://www.pengoworks.com/workshop/jquery/autocomplete.htm
>
> > you'll see that it binds 2 functions to the autocomplete plug-in which are
> > used for detecting the hidden value:
>
> > function findValue(li) {
> > if( li == null ) return alert("No match!");
>
> > // if coming from an AJAX call, let's use the CityId as the value
> > if( !!li.extra ) var sValue = li.extra[0];
>
> > // otherwise, let's just display the value in the text box
> > else var sValue = li.selectValue;
>
> > alert("The value you selected was: " + sValue);
>
> > }
>
> > function selectItem(li) {
> > findValue(li);
>
> > }
>
> > You can use those functions are blueprint for your code (just replace the
> > alert() in the findValue() with the code to update your hidden form field.)
>
> > Also, you need to remember to bind this functions to the onSelectItem and
> > onFindValue callbacks.
>
> > -Dan



[jQuery] Re: Adding Parameters in a function

2007-05-31 Thread tuliopaiva

I would like to add a parameter with the id of the hidden input that
will have the hidden value of the item.
something like this:
=
function findValue(li, hidden_id) { //add the "hidden_id" parameter
if( li == null ) return alert("No match!");
// if coming from an AJAX call, let's use the id as the value
if( !!li.extra ) var sValue = li.extra[0];
// otherwise, let's just display the value in the text box
else var sValue = li.selectValue;
alert("The value you selected was: " + sValue);
$("#"+hidden_id).value = sValue; //add this line
}
=
I dont't know if this is the best thing to do it...:P
[]'s


On 31 maio, 17:29, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> >createAutoComplete = function() {
> >return $("#input_box").autocomplete("/buscarServidor/", {
> >delay:10,
> >minChars:2,
> >matchSubset:1,
> >matchContains:1,
> >cacheLength:10,
> >onItemSelect:selectItem,
> >onFindValue:findValue, //how can I add parameters
> here???
> >formatItem:formatItem,
> >autoFill:true
> >});
> >};
>
> >function findValue(li) {
> >if( li == null ) return alert("No match!");
> >// if coming from an AJAX call, let's use the id as the value
> >if( !!li.extra ) var sValue = li.extra[0];
> >// otherwise, let's just display the value in the text box
> >else var sValue = li.selectValue;
> >alert("The value you selected was: " + sValue);
> >}
>
> >
>
> >So, how can I add parameters in the "findValue" function?
>
> What are you actually trying to do? What kind of "parameters" are you
> looking to add?
>
> -Dan



[jQuery] Re: Weirdness in IE

2007-05-31 Thread Joel Taylor
Ok, I tried both of those, and neither of them fixed the issue in IE7 (I
didnt even check IE6)

On 5/30/07, Richard D. Worth <[EMAIL PROTECTED]> wrote:
>
> On 5/25/07, Joel Taylor <[EMAIL PROTECTED]> wrote:
> >
> > I still need help with this one.
> > See it here:
> http://dd-management.com/dev/TC/treatment.asp?sub=addiction-treatment
> >
>
> I think I found a minimal test case for you. It's just IE, CSS, and DOM
> (no jQuery bug):
>
> 
> 
> 
> 
>   /* layout.css */
>   .input:hover{}
>
>   /* ie7-styles.css */
>   #content H1 + P { MARGIN-TOP: -10px }
> 
> 
> 
>   $(document).ready(function(){
> $("h1").after("
"); > }); > > > > > #content > H1 > P > > > > > > Talk about weird. Removing either the or the :hover{} seems to > fix it. Looks like a strange IE bug. > > - Richard D. Worth > > > > >

[jQuery] Re: Adding Parameters in a function

2007-05-31 Thread Dan G. Switzer, II

>createAutoComplete = function() {
>   return $("#input_box").autocomplete("/buscarServidor/", {
>   delay:10,
>   minChars:2,
>   matchSubset:1,
>   matchContains:1,
>   cacheLength:10,
>   onItemSelect:selectItem,
>   onFindValue:findValue, //how can I add parameters
here???
>   formatItem:formatItem,
>   autoFill:true
>   });
>   };
>
>function findValue(li) {
>   if( li == null ) return alert("No match!");
>   // if coming from an AJAX call, let's use the id as the value
>   if( !!li.extra ) var sValue = li.extra[0];
>   // otherwise, let's just display the value in the text box
>   else var sValue = li.selectValue;
>   alert("The value you selected was: " + sValue);
>}
>
>
>
>So, how can I add parameters in the "findValue" function?

What are you actually trying to do? What kind of "parameters" are you
looking to add?

-Dan



[jQuery] Re: iframe question -> frameReady plugin

2007-05-31 Thread Daemach

That's a good question.  I designed frameReady to break closures because the
reference to the parent frame was causing execution problems.  I just
updated it though, adding the ability to send data that you can reference
separately using the options object.  Your code would look like this:

var  newContent = jQuery("#containerDiv")[0].innerHTML
jQuery.frameReady(
 function(){
  debugger;
  jQuery("#containerContent")[0].innerHTML = frData.newContent;
 }
 , "top.printContentIframe"
 , {data:{newContent:newContent}}  // add any data you want to pass to
the target frame here
  );

You can find the update announcement and a link to the source code here:
http://ideamill.synaptrixgroup.com/?page_id=18

On 5/31/07, oscar esp <[EMAIL PROTECTED]> wrote:



Are there any way to pass a param (I need to pass a DIv object) from
parent to the iframe child?

My code:
(iwould like to use newContent info)

var  newContent = jQuery("#containerDiv")[0].innerHTML
jQuery.frameReady(
function()
{
  debugger;
   jQuery("#containerContent")[0].innerHTML = newContent;
},
"top.printContentIframe"
);




[jQuery] Re: JQuery Gurus: a challenge for you. Hide and Show

2007-05-31 Thread Sean Catchpole


You bet, try binding an onClick function in the tabs plugin that will
detect when the last tab is clicked. Look at the documentation and
source code of the tabs plugin for more information.

~Sean


[jQuery] Re: Colon Operator

2007-05-31 Thread Klaus Hartl


Rick Faircloth wrote:

Let’s hope so… I want him to be in business

when I need him… I’m getting up in age, you know.  ;o)

 


Rick

 


PS – I didn’t know xml files had colons!


The colon in XML files, e.g. in tags to be precise, denotes a namespace 
the particular element belongs to. There is a special selector for 
namespaces (CSS 3). The following would select an element named bar 
belonging to the namespace foo ():


foo|bar

http://www.w3.org/TR/css3-selectors/#typenmsp

The given example:

$('xsl|template')

But I don't know if jQuery currently supports this. It has been 
discussed but I can't remember the outcome.



-- Klaus


[jQuery] Re: Tabs with nested divs

2007-05-31 Thread Klaus Hartl


[EMAIL PROTECTED] wrote:

I'm experiencing a problem with Klaus Hartl's tabs and nested divs.
Here is the code (which is basically the example code with some Smarty
added):


  


  



  
  




  



  $(document).ready(function() {
$('#home-me-items').tabs();


  $('#tabs-').tabs();

  });


In the middle block you see that my  contains
several inner layers. If I call this in my browser, only the first
layer (id 1) is visible - all others have the class "tabs-hide". Why
does the tabs code hide all those layers, but only shows the first one
when the tab is selected?



That is simply the way the tabs plugin works. The one tab content 
container that belongs to the initially active tab remains to be shown, 
all others get hidden. How else would it work? The containers for the 
inactive tabs got to be hidden.


Maybe I have missed something here?


-- Klaus


[jQuery] Adding Parameters in a function

2007-05-31 Thread tuliopaiva

Hello!

I'm newbie in jquery and I'm using the autocomplete plugin (http://
www.pengoworks.com/workshop/jquery/autocomplete.htm).

Look at the code:



createAutoComplete = function() {
return $("#input_box").autocomplete("/buscarServidor/", {
delay:10,
minChars:2,
matchSubset:1,
matchContains:1,
cacheLength:10,
onItemSelect:selectItem,
onFindValue:findValue, //how can I add parameters 
here???
formatItem:formatItem,
autoFill:true
});
};

function findValue(li) {
if( li == null ) return alert("No match!");
// if coming from an AJAX call, let's use the id as the value
if( !!li.extra ) var sValue = li.extra[0];
// otherwise, let's just display the value in the text box
else var sValue = li.selectValue;
alert("The value you selected was: " + sValue);
}



So, how can I add parameters in the "findValue" function?

Thank you.



[jQuery] Re: Performance monitoring

2007-05-31 Thread Web Specialist

Sam,

what do you say for "caching the object globally"? I have a very very slow
form page too.

Cheers.

2007/5/31, SamCKayak <[EMAIL PROTECTED]>:



caching the object globally made the performance suitable for
production.

Thanks,

Sam




[jQuery] Re: Event binding for both body.click AND body.change?

2007-05-31 Thread Kim Johnson

Just wanted to do a quick followup -- by putting the
select change binding BELOW the body binding, I got
this code to work, but I'm still interested in knowing
if there's a way to bind two different things to the
body element (click versus change versus whatever).

Anyone know?

thanks,
-kim

--- Kim Johnson <[EMAIL PROTECTED]> wrote:

> 
> Hi folks,
> 
> Quite awhile back, Karl pointed out to me the
> fantastic article about event binding for ajax. I've
> since implemented the following function 
> 
> $('body').click(function(e) {
>  if ($(e.target).is('img.closebutton')) {
>   var attribute = "close";
>   buttons($(e.target), attribute);
>  }
> (snip)
> 
> where "buttons" handles things. Everything on the
> page
> that needed to be handled was an image or text
> click,
> so this solution worked fine.
> 
> However, now I have a dropdown I need to integrate
> onto the page, and I need to handle the dropdown's
> change event (I have 100% working code for the
> dropdown on a different page on the site which
> doesn't
> have this body.click code). I tried putting
> body.change(function(e) etc above the body.click
> function, but it appears the event is being caught
> by
> body.click due to the initial clicking of the
> dropdown. 
> 
> Any thoughts would be greatly appreciated :)
> 
> thanks,
> -kim
> 
> 
>
>
Ready
> for the edge of your seat? 
> Check out tonight's top picks on Yahoo! TV. 
> http://tv.yahoo.com/
> 



   

Be a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469


[jQuery] Re: Performance monitoring

2007-05-31 Thread SamCKayak

caching the object globally made the performance suitable for
production.

Thanks,

Sam



[jQuery] Re: Really nice Ext Grid

2007-05-31 Thread John Farrar

Michael Stuhr wrote:
>
> Erik Beeson schrieb:
>> Maybe this isn't news, but these are the sweetest grids I've ever
>> seen, even for Ext:
>>
>> http://extjs.com/playpen/ext-2.0/examples/grid/grid3.html
>>
>
> is this a beta ?
>
> micha
>
I am not sure... but it might be mixed free and commercial. Waiting for 
a reply.


[jQuery] JQuery Gurus: a challenge for you. Hide and Show

2007-05-31 Thread Web Specialist

Hi all.

I have a very, very, very slow form(6 seconds before validate all data) page
with Form Plugin and Tabs. I'll want to show submit when, and only when,
user clicks in the last tab. Clicking in another will hide that submit
button.

My question: is it possible to do that? Or only using several jquery hide
function, one for each tab?

Cheers


[jQuery] Re: Really nice Ext Grid

2007-05-31 Thread Mike Chabot


I agree. These are fantastic.

-Mike Chabot

On 5/31/07, Erik Beeson <[EMAIL PROTECTED]> wrote:


Maybe this isn't news, but these are the sweetest grids I've ever
seen, even for Ext:

http://extjs.com/playpen/ext-2.0/examples/grid/grid3.html

--Erik



[jQuery] Re: Gears Plugin Ideas was: [jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Brian Miller

Ideas:

$('#mydiv').html(
$.gears(db, 'select * from Demo order by Timestamp desc').toTable()
);

jQuery shouldn't be made to really change the gears API, but a good plugin
should allow the natural result of using the gears API to be easily used
to play with the DOM.  So, a toTable() method would return a jQuery object
containing an HTML table representation of the resultset.  Perhaps a
blending of ideas is in order to merge gears with something like taconite,
making a very easy to render online/offline page?  Just brainstorming.

- Brian


>> Although, this sounds like a great opportunity to write a plugin
>> around Google Gears.
>
> This was my first thought too, but after working with the API a little
> bit, I don't really see what functionality a jQuery plugin would
> add... Maybe in dealing with result sets:
>
> Before:
> // Get the 3 most recent entries. Delete any others.
> var rs = db.execute('select * from Demo order by Timestamp desc');
> var index = 0;
> while (rs.isValidRow()) {
>   if (index < 3) {
> recentPhrases[index] = rs.field(0);
>   } else {
> db.execute('delete from Demo where Timestamp=?', [rs.field(1)]);
>   }
>   ++index;
>   rs.next();
> }
> rs.close();
>
> After:
> // Get the 3 most recent entries. Delete any others.
> $(db.execute('select * from Demo order by Timestamp
> desc')).each(function(index) {
>   if (index < 3) {
> recentPhrases[index] = this.field(0);
>   } else {
> db.execute('delete from Demo where Timestamp=?', [this.field(1)]);
>   }
> });
>
> The API is already so simple and straightforward, where else would a
> jQuery plugin be helpful?
>
> --Erik



[jQuery] Re: JQuery DOM manipulation: memory leaks?

2007-05-31 Thread Brandon Aaron

I think I just fixed this leak in revision [2010] of jQuery. It had to do
with the global cache of events. Please grab the latest from SVN to see if
that fixes the issue.

--
Brandon Aaron

On 5/31/07, Ruchi <[EMAIL PROTECTED]> wrote:



Hi,

I'm a JS and JQuery newbie and I'm trying to resolve a memory leak
that comes in IE for my code. Basically, I add elements to the DOM
dynamically based on a list of items that I receive from a backend
server. I used JQuery to create the list dynamically but noticed that
the memory taken by IE keeps on increasing every time the code is
executed.

I read up on JS memory leaks, and while I'm still grappling to
understand the issues entirely, I found the pattern below to eliminate
memory leaks.


[jQuery] Re: Really nice Ext Grid

2007-05-31 Thread Michael Stuhr


Erik Beeson schrieb:

Maybe this isn't news, but these are the sweetest grids I've ever
seen, even for Ext:

http://extjs.com/playpen/ext-2.0/examples/grid/grid3.html



is this a beta ?

micha


[jQuery] Really nice Ext Grid

2007-05-31 Thread Erik Beeson


Maybe this isn't news, but these are the sweetest grids I've ever
seen, even for Ext:

http://extjs.com/playpen/ext-2.0/examples/grid/grid3.html

--Erik


[jQuery] Gears Plugin Ideas was: [jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Erik Beeson



Although, this sounds like a great opportunity to write a plugin
around Google Gears.


This was my first thought too, but after working with the API a little
bit, I don't really see what functionality a jQuery plugin would
add... Maybe in dealing with result sets:

Before:
// Get the 3 most recent entries. Delete any others.
var rs = db.execute('select * from Demo order by Timestamp desc');
var index = 0;
while (rs.isValidRow()) {
 if (index < 3) {
   recentPhrases[index] = rs.field(0);
 } else {
   db.execute('delete from Demo where Timestamp=?', [rs.field(1)]);
 }
 ++index;
 rs.next();
}
rs.close();

After:
// Get the 3 most recent entries. Delete any others.
$(db.execute('select * from Demo order by Timestamp
desc')).each(function(index) {
 if (index < 3) {
   recentPhrases[index] = this.field(0);
 } else {
   db.execute('delete from Demo where Timestamp=?', [this.field(1)]);
 }
});

The API is already so simple and straightforward, where else would a
jQuery plugin be helpful?

--Erik


[jQuery] Re: LiteBox in jQuery

2007-05-31 Thread Rhapidophyllum
One more thing--almost forgot.  Since photos can of course take a  
while to download, it's good to preload them.  I'm not sure if this  
is correct, but I think Lightbox 2 preloads 1 image, but Thickbox  
doesn't preload any.


On May 31, 2007, at 11:53 AM, Rhapidophyllum wrote:

The other difference is that Thickbox resizes images to fit the  
screen + buffer size.  While this is good in many situations, it  
often isn't desirable for displaying photos, where you typically  
want users to see the original photo quality.  Lightbox 2 has the  
animated size transitions, and displays photos full size.  So  
having something like Litebox which could be more suited to photo  
galleries than Thickbox is a good thing to have.


On May 31, 2007, at 10:47 AM, Karl Swedberg wrote:



On May 31, 2007, at 6:44 AM, Diego A. wrote:



As far as as can see, the jQuery Thickbox does everything the others
do. I use it here:
http://www.london-dry-cleaners.com/Laundry/

What am I missing?


The default thickbox implementation doesn't have animated sizing  
of the images. They just pop up there with no transition from one  
to the next.


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







[jQuery] Re: jQuery Autocomplete Mod

2007-05-31 Thread tuliopaiva

It worked!
Thank You!

On 31 maio, 10:22, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> >Hello!
>
> >First thing: I'm starting in jquery and my english is poor. :P
>
> >I'm using Django + jquery autocomplete mod (http://www.pengoworks.com/
> >workshop/jquery/autocomplete.htm) and it's working fine, but one thing
> >doesn't works: the hidden value.
> >For example, my string is "Tulio|123\n" where "Tulio" is the displayed
> >information and "123" is (or not?) the hidden information.
> >I only catch the information "Tulio" and I'm trying to catch the
> >hidden information ("123") whithout success.
> >Can You help me about this?
>
> You need to specifically write code to copy. If you look at the example at:
>
> http://www.pengoworks.com/workshop/jquery/autocomplete.htm
>
> you'll see that it binds 2 functions to the autocomplete plug-in which are
> used for detecting the hidden value:
>
> function findValue(li) {
> if( li == null ) return alert("No match!");
>
> // if coming from an AJAX call, let's use the CityId as the value
> if( !!li.extra ) var sValue = li.extra[0];
>
> // otherwise, let's just display the value in the text box
> else var sValue = li.selectValue;
>
> alert("The value you selected was: " + sValue);
>
> }
>
> function selectItem(li) {
> findValue(li);
>
> }
>
> You can use those functions are blueprint for your code (just replace the
> alert() in the findValue() with the code to update your hidden form field.)
>
> Also, you need to remember to bind this functions to the onSelectItem and
> onFindValue callbacks.
>
> -Dan



[jQuery] Re: Best way to do horizontal sub-menus...

2007-05-31 Thread Rick Faircloth

Looks interesting!  I'll check it out...

Thanks, Sapphire

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sapphire
Sent: Thursday, May 31, 2007 12:49 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Best way to do horizontal sub-menus...


There is already a jQuery plugin for what you are looking for. Take a look
at http://menu.n2cms.com/

It's not perfect, but it's a good place to start.


Rick Faircloth wrote:
> Hi, all...
>
> Well, I've finally given in and after 10 years of web design,
> I'm ready to create my *first* horizontal menus.
>
> I've always used vertical menus because of their expandability,
> but I need some design flexibility.
>
> So the question is... what's the best way to build a horizontal
> menu where each link has a corresponding horizontal sub-menu?
>
> jQuery?  CSS?  Combination?
>
> Thanks for any advice...
>
> Rick
>
>
>
>   





[jQuery] Re: Colon Operator

2007-05-31 Thread Rick Faircloth
Let's hope so. I want him to be in business
when I need him. I'm getting up in age, you know.  ;o)
 
Rick
 
PS - I didn't know xml files had colons!
 
 
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sean Catchpole
Sent: Thursday, May 31, 2007 12:38 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Colon Operator
 
Will jquery 1.1.3 support the colon operator?
ex: $("xsl\:template")

I know that : is used in jQuery, but \: seems very possible.
It would be nice to parse through xml files with colons in them.

~Sean


[jQuery] Re: Chaining - Best Practices?

2007-05-31 Thread Ⓙⓐⓚⓔ

glad you found it... it was a beautiful chain!

On 5/31/07, latinomigs <[EMAIL PROTECTED]> wrote:



Well I realized my mistake in the code above...

It is meant for the following HTML:








So my error was in using the .children() selector to find both #aBox
and #aChild. If I use .find() instead of .children() then it works
perfectly.

On May 31, 12:56 pm, "Sean Catchpole" <[EMAIL PROTECTED]>
wrote:
> Chaining is more useful for quick compact statements.
> ex: $("p").hide().addClass("bar").click(function(){
> alert(this.innerHTML); }).slideDown();
>
> ~Sean





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: JQuery DOM manipulation: memory leaks?

2007-05-31 Thread Benjamin Sterling

Ruchi,
My suggestion would to something like:
  childDiv.unbind('click').remove();
  parentDiv.unbind('click').remove();

If I am understanding how memory leaks happen, that code should help.

On 5/31/07, Ruchi <[EMAIL PROTECTED]> wrote:



Hi,

I'm a JS and JQuery newbie and I'm trying to resolve a memory leak
that comes in IE for my code. Basically, I add elements to the DOM
dynamically based on a list of items that I receive from a backend
server. I used JQuery to create the list dynamically but noticed that
the memory taken by IE keeps on increasing every time the code is
executed.

I read up on JS memory leaks, and while I'm still grappling to
understand the issues entirely, I found the pattern below to eliminate
memory leaks.




--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Chaining - Best Practices?

2007-05-31 Thread latinomigs

Well I realized my mistake in the code above...

It is meant for the following HTML:








So my error was in using the .children() selector to find both #aBox
and #aChild. If I use .find() instead of .children() then it works
perfectly.

On May 31, 12:56 pm, "Sean Catchpole" <[EMAIL PROTECTED]>
wrote:
> Chaining is more useful for quick compact statements.
> ex: $("p").hide().addClass("bar").click(function(){
> alert(this.innerHTML); }).slideDown();
>
> ~Sean



[jQuery] Re: Ok... so I've got this horizontal menu html... how to add "selected" class?

2007-05-31 Thread Benjamin Sterling

Oh, I see what you want.


Home
DHTML
CSS
Forums
Gif Optimizer






Home
New
Revised


Notice that I gave the "home" link a rel attribute and added the submenu
class to the "subcontent #1" menu.  submenu is strictly arbitrary, so you
can put what ever you want. but the rel and the class must match for its sub
content menu.

code would look something like (not tested):

$(document).ready(function(){
$('a', '#maintab').each(function(){
if($(this).attr('rel')){
$(this).click(function(){
var sm = $(this).attr('rel');
$('ul.'+sm).addClass('selected'); // adds the selected class to the ul with
the class the matches the rel attr of 'this'
$(this).parent().addClass('selected'); // adds the selected class to the li
of the main tab menu
});
}
});
});

Now this is just the click event, you may want to look at the mouseover
function in the jquery.com/api for other functionality.  also, there may
need to be a setTimeOut in there so the menu will close of its own and some
code in there to account for the opening of another submenu, ie. if you gave
the click event to an other maintab link.  Keep in mind also that this is
not tested so you may need to tweak it.

--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Chaining - Best Practices?

2007-05-31 Thread Sean Catchpole


Chaining is more useful for quick compact statements.
ex: $("p").hide().addClass("bar").click(function(){
alert(this.innerHTML); }).slideDown();

~Sean


[jQuery] Re: Best way to do horizontal sub-menus...

2007-05-31 Thread Sapphire


There is already a jQuery plugin for what you are looking for. Take a look
at http://menu.n2cms.com/

It's not perfect, but it's a good place to start.


Rick Faircloth wrote:

Hi, all...

Well, I've finally given in and after 10 years of web design,
I'm ready to create my *first* horizontal menus.

I've always used vertical menus because of their expandability,
but I need some design flexibility.

So the question is... what's the best way to build a horizontal
menu where each link has a corresponding horizontal sub-menu?

jQuery?  CSS?  Combination?

Thanks for any advice...

Rick



  




[jQuery] Chaining - Best Practices?

2007-05-31 Thread latinomigs

I'm new to JQuery and still exploring what it can do. I'm curious to
know more about chaining, how it should be used, and what it can/can't
handle.

I tried one experiment that I've listed code for below. The intention
was to see if I could chain mouse event handlers for different
objects, but it didn't quite work. Maybe the chaining is creating
collisions? Maybe I've got chaining all wrong? Could you offer some
clarification? Thanks!

$(document).ready(function() {
var timerId = 0;
var nState = 0;
$("#wrapAll")
.children("#aBox")
.mousemove(function() {
if(nState == 1) {
clearTimeout(timerId);
timerId = setTimeout('$("#aChild 
p").html("Scheduler Complete!")',
2000);
}
})
.mouseover(function() {
++nState;
if(nState == 1) {
timerId = setTimeout('$("#aChild 
p").html("Scheduler Complete!")',
2000);
}
$("#wrapAll p#bottomText").html(nState);
})
.mouseout(function() {
--nState;
if(nState != 1) {
clearTimeout(timerId);
}
$("p").empty();
$("#wrapAll p#bottomText").html(nState);
})
.end()
.children("#aChild")
.mouseover(function() {
++nState;
$("#wrapAll p#bottomText").html(nState);
})
.mouseout(function() {
--nState;
$("p").empty();
$("#wrapAll p#bottomText").html(nState);
})
.end();
});



[jQuery] Attribute Namespace ? How

2007-05-31 Thread John Farrar

I would like to do something like this...


Does anyone know the magic key to doing this with jQuery?



[jQuery] Re: Ok... so I've got this horizontal menu html... how to add "selected" class?

2007-05-31 Thread Rick Faircloth
Well. one thing I would like to change about the Stonebriar
menu is to have the sub-menu change with a mouseover of the
main menu links.  Currently the sub-menu only changes when a main
menu link is clicked.
 
 
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Faircloth
Sent: Thursday, May 31, 2007 12:26 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Ok... so I've got this horizontal menu html... how to
add "selected" class?
 
To show you what I'm really after, visit
http://www.stonebriar.org.
 
Click on the "Worship" link and then the "Choirs" link.
 
That's the kind of sub-menu I'm after, and also the behavior
that causes the selected links to remain highlighted.
 
Rick
 
 
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Benjamin Sterling
Sent: Thursday, May 31, 2007 10:13 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Ok... so I've got this horizontal menu html... how to
add "selected" class?
 
Rick,
Check out http://jdsharp.us/jQuery/plugins/jdMenu/ and if that does not help
let us know and I will try to point you in the right direction.



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com 


[jQuery] Colon Operator

2007-05-31 Thread Sean Catchpole

Will jquery 1.1.3 support the colon operator?
ex: $("xsl\:template")

I know that : is used in jQuery, but \: seems very possible.
It would be nice to parse through xml files with colons in them.

~Sean


[jQuery] Re: Ok... so I've got this horizontal menu html... how to add "selected" class?

2007-05-31 Thread Rick Faircloth
To show you what I'm really after, visit
http://www.stonebriar.org.
 
Click on the "Worship" link and then the "Choirs" link.
 
That's the kind of sub-menu I'm after, and also the behavior
that causes the selected links to remain highlighted.
 
Rick
 
 
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Benjamin Sterling
Sent: Thursday, May 31, 2007 10:13 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Ok... so I've got this horizontal menu html... how to
add "selected" class?
 
Rick,
Check out http://jdsharp.us/jQuery/plugins/jdMenu/ and if that does not help
let us know and I will try to point you in the right direction.



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com 


[jQuery] Re: SEO and SEF features

2007-05-31 Thread Glen Lipka

It depends on how you use it.
jQuery itself is ignored by search engines.  However, let's say you use
$("div").load("footer.htm") and the footer has a bunch of links.  The search
engines would ignore jQuery because they do not run javascript and would not
load the footer.  This means that those links would not contribute to your
page rank.

If you use it just to manipulate CSS, or for animation effects then it would
have no impact.  Make sure your links are traditional 
structure.  If you use jQuery's click() function then that link would also
not be picked up.

Otherwise, XHTML is totally based on your html structure and not changed by
jQuery.  It is SEO friendly as long as you use it in an SEO friendly way.

Hope this helps you,

Glen

On 5/31/07, Jared Ritchey <[EMAIL PROTECTED]> wrote:



I did a lot of research and still cant find any references to SEO and
SEF related details. Does jQuery toss errors in XHTML validators?  Is
it SEO friendly?

~ Jared




[jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Rhapidophyllum


Actually, Dojo has already had something like this for several  
months, although I don't know how finished it was.  Here's a blog  
post they have about it:


http://www.sitepen.com/blog/2007/05/30/google-gears-dojo-offline-and- 
sitepen/



On May 31, 2007, at 9:13 AM, John Resig wrote:



There's even less need for us to do this now, since Google has done
all the hard work for us. (Also, Dojo is only using Google's framework
if it exists, nothing more.)

Although, this sounds like a great opportunity to write a plugin
around Google Gears.

--John

On 5/31/07, jamon <[EMAIL PROTECTED]> wrote:




Read more here : http://code.google.com/apis/gears/
Google labs just released on offline storage engine for IE and ff,  
dojo

toolkit team  seems have partnered width them .
Is there anybody working on a storage solution for jquery there ?

--
View this message in context: http://www.nabble.com/Announce- 
Google-gears-%2C-dojo-partners-with-them- 
tf3845793s15494.html#a10891347

Sent from the JQuery mailing list archive at Nabble.com.






[jQuery] Re: Ok... so I've got this horizontal menu html... how to add "selected" class?

2007-05-31 Thread Rick Faircloth
Thanks for the tip, Ben, but I haven't been able to figure out
the jQ modification, yet.
 
Here's the jQ:
 
$(document).ready(function() {
$('ul.jd_menu').jdMenu();
// Add menu hiding on document click
$(document).bind('click', function() {
$('ul.jd_menu ul:visible').jdMenuHide();
});
});
 
 
and here's the html:
 

Search Engines »

http://www.google.com"; target="_blank">Google
http://www.yahoo.com"; target="_blank">Yahoo!
http://www.altavista.com"; target="_blank">AltaVista


Google Products

Search »

http://base.google.com"; target="_blank">Base
http://code.google.com"; target="_blank">Code
http://images.google.com"; target="_blank">Images


http://www.gmail.com"; target="_blank">GMail



 
 
Advice?
 
Rick
 
 
 
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Benjamin Sterling
Sent: Thursday, May 31, 2007 10:13 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Ok... so I've got this horizontal menu html... how to
add "selected" class?
 
Rick,
Check out http://jdsharp.us/jQuery/plugins/jdMenu/ and if that does not help
let us know and I will try to point you in the right direction.



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com 


[jQuery] Re: LiteBox in jQuery

2007-05-31 Thread Rhapidophyllum
The other difference is that Thickbox resizes images to fit the  
screen + buffer size.  While this is good in many situations, it  
often isn't desirable for displaying photos, where you typically want  
users to see the original photo quality.  Lightbox 2 has the animated  
size transitions, and displays photos full size.  So having something  
like Litebox which could be more suited to photo galleries than  
Thickbox is a good thing to have.


On May 31, 2007, at 10:47 AM, Karl Swedberg wrote:



On May 31, 2007, at 6:44 AM, Diego A. wrote:



As far as as can see, the jQuery Thickbox does everything the others
do. I use it here:
http://www.london-dry-cleaners.com/Laundry/

What am I missing?


The default thickbox implementation doesn't have animated sizing of  
the images. They just pop up there with no transition from one to  
the next.


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





[jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Jake McGraw

Thanks for the link, yes it does ease my concerns, I know Google already has
a huge interest in bringing the off-line browser to consumers, as "Uhh, I
can't access my emails off-line" is the only excuse I receive when trying to
get people to signup for gmail. I just saw Gears as kind of jumping the gun,
considering there is already a decent amount of work going on in several
camps, but if they're going to be open to other organizations having a say,
then more power to them.

- jake

On 5/31/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:



>Also, in an article I read earlier today, Google is reportedly going to
be
>submitting the Gears code to the standards body in hopes it'll be the
>solution implemented into the browsers for HTML5...

More on this subject from the official Gears blog:
http://gearsblog.blogspot.com/

"Gears today covers what we think is the minimal set of primitives
required
for offline apps. It is still a bit rough and in need of polish, but we
are
releasing it early because we think the best way to make Gears really
useful
is to evolve it into an open standard. We are releasing Gears as an open
source project and we are working with Adobe, Mozilla and Opera and other
industry partners to make sure that Gears is the right solution for
everyone. We also want to get early feedback, community involvement, and
rapid iterations."

The second sentence about Google working with Adobe, Mozilla and Opera
should be of particular interest to your concerns.

-Dan




[jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Dan G. Switzer, II

>Also, in an article I read earlier today, Google is reportedly going to be
>submitting the Gears code to the standards body in hopes it'll be the
>solution implemented into the browsers for HTML5...

More on this subject from the official Gears blog:
http://gearsblog.blogspot.com/

"Gears today covers what we think is the minimal set of primitives required
for offline apps. It is still a bit rough and in need of polish, but we are
releasing it early because we think the best way to make Gears really useful
is to evolve it into an open standard. We are releasing Gears as an open
source project and we are working with Adobe, Mozilla and Opera and other
industry partners to make sure that Gears is the right solution for
everyone. We also want to get early feedback, community involvement, and
rapid iterations."

The second sentence about Google working with Adobe, Mozilla and Opera
should be of particular interest to your concerns.

-Dan



[jQuery] SEO and SEF features

2007-05-31 Thread Jared Ritchey

I did a lot of research and still cant find any references to SEO and
SEF related details. Does jQuery toss errors in XHTML validators?  Is
it SEO friendly?

~ Jared



[jQuery] Re: apply selector on ajax content?

2007-05-31 Thread R. Rajesh Jeba Anbiah

On May 31, 7:38 pm, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> It doesn't seem to work:
>
> $('#foo').click(function() {
>$.get($(this).find('a:first').attr('href'), function(data){
>   alert($('table#bar', data).html()); // doesn't work. Can't apply
> selector on "data"
> }
>);}
>
> );
>
> Is anyone know of any hack to get it working? TIA

   I'm getting close (stuffing to this.data and using it), but still
would love to get better hack:

$('#foo').click(function () {
$.get($(this).find('a:first').attr('href'), function (data) {
this.data = data;
alert($(this).find('table#bar').html());
}
);
}
);

 Still there is a problem, couldn't reuse this.data (caching so
that I don't have to $.get() again). Thanks for any input.

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/



[jQuery] JQuery DOM manipulation: memory leaks?

2007-05-31 Thread Ruchi

Hi,

I'm a JS and JQuery newbie and I'm trying to resolve a memory leak
that comes in IE for my code. Basically, I add elements to the DOM
dynamically based on a list of items that I receive from a backend
server. I used JQuery to create the list dynamically but noticed that
the memory taken by IE keeps on increasing every time the code is
executed.

I read up on JS memory leaks, and while I'm still grappling to
understand the issues entirely, I found the pattern below to eliminate
memory leaks.


[jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Dan G. Switzer, II

>I suppose I'm living in something a dream world, but I'd hate to see Google
>Gears / HTML 5 / Yahoo's / Microsoft's / The next Gee-Whiz 2.5, 3.0 Web
>company to all come out with their own client side dB implementations.  I
>guess we'll have to add database abstraction functionality to jQuery now.

Also, in an article I read earlier today, Google is reportedly going to be
submitting the Gears code to the standards body in hopes it'll be the
solution implemented into the browsers for HTML5...

-Dan



[jQuery] Re: Improving performance in FireFox/Opera

2007-05-31 Thread Brandon Aaron

IE and Safari actually can handle animations very well. Perhaps it is
because they have more access to system resources than the other browsers.
I'm not exactly sure of the whys but IE does tend to handle timers better.
Firefox has some severe issues with timers, especially with lots of them.
I'm not really sure whats up with opera. It is usually very fast with
JavaScript.

--
Brandon Aaron

On 5/31/07, Gordon <[EMAIL PROTECTED]> wrote:



Okay, I'll give it a try, once I've gotten a link.

I understand that the animate() function in 1.1.2 starts a timer for
every element attribute being animated, so if you're doing width,
height, top, left you fire four timers per element being moved.  Is
this correct?  I'm assuming one of the 1.1.3 improvements is reducing
timer usage, yes?

That's kind of got me curious, can IE handle lots of timers running at
once better than FireFox?  Or does IE do a better job with animation
because it's tied into Windows and can access the graphical subsystem
at a lower level than the cross-platform Firefox and Opera can?

On May 31, 2:32 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> jQuery 1.1.3 aims to provide huge performance boost to multiple
animations.
> Feel free to give jQuery 1.1.3a a whirl and let us know if that helps
out
> any.
>
> --
> Brandon Aaron
>
> On 5/31/07, Gordon <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am working on a project that involves a varying, but potentially
> > quite large number of elements being animated at once, with each
> > element's top, left, width and height all changing together.
>
> > I use FireFox as my main development browser due to the range of
> > developer-friendly plugins available, and also test in IE and Opera.
> > My code runs as intended in all three but there are some issues with
> > smoothness.  In Internet explorer the animation remains smooth under
> > all the cicsumstances I've bee able to throw at it with my test
> > suite.  In Firefox, however, the move animation is a little choppy,
> > and in Opera it is EXTREMELY choppy!
>
> > I am planning to include an option where the user can turn animation
> > effects off but it would be nice to try and get the performance up in
> > the non IE browsers.  If you guys have any tips or advice you can
> > offer I would appreciate hearing it.




[jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Jake McGraw

I suppose I'm living in something a dream world, but I'd hate to see Google
Gears / HTML 5 / Yahoo's / Microsoft's / The next Gee-Whiz 2.5, 3.0 Web
company to all come out with their own client side dB implementations.  I
guess we'll have to add database abstraction functionality to jQuery now.

- jake

On 5/31/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:



Jake,

>Won't FF3 / HTML 5 address the off-line database issue? Isn't this just
>muddling the field before the industry backed solution comes out?

But what about people needing a solution that will work now and w/older
browsers?

The offline usage thing is increasingly becoming a common request.

-Dan




[jQuery] Re: LiteBox in jQuery

2007-05-31 Thread Karl Swedberg


On May 31, 2007, at 6:44 AM, Diego A. wrote:



As far as as can see, the jQuery Thickbox does everything the others
do. I use it here:
http://www.london-dry-cleaners.com/Laundry/

What am I missing?


The default thickbox implementation doesn't have animated sizing of  
the images. They just pop up there with no transition from one to the  
next.


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



[jQuery] Tabs with nested divs

2007-05-31 Thread [EMAIL PROTECTED]

I'm experiencing a problem with Klaus Hartl's tabs and nested divs.
Here is the code (which is basically the example code with some Smarty
added):


  

  



  
  




  



  $(document).ready(function() {
$('#home-me-items').tabs();


  $('#tabs-').tabs();

  });


In the middle block you see that my  contains
several inner layers. If I call this in my browser, only the first
layer (id 1) is visible - all others have the class "tabs-hide". Why
does the tabs code hide all those layers, but only shows the first one
when the tab is selected?



[jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Christopher Jordan
I don't know much about the HTML5 specification, but honestly, how 
quickly will all the major browsers adopt the new specification? FF3? 
Sure. They're great at keeping up with the bleeding edge. But like it or 
not IE still has the lion's share of the market, and are not likely to 
adopt a new specification so quickly.


Chris

Jake McGraw wrote:
Won't FF3 / HTML 5 address the off-line database issue? Isn't this 
just muddling the field before the industry backed solution comes out?


- jake

On 5/31/07, * John Resig* <[EMAIL PROTECTED] 
> wrote:



There's even less need for us to do this now, since Google has done
all the hard work for us. (Also, Dojo is only using Google's framework
if it exists, nothing more.)

Although, this sounds like a great opportunity to write a plugin
around Google Gears.

--John

On 5/31/07, jamon <[EMAIL PROTECTED]
> wrote:
>
>
>
> Read more here : http://code.google.com/apis/gears/
> Google labs just released on offline storage engine for IE and
ff, dojo
> toolkit team  seems have partnered width them .
> Is there anybody working on a storage solution for jquery there ?
>
> --
> View this message in context:

http://www.nabble.com/Announce-Google-gears-%2C-dojo-partners-with-them-tf3845793s15494.html#a10891347


> Sent from the JQuery mailing list archive at Nabble.com
.
>
>




--
http://www.cjordan.us



[jQuery] Re: Improving performance in FireFox/Opera

2007-05-31 Thread Gordon

Gave it a try, animation seems a little better in FireFox and
considerably better in Opera, though IE still wins hands down on the
smoothness stakes.  FireFox comes in second and Opera came in last
again.

On May 31, 3:28 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> On 5/31/07, Gordon <[EMAIL PROTECTED]> wrote:
>
> > Okay, I'll give it a try, once I've gotten a link.
>
> If you're looking for a link to 1.1.3a:
>
> http://jquery.com/blog/2007/05/20/help-test-jquery-113/
>
> - Richard



[jQuery] apply selector on ajax content?

2007-05-31 Thread R. Rajesh Jeba Anbiah

It doesn't seem to work:

$('#foo').click(function() {
   $.get($(this).find('a:first').attr('href'), function(data){
  alert($('table#bar', data).html()); // doesn't work. Can't apply
selector on "data"
}
   );
}
);

Is anyone know of any hack to get it working? TIA

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/



[jQuery] Re: Shorter method?

2007-05-31 Thread Richard D. Worth

On 5/31/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:


Even shorter:

$(".quizsubheader")[$(obj).attr('checked') ? 'hide' : 'show']('slow');



I saw that after I re-read mine, but wasn't certain on the syntax. Thanks
Dan.

- Richard


[jQuery] Re: Improving performance in FireFox/Opera

2007-05-31 Thread Richard D. Worth

On 5/31/07, Gordon <[EMAIL PROTECTED]> wrote:



Okay, I'll give it a try, once I've gotten a link.



If you're looking for a link to 1.1.3a:

http://jquery.com/blog/2007/05/20/help-test-jquery-113/

- Richard


[jQuery] Re: Shorter method?

2007-05-31 Thread Dan G. Switzer, II

>   if($(obj).attr('checked')) { // Hide the correct answers?
>   $('.quizsubheader').hide('slow');
>   } else {
>   $('.quizsubheader').show('slow');
>   };
>
>   What's the best one-liner method to achieve the same result above?
>
>
>
>
>($(obj).attr('checked')) ? $('.quizsubheader').hide('slow') :
>$('.quizsubheader').show('slow');

Even shorter:

$(".quizsubheader")[$(obj).attr('checked') ? 'hide' : 'show']('slow');

-Dan




[jQuery] Re: Performance monitoring

2007-05-31 Thread Dan G. Switzer, II

Sam,

>function toggleAllDetails (obj) {
>   if($(obj).attr('checked')) { // Hide the correct answers?
>   $('ol li div.quizsubheader').hide('fast');
>   } else {
>   $('ol li div.quizsubheader').show('fast');
>   };
>};

I'd use just hide()/show(). This won't give you the animation effect--but
that could be the cause of your slowness.

Also, if you might try modifying your selector to:

$('div.quizsubheader')

Also, once you find the fastest selector, make sure to cache it as a global
variable. That way you don't have to run the selector each time. You can
just used the cached jQuery object.

var oQuizSubHeaders;

$(document).ready(
function (){
oQuizSubHeaders = $('ol li div.quizsubheader');
}
);

function toggleAllDetails (obj) {
if($(obj).attr('checked')) { // Hide the correct answers?
oQuizSubHeaders.hide('fast');
} else {
oQuizSubHeaders.show('fast');
};
};

Now the toggleAllDetails() function doesn't have to keep re-parsing the DOM
to find the valid element.

-Dan



[jQuery] Re: Ok... so I've got this horizontal menu html... how to add "selected" class?

2007-05-31 Thread Benjamin Sterling

Rick,
Check out http://jdsharp.us/jQuery/plugins/jdMenu/ and if that does not help
let us know and I will try to point you in the right direction.



--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Dan G. Switzer, II

Jake,

>Won't FF3 / HTML 5 address the off-line database issue? Isn't this just
>muddling the field before the industry backed solution comes out?

But what about people needing a solution that will work now and w/older
browsers?

The offline usage thing is increasingly becoming a common request.

-Dan



[jQuery] Re: Performance monitoring

2007-05-31 Thread SamCKayak

It's tolerable if I change

.hide('fast')

to

.css('display', 'none')

similar for show...

Any way to track where time is being spent in JavaScript?

Sam



[jQuery] Re: Improving performance in FireFox/Opera

2007-05-31 Thread Gordon

Okay, I'll give it a try, once I've gotten a link.

I understand that the animate() function in 1.1.2 starts a timer for
every element attribute being animated, so if you're doing width,
height, top, left you fire four timers per element being moved.  Is
this correct?  I'm assuming one of the 1.1.3 improvements is reducing
timer usage, yes?

That's kind of got me curious, can IE handle lots of timers running at
once better than FireFox?  Or does IE do a better job with animation
because it's tied into Windows and can access the graphical subsystem
at a lower level than the cross-platform Firefox and Opera can?

On May 31, 2:32 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> jQuery 1.1.3 aims to provide huge performance boost to multiple animations.
> Feel free to give jQuery 1.1.3a a whirl and let us know if that helps out
> any.
>
> --
> Brandon Aaron
>
> On 5/31/07, Gordon <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am working on a project that involves a varying, but potentially
> > quite large number of elements being animated at once, with each
> > element's top, left, width and height all changing together.
>
> > I use FireFox as my main development browser due to the range of
> > developer-friendly plugins available, and also test in IE and Opera.
> > My code runs as intended in all three but there are some issues with
> > smoothness.  In Internet explorer the animation remains smooth under
> > all the cicsumstances I've bee able to throw at it with my test
> > suite.  In Firefox, however, the move animation is a little choppy,
> > and in Opera it is EXTREMELY choppy!
>
> > I am planning to include an option where the user can turn animation
> > effects off but it would be nice to try and get the performance up in
> > the non IE browsers.  If you guys have any tips or advice you can
> > offer I would appreciate hearing it.



[jQuery] Ok... so I've got this horizontal menu html... how to add "selected" class?

2007-05-31 Thread Rick Faircloth

Hi, all...

I'm dipping my toes into the water of horizontal menus for the first time.

I've got some same html I'm using for the menus, but now I need to be
able to dynamically change the "selected" class for the ul's and li's in
use.


Home
DHTML
CSS
Forums
Gif Optimizer






Home
New
Revised


I tried to come up with some jQ code to do it, but couldn't get anything to
work
(I'm not gonna show that mess, either ;o)

I know it's simple, but I can't get the syntax right.

Also, the example only show one sub-menu... how would the other sub-menu's
be targeted in the main menu?

Would someone lend a hand?

Rick




[jQuery] Performance monitoring

2007-05-31 Thread SamCKayak

When I expand my quiz to 250 questions, the jQuery scripts are timing
out.  This happened once before and I was able to diagnose the problem
to a selector which wasn't precise.  It was installing event handlers
on many elements, not the few necessary elements.

So here I am again, same symptom.  I wanted to ask the community what
methods are available (recommended) for tracking down problems like
this in jQuery using Firebug (I guess).  Are there other monitoring
products?

By the way, the code that times out is this:

function toggleAllDetails (obj) {
if($(obj).attr('checked')) { // Hide the correct answers?
$('ol li div.quizsubheader').hide('fast');
} else {
$('ol li div.quizsubheader').show('fast');
};
};

The user clicks a checkbox, and a div is hidden in 250 quiz
questions.  Something doesn't seem right.  It shouldn't time out doing
this.

Sam



[jQuery] Re: Shorter method?

2007-05-31 Thread Richard D. Worth

On 5/31/07, SamCKayak <[EMAIL PROTECTED]> wrote:



if($(obj).attr('checked')) { // Hide the correct answers?
$('.quizsubheader').hide('slow');
} else {
$('.quizsubheader').show('slow');
};

What's the best one-liner method to achieve the same result above?



($(obj).attr('checked')) ? $('.quizsubheader').hide('slow') :
$('.quizsubheader').show('slow');
- Richard D. Worth


[jQuery] Shorter method?

2007-05-31 Thread SamCKayak

if($(obj).attr('checked')) { // Hide the correct answers?
$('.quizsubheader').hide('slow');
} else {
$('.quizsubheader').show('slow');
};

What's the best one-liner method to achieve the same result above?

Sam



[jQuery] Re: good show/hide icon

2007-05-31 Thread SamCKayak

After hunting around, I ended up using a "window" icon, but I think
the expand / collapse or + / - would be better in retrospect.

I'm surprised there's no defacto standard emerging on icon
semantics...  e.g., an "office" set, a "navagational" set...

Anyone know of any standards?

Sam



[jQuery] IE auto fill / validation error messages

2007-05-31 Thread kally

I'm using the jQuery.Validate.min.js script file and setting the
"title" attribute to ensure that Google auto fill messages are not
displayed instead of the error messages from the jQuery.Validation
methods I have created.

What I have found is that sometimes the value for the "title" is
displayed instead of the error message text defined in the Validate
method.

I suspect that the reason for the is the following code fragment taken
from the jQuery.validate.min,.js file in which the value for the
"title" attribute is used before the error message text defined in the
validator method.

this.errorList[id]=(this.message(id,rule)||element.title||
jQuery.validator.messages[rule.method]||"Warning: No message
defined for "+id+""

I can change the sequence to be as follows.

this.errorList[id]=(this.message(id,rule)||
jQuery.validator.messages[rule.method]||
element.title||"Warning: No message defined for "+id+""

Ideally, I would like the "jquery.validate.min.js" file to be amended
rather than creating my own local updated version of this file. Would
this be possible?



[jQuery] Re: Announce Google gears , dojo partners with them

2007-05-31 Thread Jake McGraw

Won't FF3 / HTML 5 address the off-line database issue? Isn't this just
muddling the field before the industry backed solution comes out?

- jake

On 5/31/07, John Resig <[EMAIL PROTECTED]> wrote:



There's even less need for us to do this now, since Google has done
all the hard work for us. (Also, Dojo is only using Google's framework
if it exists, nothing more.)

Although, this sounds like a great opportunity to write a plugin
around Google Gears.

--John

On 5/31/07, jamon <[EMAIL PROTECTED]> wrote:
>
>
>
> Read more here : http://code.google.com/apis/gears/
> Google labs just released on offline storage engine for IE and ff, dojo
> toolkit team  seems have partnered width them .
> Is there anybody working on a storage solution for jquery there ?
>
> --
> View this message in context:
http://www.nabble.com/Announce-Google-gears-%2C-dojo-partners-with-them-tf3845793s15494.html#a10891347
> Sent from the JQuery mailing list archive at Nabble.com.
>
>



[jQuery] Re: Improving performance in FireFox/Opera

2007-05-31 Thread Brandon Aaron

jQuery 1.1.3 aims to provide huge performance boost to multiple animations.
Feel free to give jQuery 1.1.3a a whirl and let us know if that helps out
any.

--
Brandon Aaron

On 5/31/07, Gordon <[EMAIL PROTECTED]> wrote:



I am working on a project that involves a varying, but potentially
quite large number of elements being animated at once, with each
element's top, left, width and height all changing together.

I use FireFox as my main development browser due to the range of
developer-friendly plugins available, and also test in IE and Opera.
My code runs as intended in all three but there are some issues with
smoothness.  In Internet explorer the animation remains smooth under
all the cicsumstances I've bee able to throw at it with my test
suite.  In Firefox, however, the move animation is a little choppy,
and in Opera it is EXTREMELY choppy!

I am planning to include an option where the user can turn animation
effects off but it would be nice to try and get the performance up in
the non IE browsers.  If you guys have any tips or advice you can
offer I would appreciate hearing it.




  1   2   >