Re: [jQuery] Getting href attribute from parent element

2006-08-26 Thread David
I was linking to the previous release. So no bug. sorry.


David


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


[jQuery] Visual jQuery 1.0 -- Redux

2006-08-26 Thread Yehuda Katz
Hey guys,I've put together a different version of Visual jQuery, which works in IE, Opera, and Firefox. Please check it out and let me know how it goes. Note: There is some blank space at the top of the page for header buttons to be added in the future. Also, this is still a very-beta site. Please play with it and let me know if you find any problems (not content problems -- that's all automatically produced from John's XML documentation).
Check it out at: http://screencasts.visualjquery.com/visual/docs-redux.xml-- Yehuda KatzWeb Developer(ph)  718.877.1325
(fax) 718.686.4288 
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Getting href attribute from parent element

2006-08-26 Thread David

>
> Can you provide an example where this occurs? It'll help me to debug the 
> issue.
>
>   
I just started a blog about my programming adventures. It's going to be 
mainly in Dutch but i added a post in English for the example.

http://xwerocode.blogspot.com/

ps: it's not an advertisment for my blog. I wanted to keep my blogs 
under a wrapper for a month to see if i could write enough worth 
mentioning.


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


Re: [jQuery] jQuery Getting Started guide

2006-08-26 Thread Fil
> Speaking of translations, Fil, I was thinking of translating some of
> your French stuff into English, what do you think?

It makes me very happy :)

We can imagine putting the translations on this same site, or on yours or on
one of jquery's subsites. I think it ought to be CC-licensed with a
non-commercial basis (in other words, if one of us starts a book, he'd have
to ask permission to include some of the translations).

In any case we will want to have translation links in place so that a reader
can find the translation that suits her best if she happens to find one or
the other version. SPIP (the software I'm co-developing and that runs
jquery.info) does this well.

-- Fil


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


Re: [jQuery] Getting href attribute from parent element

2006-08-26 Thread John Resig
David -

Can you provide an example where this occurs? It'll help me to debug the issue.

--John

On 8/26/06, David <[EMAIL PROTECTED]> wrote:
> I want to get the value from the href attribute from a parent element.
> My code is : $(this).parent().attr("href"); , but this doesn't work. I
> don't understand it because for the same parent $(this).parent().html();
> gives me the expected output.
>
> Any thoughts on this ? Thank you.

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


[jQuery] New Plugin: jQWidon't - Suppress typographic widows

2006-08-26 Thread Dave Cardwell
To quote Shaun Inman[1]:
"For those who don’t know, in typesetting, a widow is a single word on a 
line by itself at the end of a paragraph and is considered bad style."

With a great deal of content being generated or at least fetched by 
JavaScript nowadays, I thought a jQuery plugin could come in handy. 
Hopefully you'll agree, hence I give you jQWidon't:
   * http://davecardwell.co.uk/geekery/javascript/jquery/jqwidont/


Best wishes,
Dave Cardwell ~ http://davecardwell.co.uk/

[1] http://www.shauninman.com/plete/2006/08/widont-wordpress-plugin.php

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


Re: [jQuery] jQuery Getting Started guide

2006-08-26 Thread Patrick Hall
> Fil wrote:
> > Hello,
> >
> > great text for beginners!!
> >
> > do you mind if I start a French translation of this page for 
> > http://jquery.info ?
> >
> > and, do you plan to update it again soon?

Speaking of translations, Fil, I was thinking of translating some of
your French stuff into English, what do you think?

-pat

-- 
ᗷɭoℊẚᗰսɳᑯѲ⁈⁈⁈
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery Getting Started guide

2006-08-26 Thread Jörn Zaefferer
Fil wrote:
> Hello,
>
> great text for beginners!!
>
> do you mind if I start a French translation of this page for 
> http://jquery.info ?
>
> and, do you plan to update it again soon?
>
>   
Translations are welcome. My plan is to update the text as soon as the 
1.0 release is complete, including webpage. I guess it would be best to 
start translating when that update done.

-- Jörn

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


[jQuery] Getting href attribute from parent element

2006-08-26 Thread David
I want to get the value from the href attribute from a parent element. 
My code is : $(this).parent().attr("href"); , but this doesn't work. I 
don't understand it because for the same parent $(this).parent().html(); 
gives me the expected output.

Any thoughts on this ? Thank you.


David




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


Re: [jQuery] Root of my problems

2006-08-26 Thread Jörn Zaefferer
digital spaghetti wrote:
> I did some testing locally with jQuery which worked fine, but when I
> tried to inegrate it with some stuff in Joomla (the CMS I am using) it
> doesn't work correctly.
When it runs locally but not serverside, you should check if all script 
files are really included. Put some kind of logging (firebug console or 
alerts) at the start of the included scripts. That way, your checks 
don't rely on any events.

-- Jörn

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


Re: [jQuery] Can the content of a node of xml be placed inside a div when xml source is loaded using .get

2006-08-26 Thread Dave Methvin
> $("#main").append( $("main",xml).children() );
>  [Exception... "Could not convert JavaScript argument arg 0  
>  [nsIDOMHTMLDivElement.appendChild]" nsresult: "0x80570009 
>  (NS_ERROR_XPC_BAD_CONVERT_JS)"  
 
I've seen that error in Firefox if you try to append a null or undefined
using appendChild. 
 


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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Dave Methvin
>> $("").appendTo(this).src( src ).load( f );
> if you replace the main line by:
>$("").src( src ).load( f ).appendTo(this); 
> then the image will display before the alert() fires.

The problem with appendTo being last is that IE will leak memory if you set
certain attributes (such as an event handler) or attach other elements to
that root node before attaching the root node to the document. If you're not
doing this with a lot of elements you can probably live with the memory leak
more than Safari users can live with the image not being displayed before
the event fires. 


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


Re: [jQuery] Can the content of a node of xml be placed inside a div when xml source is loaded using .get

2006-08-26 Thread John Resig
>  the other suggested approach
>  puts the data in but removes alot of the formating and disables links -
> quite odd not something I expected

Somehow I'm not surprised. Moving non-HTML elements into an HTML
document is problematic in most browsers. Another recommendation:
Instead of returning an XML document, return an HTML one - then you
can do stuff like this:

$("")
.html( htmlString )
.find("div#tmp-title")
.appendTo("#title")
.end()
.find("div#tmp-body")
.appendTo("#body")
.end();

Let me know if that makes sense to you, I can try and explain it some more.

--John

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


Re: [jQuery] Slidebar with jquery

2006-08-26 Thread Larry Garfield
Hm.  Looks like almost none of the animaltion-based stuff on that site is 
working in Konqueror right now.

On Saturday 26 August 2006 12:35, Matt Stith wrote:
> Try out interface's Slider.
>
> http://interface.eyecon.ro/demos
>
> On 8/24/06, testebr <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Anyone know where I can find an  SlideBar with Jquery like this website
> > http://www.strategyinformer.com/pc/hiddenstrokeii/interview.html
> > http://www.strategyinformer.com/pc/hiddenstrokeii/interview.html
> >   (prototype
> > based) ?
> >
> > see the "YOUR SCORE" BLOCK
> >
> > Thanks.
> > --
> > View this message in context:
> > http://www.nabble.com/Slidebar-with-jquery-tf2161977.html#a5975055
> > Sent from the JQuery forum at Nabble.com.
> >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Fil
@ John Resig <[EMAIL PROTECTED]> :
> With jQuery 1.0, you should be able to write your plugin like this:
> $.fn.image = function(src, f){
>   return this.each(function(){
> $("").appendTo(this).src( src ).load( f );
>   });
> };
> 
> Helps to make things a little bit simpler.

Yes it works too, and is much nicer :)

funny thing is that if you replace the main line by:
$("").src( src ).load( f ).appendTo(this);
then the image will display before the alert() fires.
Whereas with your line above (as with my original function) the alert fires
before the image displays (all this in Safari, as with FF it displays and
alerts in both cases.

Might this help explain a part of Safari's oddities (??).

> I like the idea of having the callback for image loading - a smart move.

Me too. It was sDisk's idea.

-- Fil


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


Re: [jQuery] Can the content of a node of xml be placed inside a div when xml source is loaded using .get

2006-08-26 Thread Sam Sherlock





when I use $("#main").append( $("main",xml).children() );

I get the following:

[Exception... "Could not convert _javascript_ argument arg 0
[nsIDOMHTMLDivElement.appendChild]" nsresult: "0x80570009
(NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame ::
http://ss29/_work/sharkevader.com/v2/assets/js/jquery-1.0.pack.js ::
anonymous :: line 9" data: no]

the other suggested approach 

puts the data in but removes alot of the formating and disables links -
quite odd not something I expected

any suggests




John Resig wrote:

  Sam -

Try doing this:
$("main",xml).children().appendTo("#main");

or this:
$("#main").append( $("main",xml).children() );

I think they may get you the effect that you desire. This is with the
(soon to be) jQuery 1.0:
http://jquery.com/src/jquery-svn.js

--John

On 8/25/06, Sam Sherlock <[EMAIL PROTECTED]> wrote:
  
  
.text works if you put the HTML in cdata.

though I have some odd display issues, or am I still going wrong??


On 8/26/06, Sam Sherlock < [EMAIL PROTECTED]> wrote:


  I have tried that but no joy, when I dump the mark up to the console

var newContent = "";
...
console.info('main from xml source: ' + newContent);


main from xml source: undefined

what am I doing wrong??




On 8/26/06, Jonathan Howard < [EMAIL PROTECTED]> wrote:
  
  

Try:

$("main",xml).html()

instead of:

$("main",xml).text()



On 8/25/06, Sam Sherlock < [EMAIL PROTECTED]> wrote:


the dynamic xml source creates a structure along the following lines


   my title
   
   about
   
   

   



the jquery code that I am using to take load the xml source and take the
content




  

$.get("./content/?id="+htmlDoc,function(xml){


  
   var innerHeight = 0;

   // however this return the text stripped of mark up
   alert( $("main",xml).text() );

   //  i need to retain the mark and place it in my
main div


  

$("div#main").html($("main",xml).text());


  
   innerHeight =
document.getElementById('innerMain').offsetHeight;

   $("div#main").css({height: innerHeight+"px"});
   $("div#content").css({height: innerHeight+"px"});

   //

  

$("div#main").slideDown("slow");


  
   //console.info("new height " + innerHeight);
   init();
   });


is there a way to do this??

  

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

  




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


Re: [jQuery] jQuery copy constructor

2006-08-26 Thread Jörn Zaefferer
Ferdinand Beyer wrote:
> Hi!
>
> In a recent project I often needed to copy a jQuery object to save a 
> subquery without losing the original query. As far as I can see there is 
> no "official way" to do this so I came up with a small extension function:
>   
Hi Ferdinand,

though it looks like there is now an official way, did you consider 
using end()? It restores the last state of the jQuery object before 
filtering or similar modifications. I'm not sure how exactly your code 
looks like, but that could have helped, too.

-- Jörn

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


Re: [jQuery] interface plugin droppable

2006-08-26 Thread patrickk
that´s good news.
just downloaded a new version of interface.js, but it doesn´t seem to  
work.

thanks,
patrick

Am 26.08.2006 um 19:57 schrieb Stefan Petre:

> still, it may work. just that I changed something regarding  
> droppables.
> Onchange applies to the droppable and gets only one parameter, the
> dragged element. So you should do like this
>
> onchanged : function(dragged){
> alert(this); //the droppable
> alert(dragged); //the draggable
> }
>
> I updaed the documentation too. Sorry for this.
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


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


[jQuery] interface plugin droppable

2006-08-26 Thread Stefan Petre
still, it may work. just that I changed something regarding droppables. 
Onchange applies to the droppable and gets only one parameter, the 
dragged element. So you should do like this

onchanged : function(dragged){
alert(this); //the droppable
alert(dragged); //the draggable
}

I updaed the documentation too. Sorry for this.

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


Re: [jQuery] interface plugin droppable

2006-08-26 Thread patrickk
I see. thanks for your answer.

patrick


Am 26.08.2006 um 19:43 schrieb Stefan Petre:

> Drag and Drop from interface is not designed to work with table  
> elements.
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


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


[jQuery] animate() support for custom tween/easing 'formulas'

2006-08-26 Thread Stefan Petre
In the new version of Interface I overwrite the 'fx' function from 
jQuery and replace it with a modified one that has this feature (easein, 
easeout, easeinout, elasticin, elasticout, etc.) .

http://interface.eyecon.ro/demos/ifxfold.html if you click fold toggle 
you can see it in action.

The changed I made is minor, just calculate the step in a separate 
function and the fx function accepts one extra parameter 'transition'

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


[jQuery] interface plugin droppable

2006-08-26 Thread Stefan Petre
Drag and Drop from interface is not designed to work with table elements.

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread John Resig
Hi Fil -

I've created tickets for both your bugs:
http://proj.jquery.com/dev/bugs/bug/141/
http://proj.jquery.com/dev/bugs/bug/142/

Thanks for your help in spotting them.

--John

On 8/26/06, Fil <[EMAIL PROTECTED]> wrote:
>
> Here's something else. It used to work with "latest"
>  but fails with 1.0; both on Safari and FF,
> this time.
>
> See it at
>   http://www.jquery.info/IMG/html/2_dom.html (with latest, you see "coucou")
>   http://www.jquery.info/IMG/html/2_dom_1.0.html (with 1.0, no "coucou")
>
> >
> 
> 
>   http://jquery.com/src/jquery-1.0.js"; 
> type="text/javascript">
>
> 
> 
>
> 
>
> Ici, l'introduction
>
>
> 
>
> Ici, premier paragraphe de #texte
>
> Ici, deuxième paragraphe de #texte
>
> Ici, troisième paragraphe de #texte
>
> Ici, quatrième paragraphe de #texte
>
> 
>
> http://www.jquery.info/spip.php?article2";>(article)
>
> 
> 
>
>
> -- Fil
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
John Resig
http://ejohn.org/
[EMAIL PROTECTED]

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


Re: [jQuery] animate() support for custom tween/easing 'formulas'

2006-08-26 Thread John Resig
Jon -

Yep - this is a great idea! I think there's been some progress made on it here:
http://proj.jquery.com/dev/bugs/bug/127/

I'll see if I can get it in to jQuery 1.1 so that you can bundle your
easing effects up as a single plugin and add it in.

--John

On 8/19/06, Jon Burger <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> I have written a fair few little tween functions/classes, all of which I
> have made generic - ie you pass in a property to tween and it's parent obj
> (doesn't have to be a dom node) and you also pass in the 'tween function' -
> these were all 'ported' from the robert penner originals that got used in
> actionscript.
>
> The cool thing about them is they are small and provide every type of easing
> animation you could want - and they all take the same parameters (with the
> exception of a few more complex ones like elastic and bounce which have one
> or two more parameters)
>
> Now after that waffle I'd like to suggest that it would be good to be able
> to pass in a function to the animate method too - much like you can pass a
> function into the default array .sort() method - this function would enable
> different styles of easing anmation.
>
> I might end up rewriting the animate method or making a new tween/ease one
> if this isn't being worked on or considered at all. I don't really want to,
> there are many better javascripters out there and I'd hate to make a sub-par
> jquery extension. But since I'm porting a lot of my own ui scripts to
> versions written using jquery (not as plugins), I will end up needing this
> so unless someone else is working on it or fancies the idea then I will
> start it in my spare time.
>
> Just a suggestion.
>
> Jon
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
John Resig
http://ejohn.org/
[EMAIL PROTECTED]

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


Re: [jQuery] Slidebar with jquery

2006-08-26 Thread Matt Stith
Try out interface's Slider.http://interface.eyecon.ro/demosOn 8/24/06, testebr <
[EMAIL PROTECTED]> wrote:Hi,Anyone know where I can find an  SlideBar with Jquery like this website
http://www.strategyinformer.com/pc/hiddenstrokeii/interview.html
http://www.strategyinformer.com/pc/hiddenstrokeii/interview.html  (prototypebased) ?see the "YOUR SCORE" BLOCKThanks.--View this message in context: 
http://www.nabble.com/Slidebar-with-jquery-tf2161977.html#a5975055Sent from the JQuery forum at Nabble.com.___jQuery mailing list
discuss@jquery.comhttp://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Dynamic Forms?

2006-08-26 Thread Matt Stith
jQuery provides something like $('#id:visible'), which will select just visible elements. For your need, i think you could do something like this:$("[EMAIL PROTECTED]'cf_']").hide();$("#id_you_need_to_show').show();
Either that, or hide both of the other divs when you need to show one.On 8/18/06, digital spaghetti <
[EMAIL PROTECTED]> wrote:Right, I've managed to get this half working now.  I put my code into
a function, and put an onclick param on each  tag, so whenit's selected it runs my code:example:
function contactTypeVenue() {
$( document.getElementById("cf_position")).hide();
$(document.getElementById("cf_email")).hide();
}

function contactTypePerson() {

$(document.getElementById("cf_position")).show();
$(document.getElementById("cf_email")).show();
}

function contactTypeCompany() {
$(document.getElementById("cf_position")).hide();
}
>> >But now the problem I'm experiencing is when I use different selections of options.  For example, when I change it to company, itremoves the div cf_position, but not cf_email.  When I then clickperson, cf_email is already visible and causes the div to renderincorrectly. Is their any way to check the state of a div tag first beforeexecuting the code?On 18/08/06, digital spaghetti <[EMAIL PROTECTED]> wrote: >> Hi there,>> I'm new to jQuery.  I've tried out a few AJAX things in the past, but I am very happy to settle on jQuery as it seems to have everything a developer could need :)>> I'm having a bit of trouble though, and I appologise if I sound thick, but I would like to use jQuery to create dynamic forms and I cannot seem to get it to work. >> I am creating a Contact tool, and with the tool I have a dropdown that allows you to select the type of contact (person, place, company, etc).  Based on the option selected, I want to present the required fields to the user, and remove fields not required from the view. >> I've tried to look through the docs, and cannot find what I am looking for.  What I want to do, is have a script that grabs the value from my select field (name="contact_type" class="contact_type") and based on this value, runs a short script to show and hide the required fields. >> I think once I get over this problem, the rest of the development should be relativly easy.>> Any help would be appreciated.>> Regards,> Tane Piper> No Half Measures >___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] slideUp/slideDown with dynamic content

2006-08-26 Thread John Resig
Hello -

> Does anyone know what is the solution for the following process?
>
> 1. Element "x" slides up.
> 2. The original content of element "x" is being replaced.
> 3. Element "x" slides down, but not to the newly replaced content's
> height, it keeps sliding to the height given from the original content.

This should be resolved in jQuery 1.0, please let me know if that is
not the case.
http://jquery.com/src/jquery-1.0.js

--John

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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread John Resig
With jQuery 1.0, you should be able to write your plugin like this:
$.fn.image = function(src, f){
  return this.each(function(){
$("").appendTo(this).src( src ).load( f );
  });
};

Helps to make things a little bit simpler. I like the idea of having
the callback for image loading - a smart move.

--John

> I made it work both in Safari and FF by changing the insertion sequence:
>
> $.fn.image = function(src, f){
>return this.each(function(){
>  $("").appendTo(this).each(function(){
> this.src = src;
> this.onload = f;
>  });
>});
> }
>
> $(document).ready(function() {
>   $("#container").image("http://jquery.com/images/hat2.gif",function(){
> alert("The image is loaded now");
>   });
> });
>
>
> Give it a try here:
> http://www.jquery.info/IMG/html/8_charger_une_image.html

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


Re: [jQuery] jQuery copy constructor

2006-08-26 Thread John Resig
Hi Ferdinand,

> What I would really like to see in the standard library is that jQuery
> objects can be passed to the $() function to obtain a copy:
>
> var $a = $('some.query');
> var $b = $($a);
>
> $b.filter('some.criteria'); // Does not affect $a
>
> What do you think about that?

I snuck that exact code into jQuery 1.0:
http://jquery.com/src/jquery-1.0.js

You can now clone jQuery objects by wrapping them again, just as you
described. Enjoy!

--John

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


Re: [jQuery] can't subscribe to mailing list

2006-08-26 Thread John Resig
Hi Dave -

I fixed your mailing list subscription, you should be in, now.

> PS - I wrote a jQuery plugin I'd to make the group aware of:
> http://dave-cohen.com/node/1186
> That's the main reason I'm subscribing, rather than browsing via RSS.

Awesome plugin - I really dig the inline results.

--John

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


Re: [jQuery] hasClass()?

2006-08-26 Thread Dave Methvin
> >  >   
> >
> > jQuery can deal with it, but IE may not so be sure to test.
> >
> > http://www.thunderguy.com/semicolon/2005/05/16/multiple-class-selector
> > s-in-internet-explorer/
>
> No, it works as expected - jQuery doesn't use any browsers built-in CSS 
> handling - making sure that it works ubiquitously across all browsers.

IE6 doesn't correctly apply styles when you have a css rule with multiple
classes on a single element. There was a thread about this earlier in the
month. jQuery correctly handles the multiple classes but only the final
class seems to be applied to the element. Supposedly this is fixed in IE7.

http://jquery.com/discuss/2006-August/009173/



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


Re: [jQuery] Find only the first element

2006-08-26 Thread John Resig
Hello -

You should be able to achieve your desired result by doing:
$("p a:first").hide();

Hope that helps.

--John

On 8/18/06, Julius Lucks <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I would like to use .find, but only for the first element.  If I have
>
> 
>   link 1 
>   link 2 
> 
>
> and I do
>
> $("p").find("a").hide();
>
> this hides both links.  I would only like to hide the first.  Can I do this
> with find, or can I use $("p").children()?
>
> Cheers,
>
> Julius Lucks
>
> --
> -
> http://openwetware.org/wiki/User:Lucks
> -
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>


-- 
John Resig
http://ejohn.org/
[EMAIL PROTECTED]

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


Re: [jQuery] Safari doesn't like show()

2006-08-26 Thread John Resig
I've resolved this issue in jQuery 1.0:
http://jquery.com/src/jquery-1.0.js

It was an issue with how Safari handles computedStyle() when an
element has its display set to 'none'.

> I found that if you use CSS class to hide something in safari then you
> need to use raw STYLE=" display: none" to get it work correctly in
> safari  useing a classs="myHideClass"  is not working, so thats my
> solution, that worked for me. you may want to try it. it sucks but its
> the only solution i known that would work

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


Re: [jQuery] fadeOut/fadeIn

2006-08-26 Thread John Resig
Hello -

> I`m wondering why i cann`t write something like this:
> $('#info').fadeOut("slow").fadeIn("slow");
> and how to get around it.

That code should work, as is, in the new jQuery 1.0:
http://jquery.com/src/jquery-1.0.js

--John

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


Re: [jQuery] visual docs for parents ()

2006-08-26 Thread John Resig
> Maybe we should report errors in the docs as bugs, too. After all, they
> are :-)
> One could mark a bug report concerning the docs with '[docs]
> Description...'.

That's a good idea - although I already fixed this and committed it :-)

--John

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


[jQuery] Autocomplete Plugin help

2006-08-26 Thread digital spaghetti
Hi there,

Would anyone be able to help me out?  I'm trying to code a livesearch
widget for Wordpress using G. van den Hoven's Autocomplete plugin.

I've tried to look through the source to try find what I need, but can't.

I have my widget that I initialises the plugin, and an input for where
I accept the user typing in, but what I cannot work out is how to take
each keypress and pass that into a PHP file to do the search.  I'd
prefer to wait until at least the first 3 characters have been put in
before firing this off, but this is not essential.

code:


//
// Page script
$(document).ready(function() {
$('input.#livesearch').autoComplete($('#center'), '/search.php');
});








Can anyone suggest what I do?

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


[jQuery] can't subscribe to mailing list

2006-08-26 Thread Dave Cohen
My apologies if this makes it the list, it's directed at the list moderator.

I've submitted the subscription form on jquery.com.  This leads to a page 
indicating that I have subscribed, but I must check my email for 
confirmation.

I'm not receiving the confirmation, either to my inbox or my junk mailbox.  In 
other words I think its broken and I wanted to you know.

-Dave

PS - I wrote a jQuery plugin I'd to make the group aware of:
http://dave-cohen.com/node/1186
That's the main reason I'm subscribing, rather than browsing via RSS.

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


[jQuery] Find only the first element

2006-08-26 Thread Julius Lucks
Hello,I would like to use .find, but only for the first element.  If I have  link 1   link 2 and I do $("p").find("a").hide();
this hides both links.  I would only like to hide the first.  Can I do this with find, or can I use $("p").children()?Cheers,Julius Lucks-- -
http://openwetware.org/wiki/User:Lucks-
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Slidebar with jquery

2006-08-26 Thread testebr

Hi,

Anyone know where I can find an  SlideBar with Jquery like this website 
http://www.strategyinformer.com/pc/hiddenstrokeii/interview.html
http://www.strategyinformer.com/pc/hiddenstrokeii/interview.html  (prototype
based) ?

see the "YOUR SCORE" BLOCK

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Slidebar-with-jquery-tf2161977.html#a5975055
Sent from the JQuery forum at Nabble.com.


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


[jQuery] animate() support for custom tween/easing 'formulas'

2006-08-26 Thread Jon Burger

Hi guys,

I have written a fair few little tween functions/classes, all of which I
have made generic - ie you pass in a property to tween and it's parent obj
(doesn't have to be a dom node) and you also pass in the 'tween function' -
these were all 'ported' from the robert penner originals that got used in
actionscript.

The cool thing about them is they are small and provide every type of easing
animation you could want - and they all take the same parameters (with the
exception of a few more complex ones like elastic and bounce which have one
or two more parameters)

Now after that waffle I'd like to suggest that it would be good to be able
to pass in a function to the animate method too - much like you can pass a
function into the default array .sort() method - this function would enable
different styles of easing anmation.

I might end up rewriting the animate method or making a new tween/ease one
if this isn't being worked on or considered at all. I don't really want to,
there are many better javascripters out there and I'd hate to make a sub-par
jquery extension. But since I'm porting a lot of my own ui scripts to
versions written using jquery (not as plugins), I will end up needing this
so unless someone else is working on it or fancies the idea then I will
start it in my spare time.

Just a suggestion.

Jon


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


Re: [jQuery] Dynamic Forms?

2006-08-26 Thread digital spaghetti
Right, I've managed to get this half working now.  I put my code into
a function, and put an onclick param on each  tag, so when
it's selected it runs my code:

example:

function contactTypeVenue() {
$(document.getElementById("cf_position")).hide();
$(document.getElementById("cf_email")).hide();
}

function contactTypePerson() {

$(document.getElementById("cf_position")).show();
$(document.getElementById("cf_email")).show();
}

function contactTypeCompany() {
$(document.getElementById("cf_position")).hide();
}



Person
Venue
Company


But now the problem I'm experiencing is when I use different
selections of options.  For example, when I change it to company, it
removes the div cf_position, but not cf_email.  When I then click
person, cf_email is already visible and causes the div to render
incorrectly.

Is their any way to check the state of a div tag first before
executing the code?

On 18/08/06, digital spaghetti <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I'm new to jQuery.  I've tried out a few AJAX things in the past, but I am 
> very happy to settle on jQuery as it seems to have everything a developer 
> could need :)
>
> I'm having a bit of trouble though, and I appologise if I sound thick, but I 
> would like to use jQuery to create dynamic forms and I cannot seem to get it 
> to work.
>
> I am creating a Contact tool, and with the tool I have a dropdown that allows 
> you to select the type of contact (person, place, company, etc).  Based on 
> the option selected, I want to present the required fields to the user, and 
> remove fields not required from the view.
>
> I've tried to look through the docs, and cannot find what I am looking for.  
> What I want to do, is have a script that grabs the value from my select field 
> (name="contact_type" class="contact_type") and based on this value, runs a 
> short script to show and hide the required fields.
>
> I think once I get over this problem, the rest of the development should be 
> relativly easy.
>
> Any help would be appreciated.
>
> Regards,
> Tane Piper
> No Half Measures
>

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


[jQuery] needed: edit html plugin

2006-08-26 Thread Michael Holloway
Do you mean you need a wysiwyg?
*
Posted:* Thu Aug 24 21:46:40 EDT 2006
*From:* Francisco Brito mailto:discuss%40jquery.com?Subject=%5BjQuery%5D%20needed%3A%20edit%20html%20plugin&In-Reply-To=22910c670608241142l2374443ajeb2bf8667e2c0ee2%40mail.gmail.com>>

Hmm... not that kind of selections/ranges. I meant within textareas or
inputs. There's probably code within the autocomplete plugin that does
something like that. I'll dive into it.

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


Re: [jQuery] How to combine lt and gt?

2006-08-26 Thread Michael Fuerst
John Resig schrieb:
> The order is definitely important. Every time you do a "filter" (like
> eq or lt) it prunes the list down so all future operations must be
> relative to the previous operations (If that makes any sense).
>
> Additionally, I just recently added shortcut methods for eq/lt/gt so you can 
> do:
>
> $("p").lt(5).gt(3)
>
>   
When you do something like this, you probably want everything between 2
and 5, so why not extend jQuery to something like

$("p").bt(2,5)

for between. This should mathematical be 2 < x < 5. 

Michael




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


[jQuery] Root of my problems

2006-08-26 Thread digital spaghetti
Hey again folks,

Right, I have discovered what seems to be the root cause of why my
stuff wasn't working.

I did some testing locally with jQuery which worked fine, but when I
tried to inegrate it with some stuff in Joomla (the CMS I am using) it
doesn't work correctly.

Here is how I am activating what I am using:

$(document).ready(function(){
$('img').ToolTip('inputsTooltip', { position: 'top' });
$("*").outlineTextInputs();
}); 

Now, this works fine locally.  It also works if I take the code and
create seperate functions, and then activate them with onclick, but
this doesn't work for me design-wise.

I'm not getting any errors in firefox.  The only difference is that
locally, the JavaScript is in the head tag, while in Joomla it's
loaded in the componant, but when I view the source it shows fine.

Does anyone have any ideas what could be going on?

Regards,
Tane Piper

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


Re: [jQuery] needed: edit html plugin

2006-08-26 Thread digital spaghetti
Check out http://proj.jquery.com/plugins/
There are a few plugins there that might match your requirements.

Tane

On 24/08/06, Francisco Brito <[EMAIL PROTECTED]> wrote:
> Does anyone know of a jQuery plugin for editing HTML?
>
> It's a mega pain in the plugin to deal with browser whims regarding ranges,
> selections and editable HTML.
>
> (refresher: like dojo's or HTMLArea)
>
> By the way, does anyone know of a plugin for handling selections/ranges?
>
> -Brito
>
> 
> I've just posted an entry about jQuery (yet another "jQuery is great" post).
> Read it if you're interested.
> http://nullisnull.blogspot.com/2006/08/seriously-what-is-jquery.html
> 
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>

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


[jQuery] Serializable Form Upload Element

2006-08-26 Thread Matti Putkonen
Have you seen: P.O.R.K  ( http://beta.zapguide.nl/iframe/ ) ?

Tried to do something like this on a seperate script. got it working on 
one specific form, but getting an element to reload after the file was 
submitted to iframe was too much for me :(

-- 
Matti Putkonen

[EMAIL PROTECTED]
www.fi3.fi


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


[jQuery] fadeOut/fadeIn

2006-08-26 Thread Juris Muris
Hello!I`m wondering why i cann`t write something like this:$('#info').fadeOut("slow").fadeIn("slow");and how to get around it.K.  
__ Advertisement:
"Intervija ar dj Monstru"
http://www.tvnet.lv/izklaide/ 

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


[jQuery] RE: Safari doesn't like show()

2006-08-26 Thread Nilesh Patel
I found that if you use CSS class to hide something in safari then you 
need to use raw STYLE=" display: none" to get it work correctly in 
safari  useing a classs="myHideClass"  is not working, so thats my 
solution, that worked for me. you may want to try it. it sucks but its 
the only solution i known that would work
-- 
Nilesh B. Patel
  www.n-bp.com


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


[jQuery] slideUp/slideDown with dynamic content

2006-08-26 Thread Gabor Babicz
Hi,

Does anyone know what is the solution for the following process?

1. Element "x" slides up.
2. The original content of element "x" is being replaced.
3. Element "x" slides down, but not to the newly replaced content's  
height, it keeps sliding to the height given from the original content.

Thanks,
Gabor.



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


[jQuery] Dynamic Forms?

2006-08-26 Thread digital spaghetti
Hi there,I'm new to jQuery.  I've tried out a few AJAX things in the past, but I am very happy to settle on jQuery as it seems to have everything a developer could need :)I'm having a bit of trouble though, and I appologise if I sound thick, but I would like to use jQuery to create dynamic forms and I cannot seem to get it to work.
I am creating a Contact tool, and with the tool I have a dropdown that allows you to select the type of contact (person, place, company, etc).  Based on the option selected, I want to present the required fields to the user, and remove fields not required from the view.
I've tried to look through the docs, and cannot find what I am looking for.  What I want to do, is have a script that grabs the value from my select field (name="contact_type" class="contact_type") and based on this value, runs a short script to show and hide the required fields.
I think once I get over this problem, the rest of the development should be relativly easy.Any help would be appreciated.Regards,Tane PiperNo Half Measures
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jQuery copy constructor

2006-08-26 Thread Ferdinand Beyer
Hi!

In a recent project I often needed to copy a jQuery object to save a 
subquery without losing the original query. As far as I can see there is 
no "official way" to do this so I came up with a small extension function:

$.fn.newQuery = function()
{
 var c = $();
 c.cur = $.merge([], this.cur);
 return c;
}

Usage example:

// I need these queries very often so I want to save the results
// within a variable
$fields = $('input.dynamic, textarea.dynamic, select.dynamic');
$requiredFields = $fields.newQuery().filter('.required');

I'm pretty sure that I will need this function in almost every future 
project when I use jQuery. Is there an official way to do this that I 
missed?

What I would really like to see in the standard library is that jQuery 
objects can be passed to the $() function to obtain a copy:

var $a = $('some.query');
var $b = $($a);

$b.filter('some.criteria'); // Does not affect $a

What do you think about that?

-- Ferdinand



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


[jQuery] Oneliner to prevent click-to-activate (EOLA) in IE

2006-08-26 Thread Klaus Hartl

Say you have a flash movie embedded in a container with the id 
"introduction". To prevent activate to click in IE, do this:

$('#introduction').html( $('#introduction').html() );

I love jQuery. It lets me embed my flash standards compliant and saves 
me some kilobytes for the swfobject js...

To be as fast as possible I put the following snippet immediatly after 
the flash (as an exception I don't care for unobtrusiveness here):



 $('#introduction').html( $('#introduction').html() );


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Fil
I made it work both in Safari and FF by changing the insertion sequence:

$.fn.image = function(src, f){
   return this.each(function(){
 $("").appendTo(this).each(function(){
this.src = src;
this.onload = f;
 });
   });
}

$(document).ready(function() {
  $("#container").image("http://jquery.com/images/hat2.gif",function(){
alert("The image is loaded now");
  });
});


Give it a try here:
http://www.jquery.info/IMG/html/8_charger_une_image.html


-- Fil


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


Re: [jQuery] visual docs for parents ()

2006-08-26 Thread Jörn Zaefferer
Yehuda Katz wrote:
> The visual docs are automatically generated from the inline documentation.
>
> John, can you fix this?
Maybe we should report errors in the docs as bugs, too. After all, they 
are :-)
One could mark a bug report concerning the docs with '[docs] 
Description...'.

-- Jörn

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Mike Rubits
I actually had no love with form.js in FireFox either, I thought it was a
bug in my code, but seeing your examples, I don't think it is. It's working
in IE Win just fine though, both checked out from SVN just last night.

> A friend tells me that none of these work with his browser (FF 1.07/win
xp).
>
> But maybe this is a form.js problem (or did I use a bad form.js file? --
> which one is "the latest"?)
> 
> -- Fil 

Mike



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


[jQuery] interface plugin droppable

2006-08-26 Thread patrickk
I´m using the interface plugin to drag and drop table rows.

the function below gives me an object HTMLTableRowElement for zone,  
but nothing for drag:

ondrop: function (zone, drag)
{
alert(zone)
alert(drag)
},

any hints?

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


Re: [jQuery] hasClass()?

2006-08-26 Thread John Resig
>  >   
>
> jQuery can deal with it, but IE may not so be sure to test.
>
> http://www.thunderguy.com/semicolon/2005/05/16/multiple-class-selectors-in-i
> nternet-explorer/

No, it works as expected - jQuery doesn't use any browsers built-in
CSS handling - making sure that it works ubiquitously across all
browsers.

--John

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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Fil
> Try swapping the order of the lines above to:
> 
> i.onload = f;
> i.src = src;
> 
> So that the onload is set before you start loading the image... Not sure 
> but that may help?

Nope, it doesn't. In fact the image loads (as I can see from Safari's
"Activity" window), and the alert message pops up. But the image doesn't
display.

-- Fil


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


Re: [jQuery] hasClass()?

2006-08-26 Thread Dave Methvin
 >   

jQuery can deal with it, but IE may not so be sure to test.

http://www.thunderguy.com/semicolon/2005/05/16/multiple-class-selectors-in-i
nternet-explorer/



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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Kelvin Luck
Fil wrote:
> @ SDisk SDisk <[EMAIL PROTECTED]> :
>> You can not load images with AJAX simply create a new image object and
>> append, then the image can load asyncronously. Try this simple jQuery
>> plugin:
>>
>> $.fn.image = function(src, f){
>>return this.each(function(){
>>var i = new Image();
>>i.src = src;
>>i.onload = f;
>>this.appendChild(i);
>>});
>> }
>>
>> Then call this plugin like:
>> $("#container").image("http://jquery.com/images/hat2.gif",function(){
>>  alert("The image is loaded now");
>> });
> 
> This works nicely with FF, but not with Safari. Or am I doomed?
> 
> -- Fil

Try swapping the order of the lines above to:

i.onload = f;
i.src = src;

So that the onload is set before you start loading the image... Not sure 
but that may help?

Cheers,

Kelvin :)

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


Re: [jQuery] visual docs for parents ()

2006-08-26 Thread Yehuda Katz
The visual docs are automatically generated from the inline documentation.John, can you fix this?-- YehudaOn 8/26/06, Roman <
[EMAIL PROTECTED]> wrote:seem to be incorrect:Get a set of elements containing the unique ancestors of the matched set
of elements.ExamplesBefore:HelloHelloAgainjQuery Code:
$("span").ancestors()Result:[ ..., ..., Hello ]___
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/-- Yehuda Katz
Web Developer(ph)  718.877.1325(fax) 718.686.4288
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Fil
@ SDisk SDisk <[EMAIL PROTECTED]> :
> You can not load images with AJAX simply create a new image object and
> append, then the image can load asyncronously. Try this simple jQuery
> plugin:
> 
> $.fn.image = function(src, f){
>return this.each(function(){
>var i = new Image();
>i.src = src;
>i.onload = f;
>this.appendChild(i);
>});
> }
> 
> Then call this plugin like:
> $("#container").image("http://jquery.com/images/hat2.gif",function(){
>  alert("The image is loaded now");
> });

This works nicely with FF, but not with Safari. Or am I doomed?

-- Fil


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


Re: [jQuery] hasClass()?

2006-08-26 Thread John Resig
> Thanks! Will this work if an object has several classes? E.g.
>
>  

Yep! jQuery handles multiple classes gracefully.

--John

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


Re: [jQuery] hasClass()?

2006-08-26 Thread Roman
Thanks! Will this work if an object has several classes? E.g.

 

Konstantin Käfer wrote:
> Just use $('#something').is('.large');
> 
> Note that you can specify arbitrary css selectors in the is()
> function, among them the dotClass selector. You can even write
> $('#something').is('ul.large.wide'); to check if it is an unordered
> list with the classes "huge" and "wide".
> 
> 2006/8/26, Roman <[EMAIL PROTECTED]>:
>> I was wondering if there is a way to check if an element has a certain
>> class attached to it? For example $('#something').hasClass('large')
>> would return true or false.
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>

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


Re: [jQuery] jQuery docs / Visual jQuery

2006-08-26 Thread Yehuda Katz
On 8/26/06, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
Hi John and Yehuda and the rest of the list,John mentioned the preview update to Visual jQuery in the blog. It'sgreat to see the new visual jQuery in action.Thanks. It was a huge endeavor to retain the basic GUI of the site, but make it auto-generated from John's xml documentation (it involved learning XSL, for one thing).
The categories make it much more browsable. Though, some categories needsome changes. The categories 'jQuery', '_javascript_' and 'Core' seem to
be somewhat redundant.Two 'add' methods, currently filed under 'jQuery', should be moved toDOM/Traversing, just where the third 'add' already is.Both 'jquery' and 'length' are marked as methods instead of attributes,
this is somewhat misleading. There may be more attributes marked asmethods I didn't find.The docs for each(fn) don't mention the iteration index that is passedas a argument.Is the shortcut $(function) for $(document).ready(function) mentioned
anywhere?Because the categories are auto-generated from the code, I actually have no control over where things are categorized.John, have a look at these suggestions, k?
When selecting DOM/Traversing and switching between some othercategories, the load to my CPU (AMD ~3000+) is quite heavy, up to 100%.This could pose a problem for some users. Maybe a more static,serverside pre-rendered version could improve the overall performance.
Oddly, all of the heavy lifting is done when the XML is translated into an HTML page. Once that translation is done, there is no more dynamic rendering. I don't have load problems on my similarly decked out PC.
Can you give more details about the specifics of what you're doing that's causing the problem?
Apart from those small problems, I'd love some kind of filter mechanism:For example, I type 'each' into some textfield, all categories except'Core' and '_javascript_' are removed, both containing only the entries
that match my filter, in this case, 'jQuery.each(obj, fn)' and 'each(fn)'.Would be very useful to find all methods concerning a single event like'click'.Filtering is the next big update after I get everything working in IE. Thankfully, jQuery's _expression_ engine should make such filtering trivial.
Another idea: Filed under DOM/Attributes and CSS are a lot ofgetter/setter pairs. Icons marking setters and getters could be quite
helpful to identify those faster.Hmmm... that's a good idea. It would require additional attributes in the XML, which is John's department. I could hack something together by specifying particular categories, and adding the icons depending on whether the functions have or do not have parameters, but I want the interface to scale if jQuery's API changes (or even if the documentation changes), so I'd rather not do it.
-- Jörn-- YehudaThanks! 
___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
-- Yehuda KatzWeb Developer(ph)  718.877.1325(fax) 718.686.4288
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] comments in text()

2006-08-26 Thread John Resig
> The definition of .text() seems to me to return the contents of
> anything that doesn't have a nodetype of 1, but shouldn't it also
> filter out comment and CDATA nodes? Consider this page:

Contents of CDATA: Yes. Contents of Comments: No. I'm pretty much just
following how the XPath text() function works.

Bug ticket:
http://proj.jquery.com/dev/bugs/bug/140/

--John

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


Re: [jQuery] A Note about IE and form feilds

2006-08-26 Thread Dave Methvin
> Don't have an  unless you want a huge, 
> nearly undetectable headache in IE. Especially when using the
> deserialize plugin, or just plain $("form [EMAIL PROTECTED]'length']") .
> IE just fails, with no warning as to why.

The problem is that the reference is ambiguous. In the DOM model there is a
form.length, which is the same as form.elements.length, representing the
number of elements inside the form. However, you can also access form
elements using the document.formName.elementName notation. When elementName
is 'length', should it return the intrinsic form.length
(form.elements.length) value, or a reference to the form.length DOM input
element? 


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


Re: [jQuery] hasClass()?

2006-08-26 Thread Konstantin Käfer
Just use $('#something').is('.large');

Note that you can specify arbitrary css selectors in the is()
function, among them the dotClass selector. You can even write
$('#something').is('ul.large.wide'); to check if it is an unordered
list with the classes "huge" and "wide".

2006/8/26, Roman <[EMAIL PROTECTED]>:
> I was wondering if there is a way to check if an element has a certain
> class attached to it? For example $('#something').hasClass('large')
> would return true or false.
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


[jQuery] comments in text()

2006-08-26 Thread Patrick Hall
Hello, here's a minor thing:

The definition of .text() seems to me to return the contents of
anything that doesn't have a nodetype of 1, but shouldn't it also
filter out comment and CDATA nodes? Consider this page:

✁


  
 
  $('document').ready(function(){
   alert( $('body').text() );
  });
 


  
  
   
  


✃

Here's what pops up:

✁
 i am a sneaky comment

 
✃

Is this expected?


regards,
-p@

-- 
ᗷɭoℊẚᗰսɳᑯѲ⁈⁈⁈
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] hasClass()?

2006-08-26 Thread Realazy XA Chen
You can use $("#something").attr("class") to get the class name(s), and then compare with your "large" class.But sorry for that, I don't know how to compare them. I also need to know that answer :)
2006/8/26, Roman <[EMAIL PROTECTED]>:
I was wondering if there is a way to check if an element has a certainclass attached to it? For example $('#something').hasClass('large')would return true or false.___
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/-- 
realazy.org
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Fil
> I have another issue with Safari, and (either/or):
> - jquery-1.0.pack.js
> - form.js (taken from svn this morning)
> - my code
> 
> Here are the tests:
> http://www.jquery.info/IMG/html/6_form_1.0.html
> http://www.jquery.info/IMG/html/6_form_1.0_pack.html
> 
> (The red form has the ajax magic.)
> 
> With the non-compressed jquery, it works in Safari; with the packed jquery
> it fails.

A friend tells me that none of these work with his browser (FF 1.07/win xp).

But maybe this is a form.js problem (or did I use a bad form.js file? --
which one is "the latest"?)

-- Fil


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


[jQuery] visual docs for parents ()

2006-08-26 Thread Roman
seem to be incorrect:

Get a set of elements containing the unique ancestors of the matched set 
of elements.
Examples

Before:
HelloHello 
Again

jQuery Code:
$("span").ancestors()

Result:
[ ..., ..., Hello ]

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


[jQuery] hasClass()?

2006-08-26 Thread Roman
I was wondering if there is a way to check if an element has a certain 
class attached to it? For example $('#something').hasClass('large') 
would return true or false.

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Roman
What languages are currently being translated? I can help to translate 
to Russian if that interests anyone.

Realazy XA Chen wrote:
> And I wonder, is our INTERNATIONAL work ready to begin? Which things 
> need to
> translate? I can't wait for it!
> 
> 2006/8/26, John Resig <[EMAIL PROTECTED]>:
>>
>> I'd like to take this opportunity to announce the brand new jQuery
>> 1.0! A lot of work has gone into this release. A lot of bugs fixed, a
>> ton of new features, and a complete overhaul of how the jQuery
>> development process is run.
>>
>> In reality, this release is so large, it's going to take a couple days
>> to release it (this includes a new version of the jQuery web site). So
>> bare with us as we make the transition over to full release. There's
>> some kinks that'll have to be worked out (namely, finalizing the new
>> documentation) but it's all in the pipeline and will be ready within
>> the next couple days.
>>
>> For now, here are some relevant links to get you started:
>> * jQuery 1.0
>> http://jquery.com/src/jquery-1.0.js
>> * jQuery 1.0 - Compressed
>> http://jquery.com/src/jquery-1.0.pack.js
>> * API Documentation
>> http://jquery.com/api/
>> * (Partial) Test Suite
>> http://jquery.com/test/
>>
>> If you want to build your own copies of jQuery, you can check it out
>> of Subversion and build it from the command line. You can get the
>> latest jQuery by doing:
>>   svn co svn://jquery.com/jquery
>>
>> There's so much more to come. I'll be doing a post every day this week
>> detailing some aspect of jQuery 1.0 along with some screencasts
>> demonstrating what you can do with all the new code. Please, if you
>> spot any bugs, file them in the bug tracker:
>> * Bug Tracker:
>> http://proj.jquery.com/dev/bugs/
>> * Submit New Bug:
>> http://proj.jquery.com/dev/bugs/new/
>>
>> I'd like to thank everyone who made this release possible. It's been a
>> lot of work, but the journey is only just beginning. I can't wait to
>> delve into some of the very exciting advances that we have planned.
>> Happy Coding!
>>
>> --John
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
> 
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Fil

Here's something else. It used to work with "latest"
 but fails with 1.0; both on Safari and FF,
this time.

See it at
  http://www.jquery.info/IMG/html/2_dom.html (with latest, you see "coucou")
  http://www.jquery.info/IMG/html/2_dom_1.0.html (with 1.0, no "coucou")

>


  http://jquery.com/src/jquery-1.0.js"; 
type="text/javascript">






Ici, l'introduction




Ici, premier paragraphe de #texte

Ici, deuxième paragraphe de #texte

Ici, troisième paragraphe de #texte

Ici, quatrième paragraphe de #texte



http://www.jquery.info/spip.php?article2";>(article)





-- Fil


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


[jQuery] jQuery docs / Visual jQuery

2006-08-26 Thread Jörn Zaefferer
Hi John and Yehuda and the rest of the list,

John mentioned the preview update to Visual jQuery in the blog. It's 
great to see the new visual jQuery in action.

The categories make it much more browsable. Though, some categories need 
some changes. The categories 'jQuery', 'Javascript' and 'Core' seem to 
be somewhat redundant.
Two 'add' methods, currently filed under 'jQuery', should be moved to 
DOM/Traversing, just where the third 'add' already is.
Both 'jquery' and 'length' are marked as methods instead of attributes, 
this is somewhat misleading. There may be more attributes marked as 
methods I didn't find.
The docs for each(fn) don't mention the iteration index that is passed 
as a argument.
Is the shortcut $(function) for $(document).ready(function) mentioned 
anywhere?

When selecting DOM/Traversing and switching between some other 
categories, the load to my CPU (AMD ~3000+) is quite heavy, up to 100%. 
This could pose a problem for some users. Maybe a more static, 
serverside pre-rendered version could improve the overall performance.

Apart from those small problems, I'd love some kind of filter mechanism:
For example, I type 'each' into some textfield, all categories except 
'Core' and 'Javascript' are removed, both containing only the entries 
that match my filter, in this case, 'jQuery.each(obj, fn)' and 'each(fn)'.
Would be very useful to find all methods concerning a single event like 
'click'.

Another idea: Filed under DOM/Attributes and CSS are a lot of 
getter/setter pairs. Icons marking setters and getters could be quite 
helpful to identify those faster.

-- Jörn

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


[jQuery] A Note about IE and form feilds

2006-08-26 Thread CBWhiz
Don't have an  unless you want a huge, nearly 
undetectable headache in IE. Especially when using the deserialize 
plugin, or just plain $("form [EMAIL PROTECTED]'length']")
.

IE just fails, with no warning as to why.

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Jörn Zaefferer
John Resig wrote:
> I'd like to take this opportunity to announce the brand new jQuery
> 1.0! A lot of work has gone into this release. A lot of bugs fixed, a
> ton of new features, and a complete overhaul of how the jQuery
> development process is run.
>
>   
Woohoo! It's great to see this release at last.

>  * API Documentation
> http://jquery.com/api/
>   
The current animations (when selecting a method) are a little too much. 
In additions, there is this slidebug again *shrugs*.
> There's so much more to come. I'll be doing a post every day this week
> detailing some aspect of jQuery 1.0 along with some screencasts
> demonstrating what you can do with all the new code.
*thumbs up*! There was a time where you wrote a blog entry for every 
small release, describing the new features :-)
> I can't wait to delve into some of the very exciting advances that we have 
> planned.
>   
Could you detail those advances?
> Happy Coding!
>   
Thanks!

-- Jörn

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


Re: [jQuery] Slide down bug

2006-08-26 Thread Jörn Zaefferer
>
> Solution 1) Don't include a width on the outer box.
> Solution 2) Provide a static width for the inner s. Something like:
>dd { width: 250px; }
>   
Thanks John! I updated my example, works fine: 
http://fuzz.bassistance.de/slidebug/starterkit.html

-- Jörn

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


[jQuery] Safari Issues (Re: jQuery 1.0)

2006-08-26 Thread Markus Peter
On 26.08.2006, at 11:41, Fil wrote:

>
> With the non-compressed jquery, it works in Safari; with the packed  
> jquery
> it fails.

Well, jQuery 1.0 actually won't load at all in Safari if it's packed:
ReferenceError - Can't find variable: $

-- 
Markus Peter - SPiN AG   
[EMAIL PROTECTED]
Get Firefox! Smaller, Safer, Faster: http://www.spin.de/ffox




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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Fil
> >  * (Partial) Test Suite
> > http://jquery.com/test/

I have another issue with Safari, and (either/or):
- jquery-1.0.pack.js
- form.js (taken from svn this morning)
- my code

Here are the tests:
http://www.jquery.info/IMG/html/6_form_1.0.html
http://www.jquery.info/IMG/html/6_form_1.0_pack.html

(The red form has the ajax magic.)

With the non-compressed jquery, it works in Safari; with the packed jquery
it fails.

-- Fil


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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Christof Donat
Hi,

> I'd like to take this opportunity to announce the brand new jQuery
> 1.0! A lot of work has gone into this release. A lot of bugs fixed, a
> ton of new features, and a complete overhaul of how the jQuery
> development process is run.

This is great. Before I have found JQuery I have read the documentation of 
many JS-Libraries but have never used one - just maybe took some code if 
possible. jQuery is the first one that 1. is usefull for me, 2. is not 
bloated and 3. really makes my life easier instead of adding more new 
problems than have been solved.

Thanks John for creating a really great API, caring about more than maybe two 
Browsers and in the end doing it.

Christof

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Mark Panay
This is a phenomenal achievement. JQuery really is the friendliest and more to the point, easiest to use JS framework out there. Thanks a lot John and the many others who made this happen.best - Mark.
On 26/08/06, John Resig <[EMAIL PROTECTED]> wrote:
I'd like to take this opportunity to announce the brand new jQuery1.0! A lot of work has gone into this release. A lot of bugs fixed, aton of new features, and a complete overhaul of how the jQuerydevelopment process is run.
In reality, this release is so large, it's going to take a couple daysto release it (this includes a new version of the jQuery web site). Sobare with us as we make the transition over to full release. There's
some kinks that'll have to be worked out (namely, finalizing the newdocumentation) but it's all in the pipeline and will be ready withinthe next couple days.For now, here are some relevant links to get you started:
 * jQuery 1.0http://jquery.com/src/jquery-1.0.js * jQuery 1.0 - Compressedhttp://jquery.com/src/jquery-1.0.pack.js
 * API Documentationhttp://jquery.com/api/ * (Partial) Test Suitehttp://jquery.com/test/If you want to build your own copies of jQuery, you can check it out
of Subversion and build it from the command line. You can get thelatest jQuery by doing:  svn co svn://jquery.com/jqueryThere's so much more to come. I'll be doing a post every day this weekdetailing some aspect of jQuery 
1.0 along with some screencastsdemonstrating what you can do with all the new code. Please, if youspot any bugs, file them in the bug tracker: * Bug Tracker:http://proj.jquery.com/dev/bugs/
 * Submit New Bug:http://proj.jquery.com/dev/bugs/new/I'd like to thank everyone who made this release possible. It's been alot of work, but the journey is only just beginning. I can't wait to
delve into some of the very exciting advances that we have planned.Happy Coding!--John___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Dave Cardwell
John Resig wrote:
> I'd like to take this opportunity to announce the brand new jQuery
> 1.0! A lot of work has gone into this release. A lot of bugs fixed, a
> ton of new features, and a complete overhaul of how the jQuery
> development process is run.

Congratulations, John.  I look forward to seeing what else you've got up 
your sleeve.

>  * (Partial) Test Suite
> http://jquery.com/test/

I've created a test suite of 50 browsers (some duplicate on different 
platforms) which you'll hopefully find of some use.  It looks like most 
of them work ok.  Every so often a Browsercam browser will have already 
crashed due to a previous user, so that may not be jQuery's fault.  Let 
me know if you need any of them verifying and I'll get remote access and 
test them manually.

http://www.browsercam.com/public.aspx?proj_id=279926

Please don't hesitate to ask if you need further testing in the future.


Best wishes,
Dave Cardwell ~ http://davecardwell.co.uk/

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Larry Garfield
Number 9 failed for me in Konqueror 3.5, but it didn't crash. Everything else 
ran fine.

On Saturday 26 August 2006 02:38, Konstantin Käfer wrote:
> Number 9 fails in Safari but I could see number 10 (which succeeded).
> Then it crashed.
>
> 2006/8/26, Stefan Nagtegaal <[EMAIL PROTECTED]>:
> > Op 26-aug-2006, om 9:27 heeft Fil het volgende geschreven:
> > >> I'd like to take this opportunity to announce the brand new jQuery
> > >> 1.0!
> > >
> > > Fantastic! Thanks for mentioning the initial post on your blog too;
> > > it shows
> > > how an idea can become reality :)
> > >
> > >>  * (Partial) Test Suite
> > >> http://jquery.com/test/
> > >
> > > This crashes my Safari, which is a vanilla Mac OS 10.4 version.
> > > It's so fast
> > > I can't tell exactly which test crashes it -- probably number 9 or 10.
> >
> > Number 9 kills Safari 2.0.
> >
> >
> > Steef
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Dave Benjamin
On Sat, 26 Aug 2006, John Resig wrote:

> I'd like to thank everyone who made this release possible. It's been a
> lot of work, but the journey is only just beginning. I can't wait to
> delve into some of the very exciting advances that we have planned.
> Happy Coding!

Thank *you*, John! Congrats on the 1.0 release, and best wishes for many 
more to come. Thanks for making JavaScript fun again.

Dave

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Konstantin Käfer
Number 9 fails in Safari but I could see number 10 (which succeeded).
Then it crashed.

2006/8/26, Stefan Nagtegaal <[EMAIL PROTECTED]>:
>
> Op 26-aug-2006, om 9:27 heeft Fil het volgende geschreven:
>
> >> I'd like to take this opportunity to announce the brand new jQuery
> >> 1.0!
> >
> > Fantastic! Thanks for mentioning the initial post on your blog too;
> > it shows
> > how an idea can become reality :)
> >
> >>  * (Partial) Test Suite
> >> http://jquery.com/test/
> >
> > This crashes my Safari, which is a vanilla Mac OS 10.4 version.
> > It's so fast
> > I can't tell exactly which test crashes it -- probably number 9 or 10.
> Number 9 kills Safari 2.0.
>
>
> Steef
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Stefan Nagtegaal

Op 26-aug-2006, om 9:27 heeft Fil het volgende geschreven:

>> I'd like to take this opportunity to announce the brand new jQuery  
>> 1.0!
>
> Fantastic! Thanks for mentioning the initial post on your blog too;  
> it shows
> how an idea can become reality :)
>
>>  * (Partial) Test Suite
>> http://jquery.com/test/
>
> This crashes my Safari, which is a vanilla Mac OS 10.4 version.  
> It's so fast
> I can't tell exactly which test crashes it -- probably number 9 or 10.
Number 9 kills Safari 2.0.


Steef

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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Fil
> I'd like to take this opportunity to announce the brand new jQuery 1.0!

Fantastic! Thanks for mentioning the initial post on your blog too; it shows
how an idea can become reality :)

>  * (Partial) Test Suite
> http://jquery.com/test/

This crashes my Safari, which is a vanilla Mac OS 10.4 version. It's so fast
I can't tell exactly which test crashes it -- probably number 9 or 10.

-- Fil


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