Re: [jQuery] Getting x- and y-positions of elements

2006-10-04 Thread Paul Bakaus
Hi again,good points there, shurely distance(first, second) is not very jQueryish. Probably better would be $("#first").distance("#second") or something like this :) but it's not too important, I just thought about semantics.
Anyway, check it into the SVN into dimensions.js if you can, otherwise just send me again your current version and I will do it for you (ICQ me at 46950233 or gtalk if you want). See ya,Paul
2006/10/4, Brandon Aaron <[EMAIL PROTECTED]>:
On 10/4/06, Paul Bakaus <[EMAIL PROTECTED]> wrote:> Good work, tell me wether you want to add it to dimensions.js if ready!I think it is ready to be included in 
dimensions.js as it is if no onehas any objections or feature requests. :)--Brandon Aaron___jQuery mailing list
discuss@jquery.comhttp://jquery.com/discuss/-- Paul BakausWeb DeveloperHildastr. 35
79102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Filtering by multiple checkbox selection

2006-10-04 Thread Reynold Ismail








Hi guys, apologies if this topic has come up before but I
couldn’t find a way to search the mailing list archives.

 

What I’m trying to do is filter a bunch of checkboxes (show /
hide them) based on the selections you make on a preceding group of checkboxes.

 

In this case I’m filtering a list of areas based on the state(s)
selected.

 

Here’s the _javascript_

 

$('.top .state [EMAIL PROTECTED]"checkbox"]').click(

function(){

   
$('.top .area label').not('[EMAIL PROTECTED]"'+$(this).id()+'"]').not('.title').toggle();

   
   


   
$('.top .state [EMAIL PROTECTED]"checkbox"]').each(function(){

   
   
if($(this).is(":checked")){

   
$('.top .area label').filter('[EMAIL PROTECTED]"'+$(this).id()+'"]').not('.title').show();

   
 }

   
});    

});

 

I check the id of the area labels to see if they contain the id of the
state that was clicked, then toggle it. This works for single selections but
goes all screwy when multiple states are selected.

 

The each loop is where I tried to check and account for multiple
selections but im not sure of my logic.

 

Thanks in advance!

 

- reyn






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


Re: [jQuery] fadeIn and fieldsets (pixel shifting bug)

2006-10-04 Thread Giuliano Marcangelo
Sam,try setting some padding to your fieldset.I tested with the following :-fieldset {padding:10px;}...and the movement stopsOn 04/10/06, 
Sam Collett <[EMAIL PROTECTED]> wrote:
Update page.There is a way to prevent fields from moving when you mouse over them.Simply set cssText to 'null'. However, not ideal - if you set the CSSmanually with jQuery, plus the text content is shifted instead.
Anyone know of a proper solution?On 04/10/06, Sam Collett <[EMAIL PROTECTED]> wrote:> I have come across a bug with fadeIn, demonstrated on the following page:
> http://www.texotela.co.uk/fadeinbug.php>> Form inputs (radio button, dropdowns, text boxes etc) move by a pixel> whenever I mouse over them. I know it is to do with fadeIn as the
> fieldset below (which is left alone by jQuery) doesn't have this> problem.>> Only happens in Firefox (IE works fine).>___jQuery mailing list
discuss@jquery.comhttp://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Autocomplete Plugin: iframe visible in IE6.

2006-10-04 Thread Dylan Verheul
I've had the same experience writing it.
You can set the width of the iframe to the width of the autocomplete
results, that prevents horizontal scrollbars.

Other than that, I haven't had any problems.

Maybe the recent bgiframe extension might be of help?

Dylan

On 10/4/06, Jason Huck <[EMAIL PROTECTED]> wrote:
>
> When using the Autocomplete plugin found here:
>
> http://www.dyve.net/jquery?autocomplete
>
> I've got one version of IE (6.0.3790.1830) that shows the entire 3000px by
> 3000px iframe on the screen, obscuring everything behind it and causing huge
> scrollbars to appear on the page. It even happens on the demo page itself.
>
> Other browsers (even other versions of IE 6) have a few mild quirks here and
> there, but nothing like this.
>
> Anyone else seeing this? Any ideas for a workaround? I am guessing, looking
> at the CSS, that it has something to do with z-index and/or filter:mask()...
>
> Thanks,
> Jason
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/Autocomplete-Plugin%3A-iframe-visible-in-IE6.-tf2382681.html#a6640691
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] unhover and untoggle

2006-10-04 Thread Blair Mitchelmore
Well, while I might not need untoggle and unhover, I definitely enjoy a 
challenge! I've been thinking about a reliable way to allow multiple 
hover/toggles and to be able to remove them independently... I'll let 
you know if I get anywhere with it...

-blair

Brandon Aaron wrote:
> Nothing?
>
> Am I really the only person that needs unhover and untoggle?
>
> I've logged an enhancement ticket for this: 
> http://jquery.com/dev/bugs/bug/234/
>
> --
> Brandon Aaron
>
> On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>> This does limit the $().hover and $().toggle to once per an element.
>> Multiple uses will overwrite the pervious handler. Any tips on how to
>> manage this along with keeping the un version would be greatly
>> appreciated.
>>
>> --
>> Brandon Aaron
>>
>> On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>>> Well I've gone ahead and done it. I've added an unhover and untoggle method.
>>>
>>> Here is the example/test page:
>>> http://brandonaaron.net/jquery/unevents/unevents.html
>>> Here is the patch: http://brandonaaron.net/jquery/unevents/unevents.diff
>>>
>>> --
>>> Brandon Aaron
>>>
>>> On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
 Is there a reason why there isn't an unhover and an untoggle? I could
 really use unhover in my current project and was thinking about
 building it and just logging it as an enhancement. Just calling
 .unmouseover().unmouseout() is not enough b/c I have other handlers
 for those as well and don't want them wiped out. I just want to
 unhover().

 --
 Brandon Aaron

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


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


Re: [jQuery] Remove elements with a particular first-child from matches?

2006-10-04 Thread Luke Lutman
Hey John,

Thanks for the reply, it's much appreciated.

I played around with using $("span:first-child").parent("div"), but it 
selects the opposite of what I need (divs *with* a span:first-child 
rather than divs *without* a span:first-child).

Is there a way to remove the above from a larger set of matches -- say, 
find all divs, then remove divs with a span:first-child? I've been 
trying filter() and not(), but without any luck.

Thanks,
Luke

John Resig wrote:
> Hi Luke -
> 
> I was able to get what you wanted, working using:
> $("span:first-child").parent("div")
> 
> Right now, in jQuery, doing the XPath /../  is broken (since it's just
> a cheap XPath -> CSS conversion). However, it's recommended that you
> use methods like .parent() instead.
> 
> All that being said, normally you'd just be able to do:
> $("div:not([span:first-child])")
> 
> but that doesn't seem to be working correctly either. Ugh.
> 
> Sorry for the hassle :-/
> 
> --John



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


[jQuery] Interface idrag.js / Opera 9.02 workaround

2006-10-04 Thread Ted McFadden
Hi,I've been using idrag.js  in FF without trouble, but Opera (9.02 / Windows) is havingtrouble. Specifically in Opera, the idrag.js calls to:   jquery('body', document) are failing.replacing these with:
   jquery(document.body) works with both Opera and FF.Not sure this change takes the right approach, but may help some working with Operain the short term.Cheers,Ted

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


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Karl Swedberg

On Oct 4, 2006, at 6:10 PM, Christian Bach wrote:

> Karl Swedberg wrote:
>> I agree, both on the links part  and the groovy part. :)
>>
>> Also, the input column didn't sort as I expected. Looked like maybe
>> it treated the numbers as string? Anyway, when I changed the 7.00
>> cell to 10.00, it was sorted between 1.00 and 5.00.
>
> I updated the demo and added 2 new parser types (Int and Float).
>
> I updated the css, and i'm now wraping a anchor around the header.
>
> Enjoy!
> http://motherrussia.polyester.se/pub/jquery/demos/extraction/

Looks better, Christian. Great work. You might want to get rid of the  
padding-left: 25px from .largeHeaders, and instead do something like  
this:
a.sorter {
  padding-left: 25px;
  color: #006;
  text-decoration: none;
}

That way, the images will appear clickable as well as the text.

Cheers,

Karl

___
Karl Swedberg
www.englishrules.com
www.learningjquery.com


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


[jQuery] Capturing modifier key events

2006-10-04 Thread Rich Manalang
What's the best way to capture modifier key events with Jquery (i.e., <1>)?Rich
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unhover and untoggle

2006-10-04 Thread Blair McKenzie
I had thought about it before, but I haven't actually been in a situation where I needed it. I'd agree that unhover and untoggle should be included, if only for functionaly completeness.
On 10/5/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
Nothing?Am I really the only person that needs unhover and untoggle?I've logged an enhancement ticket for this: http://jquery.com/dev/bugs/bug/234/
--Brandon AaronOn 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:> This does limit the $().hover and $().toggle to once per an element.> Multiple uses will overwrite the pervious handler. Any tips on how to
> manage this along with keeping the un version would be greatly> appreciated.>> --> Brandon Aaron>> On 10/3/06, Brandon Aaron <
[EMAIL PROTECTED]> wrote:> > Well I've gone ahead and done it. I've added an unhover and untoggle method.> >> > Here is the example/test page:> > 
http://brandonaaron.net/jquery/unevents/unevents.html> > Here is the patch: http://brandonaaron.net/jquery/unevents/unevents.diff> >
> > --> > Brandon Aaron> >> > On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:> > > Is there a reason why there isn't an unhover and an untoggle? I could
> > > really use unhover in my current project and was thinking about> > > building it and just logging it as an enhancement. Just calling> > > .unmouseover().unmouseout() is not enough b/c I have other handlers
> > > for those as well and don't want them wiped out. I just want to> > > unhover().> > >> > > --> > > Brandon Aaron> > >> >>
___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/

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


Re: [jQuery] Chainable if/else - hot or not?

2006-10-04 Thread Chris Domigan
Just putting in my vote for John's method. To me it makes sense, and would mean I wouldn't have to keep track of numerous ".end()"sChris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Interface: Sortables onChange not working?

2006-10-04 Thread bbuchs

Is the "onChange" callback functional in Interface's Sortables? If so, does
anyone have any documentation on it (what parameters it accepts)?

I found some older message threads with more or less the same question, and
it looks like it may have been resolved at one point - but no longer.
-- 
View this message in context: 
http://www.nabble.com/Interface%3A-Sortables-onChange-not-working--tf2385481.html#a6649730
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] unhover and untoggle

2006-10-04 Thread Brandon Aaron
Nothing?

Am I really the only person that needs unhover and untoggle?

I've logged an enhancement ticket for this: http://jquery.com/dev/bugs/bug/234/

--
Brandon Aaron

On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> This does limit the $().hover and $().toggle to once per an element.
> Multiple uses will overwrite the pervious handler. Any tips on how to
> manage this along with keeping the un version would be greatly
> appreciated.
>
> --
> Brandon Aaron
>
> On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > Well I've gone ahead and done it. I've added an unhover and untoggle method.
> >
> > Here is the example/test page:
> > http://brandonaaron.net/jquery/unevents/unevents.html
> > Here is the patch: http://brandonaaron.net/jquery/unevents/unevents.diff
> >
> > --
> > Brandon Aaron
> >
> > On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > > Is there a reason why there isn't an unhover and an untoggle? I could
> > > really use unhover in my current project and was thinking about
> > > building it and just logging it as an enhancement. Just calling
> > > .unmouseover().unmouseout() is not enough b/c I have other handlers
> > > for those as well and don't want them wiped out. I just want to
> > > unhover().
> > >
> > > --
> > > Brandon Aaron
> > >
> >
>

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


[jQuery] Interface Sortables - Slow Performance in IE

2006-10-04 Thread bidwellm

I just update an application that uses the Sortables plug-in-in with the
current code.  It works, however the speed is much slower than the previous
version that I was using from 6-8 weeks ago.  The slow part happens
immediately when you click on an item to drag begin dragging it.  Any idea
what changed that is causing the speed problem?  My list is only 40 items
long.

The problem seems to be in idrop.js - highlight : function (elm)

Thanks,

Matt 
-- 
View this message in context: 
http://www.nabble.com/Interface-Sortables---Slow-Performance-in-IE-tf2382900.html#a6641308
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] New JTicker version - multiple tickers on a single page

2006-10-04 Thread Jörn Zaefferer
Klaus Hartl schrieb:
> Jörn Zaefferer schrieb:
>   
>> Jason Levine schrieb:
>> 
>>> I've updated JTicker to 0.5 Beta now.  I added the ability to have multiple 
>>> tickers on a single page.  This was a feature I really wanted to add and 
>>> had to learn a lot of new JavaScript to implement it.  So it was a win-win 
>>> situation for me.  ;-)   I hope you like it too:
>>>
>>> http://www.jasons-toolbox.com/JTicker/
>>>   
>>>   
>> Nice. Something that I see quite often in plugins and is usually solved 
>> different everytime: Customizing animations. In your case, two options 
>> 'transition' and 'speed' are provided. I'd like to see a more generic 
>> approach to this, that can be applied cross-plugin.
>> My first idea is to simply pass a hash through to animate(), eg:
>>
>> $().jticker({
>> animate: {fade: "slow"}
>> }
>>
>> And then using that option with something like this:
>> $().animate(this.settings.animate);
>>
>> Unfortuanetely, it is not as easy as that, but maybe this gives a good 
>> starting point to find a more generic solution.
>> 
>
> I'm providing something similiar with the tabs plugin. If you want to 
> use your own custom animation, you can pass in hashes exactly of the 
> form the animate function expects.
>
> $(...).tabs({
>  fxAnimate: [
>  {height: 'show', opacity: 'show'},
>  {height: 'hide', opacity: 'hide'}
>  ]
> });
>   
So the first array entry is used to display a tab, and the second to 
hide it? Wouldn't it be be better to use it like this:
$().tabs({
animateShow: { height: 'show', opacity: 'show'},
animateHide: { height: 'hide', opacity: 'hide'}
});

This could then be applied to the jTicker, with something like this:
$().jticker({
showTicker: { height: 'show'},
hideTicker: { height: 'hide'}
});

This would enable plugin writes to simply point to the docs for animate, 
instead of documenting their custom animation parser over and over again.
> The problem was that the original object is modified so I have to copy 
> the animate hash everytime and pass a copy to animate...
>   
Could you explain this some more? Why was the original object modified?

-- Jörn

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


Re: [jQuery] Bug?

2006-10-04 Thread Jason Huck

Thanks, Rey. Trimming the output allows it to display correctly. 

Of note: The callback for my new $.get() contains another (different)
$.get(). The inner $.get() doesn't use a callback, but when I first switched
the outer call over from .load(), IE reported this:

Line: 1615
Error: 'constructor' is null or not an object

Line 1615 in jquery.js is this:

if ( data.constructor == Function ) {

...which is inside something called 'extend', so I expect there may be some
sort of inheritance issue at play. To get rid of the error, I added an empty
callback to the inner $.get(), i.e. this:

$.get('/path/to/ajax/stuff/');

...became this:

$.get('/path/to/ajax/stuff/',function(){void(null);});


- jason







Rey Bango-2 wrote:
> 
> Jason,
> 
> I had a similar problem which ended up being a problem with the way that 
> my server-side programming language, ColdFusion, was returning the rows. 
> There was a ton of leading and trailing spaces in the response packet so 
> once I trimmed that, it was able to insert my rows successfully. My code 
> looks very similar to yours.
> 
> I tried using Firebug to show me the response but the best results I got 
> were with IE and ServiceCapture. That showed me how the response packet 
> was malformed. Try out the latter to see if you're experiencing the same 
> issue.
> 
> Rey...
> 
> Jason Huck wrote:
>> I ran into this problem today, trying to replace the contents of a
>> ,
>> but so far John's suggested workaround isn't quite doing the trick.
>> .load()
>> works everywhere except in IE.
>> 
>> Using alternate code as suggested:
>> 
>> $.get('/path/to/ajax/page/', function(thehtml){
>>  $("tbody#foo").empty().append(thehtml); 
>> });
>> 
>> ...the empty() fires, but the append() somehow doesn't insert thehtml
>> correctly. thehtml is pretty basic, looks something like this:
>> 
>> 
>>  blahblahblah
>>  blahblahblah
>>  blahblahblah
>> 
>> 
>>  blahblahblah
>>  blahblahblah
>>  blahblahblah
>> 
>> 
>> What's really strange is, I _can_ get it to show up by doing this:
>> 
>> $.get('/path/to/ajax/page/', function(thehtml){
>>  $("tbody#foo").empty().append('' + thehtml + ''); 
>> });
>> 
>> ...which I initially did just to verify that I was getting a result back.
>> This, though, screws up later code that operates on the newly added
>> nodes,
>> as well as just plain being wrong as far as I can tell.
>> 
>> Any ideas?
>> 
>> Thanks,
>> Jason
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> John Resig wrote:
>> 
>>>
>>>IE really hates dealing with Tables and innerHTML (which is what
>>>.load() uses). An alternative may look something like this (untested):
>>>
>>>$.get('ajaxClassObjects.act?type=5&id=9',function(html){
>>>$("#objects").empty().append( html );
>>>});
>>>
>>>It's worth a shot - let me know if that helps.
>>>
>>>--John
>>>
>>>
>> 
>> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: http://www.nabble.com/Bug--tf2099071.html#a6639578
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Christian Bach
Karl Swedberg wrote:
> I agree, both on the links part  and the groovy part. :)
> 
> Also, the input column didn't sort as I expected. Looked like maybe  
> it treated the numbers as string? Anyway, when I changed the 7.00  
> cell to 10.00, it was sorted between 1.00 and 5.00.

I updated the demo and added 2 new parser types (Int and Float).

I updated the css, and i'm now wraping a anchor around the header.

Enjoy!
http://motherrussia.polyester.se/pub/jquery/demos/extraction/

Best regards
Christian

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


Re: [jQuery] New Plugin: bgiframe

2006-10-04 Thread Brandon Aaron
Cool! It's always great to see how different people come up with
different solutions.

I'm curious why you need to toggle the iframe's display if you are
hiding and showing its parent? Am I missing something? It seems like
it is just an extra call in the chain that is unnecessary. I also
explained how one might easily replicate the functionality of dojo's
BackgroundIframe class in a thread here recently.

I do an insertBefore instead of an append not just for performance but
also for automatic lower z-index. And it makes me feel better about my
markup... in case I append anything else to the parent element I know
that my iframe isn't just thrown into the middle of it all. Most
likely something only myself would like, as I tend to get a little
weird about clean code (XHTML included).

I might suggest adding a class instead of just looking for iframe.
Some people still use iframes for other purposes and this would show
and hide them.

I do need to incorporate your check for IE6 sometime before IE7 comes
out... heh ... when IE7 finally comes out... :)

--
Brandon Aaron

On 10/4/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Brandon Aaron schrieb:
> > I went ahead and added my bgiframe plugin into SVN here:
> > http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js
> >
> > A big thanks goes out to Mark Gibson for pointing me in the right
> > direction with using the expression in the CSS!
> >
>
> Hi,
>
> I made my own version of that plugin:
>
> * you don't have to call show() for the iframe anymore (uses toggle)
> * an iframe is created on demand (I found that if you create several
> iframes at once it slows down IE pretty much)
>
> http://stilbuero.de/jquery/bgiframe/jquery.bgiframe.js
>
> Usage:
>
> $('div').show().bgiframe();
> $('div').hide().bgiframe();
>
>
> -- Klaus
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] JCarousel + ajax + Safari = trouble!

2006-10-04 Thread Ⓙⓐⓚⓔ
Thanks Karl.

The music is setup for quicktime, and totally gratuitous! Once
quicktime is loaded most activeX BS should go away

hmm No picture on -2 or -3, same as Safari I poked into jCarousel
a bit... and didn't see what might be causing this... the carousel
spins as if there were pictures, yet they don't show back to
playing with the puppy!

Jake


On 10/4/06, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> On Oct 3, 2006, at 11:24 PM, Ⓙⓐⓚⓔ wrote:
>
> > no comments? did you even like my puppy? did any versions work in IE?
> > No safari gurus out there? does Jan Sorgalla have any idea?
> >
> >
>
> Hi Jake,
>
> I like your puppy.  :)
>
> Testing in IE 6:
>
> >> http://cigar.dynalias.org/junior/
>
> On page load, I get two alerts telling me to "Click to run an ActiveX
> control on this webpage. The second one (Cruella De Vil) never
> finishes loading. When I press the Stop button, the rest of the page
> loads and the jCarousel works fine, as far as I can tell.
>
> >> http://cigar.dynalias.org/junior/index-2-dyn.html
>
> Same thing with the music. Also, get this error message: "Line 16;
> Error: Object doesn't support this property or method." Keeps popping
> up no matter how many times I say I don't (or do) wish to Debug.
> Doesn't say which file's line 16 either. To make matters worse, I've
> never found IE's built-in JS debugger to be very accurate in
> identifying the correct line number.
>
> >> http://cigar.dynalias.org/junior/index-3-dyn.html
>
> Same error message as index-2-dyn.html, but this time it goes away
> when I say I don't wish to Debug. Also, both songs load.  No pictures
> or any other part of the jCarousel are visible on the page, though.
>
> On all three pages in IE6, the layout is all messed up, with songs
> appearing at the top of the page, covering over the animated gif dogs.
>
> I hope this is at least a little helpful.
>
> It might help to strip the other stuff off the page so it's easier to
> target the problems (even though I don't think the other elements are
> causing the problems).
>
> Cheers,
> Karl
>
>
>
> ___
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
> >
> > On 10/2/06, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
> >> My first jquery page was to celebrate my new puppy, I had a few
> >> pictures, and I read about JCarousel, so it was simple!
> >>
> >>  http://cigar.dynalias.org/junior/
> >>
> >>
> >> then I realized I needed more pictures, and being too lazy to update
> >> the html every time, I decided to parse the index page from my
> >> server,
> >> and let ajax do it's stuff... and since it was built into
> >> jCarousel, I
> >> gave it a try!
> >>
> >> http://cigar.dynalias.org/junior/index-2-dyn.html
> >>
> >> And that worked great in my firefox, but it didn't show the
> >> pictures It scrolled , and did everything, except the pictures.
> >>
> >> So I guessed maybe my simplified callback was to blame:
> >>
> >> function loadItemHandler(carousel, start, last, available){
> >> if (!available)
> >> jQuery.get("Pix", function(data) {
> >> var hrefs = data.match(/(href\s*=\s*")[^"]*
> >> \.(jpe?g|gif|png)(")/gi);
> >> for (i in hrefs) {
> >> var url = "Pix/" + hrefs[i].match
> >> (/"(.*)"/)[1];
> >> var item = carousel.add(i, ' >> href="' + url + '" class="Pix"
> >> target="Pix">http://cigar.dynalias.org/junior/index-3-dyn.html
> >>
> >> jQuery.get("Pix", function(data) {
> >> var hrefs = data.match(/(href\s*=\s*")[^"]*
> >> \.(jpe?g|gif|png)(")/gi);
> >> for (i in hrefs) {
> >> var url = "Pix/" + hrefs[i].match
> >> (/"(.*)"/)[1];
> >> jQuery("#mycarousel").prepend('\r\t
> >> \t\t >> class="Pix" target="Pix"> >> itemVisible: 2,
> >> itemScroll: 1,
> >> wrap: true,
> >> autoScroll:1,
> >> scrollAnimation: "slow"
> >> });
> >> });
> >>
> >>
> >> They all work in firefox, but safari croaks on the 2 ajax versions!
> >>
> >> Any ideas?
>
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jQuery Plugin question

2006-10-04 Thread Yehuda Katz
Is there a way to set a variable in an each that will be stored separately for each instance of the plugin (for example, if I am performing an action on all s, is there a way to store the input type and reuse it later?). Maybe I'm not being clear, so here's the example: 
                $(".slider").each(function() {                    rangeEl = $(this).siblings().filter("
input.range");                    rangeEl.css("border", "1px solid green");
                    rangeMax = parseInt(rangeEl.attr("max")) || 100;
                    rangeMin = parseInt(rangeEl.attr("min")) || 0;                    rangeVal = parseInt(
rangeEl.val()) || 0;                    step = parseInt(rangeEl.attr("step"));
                    difference = rangeMax - rangeMin;                    differential = difference / 
100.0;                    $(this).Slider({
                        accept: ".indicator", fractions: (difference / step),                         onSlide: function(cordx, cordy, x , y) {
                            rangeEl.val(parseInt((cordx * differential) + rangeMin))
                        }                    });
                    $(this).SliderSetValues([[234 * ((rangeVal - rangeMin) / (difference)),0]]);
                    rangeEl.val(rangeVal);                });What seems to be happening is that the rangeEl element is getting overwritten, and all sliders are using the same (last) element.
-- Yehuda KatzWeb Developer | Wycats Designs(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Grazr effect

2006-10-04 Thread Leandro Ardissone
Hi,

Anyone knows how to do the effect in the Grazr app ?
IE: 
http://grazr.com/gzpanel?font=Tahoma,sans-serif&fontsize=8pt&file=http://tagjag.com/all/javascript/opml

The effect that on click loads content that comes from the right and
looks like infinite.

Anyone ?
Thanks

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


Re: [jQuery] Remove elements with a particular first-child from matches?

2006-10-04 Thread John Resig
Hi Luke -

I was able to get what you wanted, working using:
$("span:first-child").parent("div")

Right now, in jQuery, doing the XPath /../  is broken (since it's just
a cheap XPath -> CSS conversion). However, it's recommended that you
use methods like .parent() instead.

All that being said, normally you'd just be able to do:
$("div:not([span:first-child])")

but that doesn't seem to be working correctly either. Ugh.

Sorry for the hassle :-/

--John

On 10/4/06, Luke Lutman <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm having trouble removing a  from a set of matches if the div has a 
> particular
> first-child element.
>
> ##Here's what I've got:
>
> 123
> abcxyz
> defghi
>
> I have a $() object matching all divs (i.e. $('div')), but I only want to 
> process  which
> don't have a span as their first child element. I should only end up 
> processing one div (the
> first one).
>
>
> ##Here's what I've tried:
>
> $('//span/../div')
> XPath with parent axis. Doesn't match anything.
>
> $('div').not('div/span/../div')
> jQuery object filtered with XPath with parent axis. Doesn't match anything
>
> $('div').not(('div > span').parent()[0])
> Only removes abcxyz, leaving two matches.
>
> $('div').each(function(){
> if($('span:first-child', this).size()) return;
> alert(this);
> });
> This works, but it's kinda oogly.
>
>
> ##My question(s):
>
> Am I missing something with the XPath parent axis selectors? Shouldn't they 
> be matching something?
>
> Is there a better way to do this than the last method? I'd rather not iterate 
> over unnecessary
> elements.
>
>
> Thanks,
> Luke Lutman
>
> P.S. This is my first post to the list, so please be gentle ;-)
>
> ___
> 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] JCarousel + ajax + Safari = trouble!

2006-10-04 Thread Karl Swedberg

On Oct 3, 2006, at 11:24 PM, Ⓙⓐⓚⓔ wrote:

> no comments? did you even like my puppy? did any versions work in IE?
> No safari gurus out there? does Jan Sorgalla have any idea?
>
>

Hi Jake,

I like your puppy.  :)

Testing in IE 6:

>> http://cigar.dynalias.org/junior/

On page load, I get two alerts telling me to "Click to run an ActiveX  
control on this webpage. The second one (Cruella De Vil) never  
finishes loading. When I press the Stop button, the rest of the page  
loads and the jCarousel works fine, as far as I can tell.

>> http://cigar.dynalias.org/junior/index-2-dyn.html

Same thing with the music. Also, get this error message: "Line 16;  
Error: Object doesn't support this property or method." Keeps popping  
up no matter how many times I say I don't (or do) wish to Debug.  
Doesn't say which file's line 16 either. To make matters worse, I've  
never found IE's built-in JS debugger to be very accurate in  
identifying the correct line number.

>> http://cigar.dynalias.org/junior/index-3-dyn.html

Same error message as index-2-dyn.html, but this time it goes away  
when I say I don't wish to Debug. Also, both songs load.  No pictures  
or any other part of the jCarousel are visible on the page, though.

On all three pages in IE6, the layout is all messed up, with songs  
appearing at the top of the page, covering over the animated gif dogs.

I hope this is at least a little helpful.

It might help to strip the other stuff off the page so it's easier to  
target the problems (even though I don't think the other elements are  
causing the problems).

Cheers,
Karl



___
Karl Swedberg
www.englishrules.com
www.learningjquery.com

>
> On 10/2/06, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
>> My first jquery page was to celebrate my new puppy, I had a few
>> pictures, and I read about JCarousel, so it was simple!
>>
>>  http://cigar.dynalias.org/junior/
>>
>>
>> then I realized I needed more pictures, and being too lazy to update
>> the html every time, I decided to parse the index page from my  
>> server,
>> and let ajax do it's stuff... and since it was built into  
>> jCarousel, I
>> gave it a try!
>>
>> http://cigar.dynalias.org/junior/index-2-dyn.html
>>
>> And that worked great in my firefox, but it didn't show the
>> pictures It scrolled , and did everything, except the pictures.
>>
>> So I guessed maybe my simplified callback was to blame:
>>
>> function loadItemHandler(carousel, start, last, available){
>> if (!available)
>> jQuery.get("Pix", function(data) {
>> var hrefs = data.match(/(href\s*=\s*")[^"]* 
>> \.(jpe?g|gif|png)(")/gi);
>> for (i in hrefs) {
>> var url = "Pix/" + hrefs[i].match 
>> (/"(.*)"/)[1];
>> var item = carousel.add(i, '> href="' + url + '" class="Pix"
>> target="Pix">http://cigar.dynalias.org/junior/index-3-dyn.html
>>
>> jQuery.get("Pix", function(data) {
>> var hrefs = data.match(/(href\s*=\s*")[^"]* 
>> \.(jpe?g|gif|png)(")/gi);
>> for (i in hrefs) {
>> var url = "Pix/" + hrefs[i].match 
>> (/"(.*)"/)[1];
>> jQuery("#mycarousel").prepend('\r\t 
>> \t\t> class="Pix" target="Pix">> itemVisible: 2,
>> itemScroll: 1,
>> wrap: true,
>> autoScroll:1,
>> scrollAnimation: "slow"
>> });
>> });
>>
>>
>> They all work in firefox, but safari croaks on the 2 ajax versions!
>>
>> Any ideas?


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


Re: [jQuery] Serializing XML

2006-10-04 Thread John Resig
> There is Object.toXML(), can be found here:
> http://jquery.com/dev/svn/jquery/build/js/xml.js Not really something
> special by jQuery, but should do the job.

Well, it is sort of specific to jQuery, because I wrote it ;-) With
that being said, I wouldn't trust that code any more than I could
throw it. It works for us, using the server-side Rhino code, doesn't
generate any errors - but I wouldn't recommend using it in any other
case (at least not yet).

If you're just doing browser-based XML generation, then the
afformentioned XMLSerialize technique should fit nicely. My only
recommendation is to name it .toXML() instead of just .xml().

--John

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


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Christian Bach
>> I must second that! Its very irritating behaviour.
>>
>> Apart from that: Groovy!
> 
> I agree, both on the links part  and the groovy part. :)
> 
> Also, the input column didn't sort as I expected. Looked like maybe  
> it treated the numbers as string? Anyway, when I changed the 7.00  
> cell to 10.00, it was sorted between 1.00 and 5.00.

Yeah, a little mistake on my part, seems like my RegExp is a bit "rocky".

Will sort it out tonight.

Thanks for the spotting!

Best regards
Christian

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


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Christian Bach
Jörn Zaefferer wrote:
> I must second that! Its very irritating behaviour.
> 
> Apart from that: Groovy!
> 
> -- Jörn

Jörn,

While i have it in my head, would you like to help with the new manual for the 
1.1 release?

If you have the time, and would perhaps would think it was fun?

Or perhaps someone else would like to help?

Best regards
Christian

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


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Christian Bach
Thanks,

I agree thats it is annoying, i think the css is involved a bit to.

In the demo i have "cursor: pointer;"  on the whole td cell...

/christian

Olivier Percebois-Garve wrote:
> Its a detail feedback, but you should put your links on the whole upper 
> cell rather than just the columns title.
> I was clicking the icon and was wondering why it was sometimes working, 
> sometimes not.
> 
> Christian Bach wrote:
>> Hi,
>>
>> I put together a small demo of some new improved features in the upcoming 
>> 1.1 release.
>>
>> More info and live demo:
>> http://motherrussia.polyester.se/pub/jquery/demos/extraction/
>>
>>
>> Best regards
>> christian
>>
>> ___
>> 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] jq corner.js

2006-10-04 Thread Dave Methvin

> Hi I am using the jq-corner.js written by Dave Methvin.
> I was wondering how I could add a option for color
> when calling the corner.
>
> $("#content").corner("round tl 10px color");

How would the color be used?


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


[jQuery] Third stab

2006-10-04 Thread Yehuda Katz
It seems I might be able to get this to work if I can get access to the element being slid inside the onSlide function of Interface's slider. It doesn't seem trivial. Any ideas?-- Yehuda KatzWeb Developer | Wycats Designs
(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New JTicker version - multiple tickers on a single page

2006-10-04 Thread Klaus Hartl
>> I'm going to change that. The tabs plugin will be found in the
>> repository soon by the way...
>>   
> Cool.

It's in there now.

I have made the changes we talked about. You can now pass in options for 
show/hide animations independently:

$('#container-8').tabs({
 fxShow: {height: 'show', opacity: 'show'}
});

$('#container-8').tabs({
 fxShow: {height: 'show', opacity: 'show'},
 fxShowSpeed: 'normal',
 fxHide: {opacity: 'hide'},
 fxHideSpeed: 'fast'
});

See also here: http://stilbuero.de/jquery/tabs

The last example there only uses a slidedown for show, that creates some 
cool "rolldown" effect, if you know what I mean...

What about a crossfade effect?

-- Klaus

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


Re: [jQuery] Small jQuery demo

2006-10-04 Thread Andy Matthews
How would we know you if we saw you?



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Jörn Zaefferer
Sent: Wednesday, October 04, 2006 4:04 PM
To: jQuery Discussion.
Subject: [jQuery] Small jQuery demo


Hi folks,

while I hardly get the chance to use jQuery at work (or even update my
blog to use jQuery), I implemented a small script for a page of a
friend. I implemented it to work with only one picture, but in FF it
already works with two of em. You can see it here:
http://www.erdeanthomas.de/ Just wait some seconds, then the pictures on
the right should change. You may even spot myself on some of the
pictures :-)

The interesting code:

var img = $('#images');
var loadThumbs = function() {
$('').hide().appendTo('body').load('/wp-content/themes/3c-black-let
terhead/bilder.php', function() {
  var self = this;
  $(this).find('img').load(function() {
$('a', img).fadeOut('slow', function() {
  img.empty().append($('a', self)).fadeIn('slow');
  $(self).remove();
  setTimeout(loadThumbs, 8000);
  applyHandlers()
});
  });
});
  };

You simply have to love jQuery :-)

-- Jörn

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


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


Re: [jQuery] Bug?

2006-10-04 Thread Jason Huck

Also of note: using $.get() in combination with .empty() and .append()
instead of .load() has the added benefit of fixing reflow issues I've seen
in Opera when replacing table contents. With .load(), the new content flows
in inline in a big jumble, but with $.get(), it retains the correct visual
structure. Probably another quirk with innerHTML.

Perhaps .load() should be updated to use .empty() and .append() as well??

Thanks,
Jason



-- 
View this message in context: http://www.nabble.com/Bug--tf2099071.html#a6639834
Sent from the JQuery mailing list archive at Nabble.com.


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


[jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Christian Bach
Hi,

I put together a small demo of some new improved features in the upcoming 1.1 
release.

More info and live demo:
http://motherrussia.polyester.se/pub/jquery/demos/extraction/


Best regards
christian



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


[jQuery] NEWS: JQuery mentioned in Web Builder magazine, Sept 2006 issue #154

2006-10-04 Thread Rey Bango
Not sure if any of you read Web Builder magazine. Its a UK-based 
magazine published by the same guys that publish .net magazine.

In the September 2006 (#154) magazine, they published are article on 
creating lightboxes and have a VERY lengthy tutorial on ThickBox. They 
go on to provide a link to the ThickBox demo on JQuery demo page and 
provide a great quote about JQuery:

"Thickbox takes advantage of the lightweight, but powerful, JQuery to do 
a lot of the heavy lifting".

This is great exposure for JQuery and I thought everyone would be happy 
to see that JQuery is getting mentioned in trade mags as well.

Congrats to Cody Lindley for the mention of his great ThickBox plugin 
and to John for the continued success of JQuery.

Rey...

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


Re: [jQuery] Chainable if/else - hot or not?

2006-10-04 Thread Jörn Zaefferer
[EMAIL PROTECTED] schrieb:
> As an aside, or perhaps a branch, to this conversation... I'm a jQuery
> newbie, and have found it interesting that callbacks in the system do
> not seem to get parameters. In systems that I've used before that
> provided callbacks, those callbacks typically got a parameter or set of
> parameters that would allow them to affect the data being operated on.
> Is this a philosophical matter (callbacks should not modify the current
> operation?) or is there something I'm missing?
>   
Most callbacks can use 'this' to operate on the data. Some callbacks get 
paramters: An event object is passed to all event handlers, each is 
passed the iteration index. What else would you expect?
If you are interested in custom parameters and can't rely on closures: 
There is already a ticket for this: http://jquery.com/dev/bugs/bug/202/

-- Jörn

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


Re: [jQuery] Getting x- and y-positions of elements

2006-10-04 Thread Brandon Aaron
I did some basic benchmarks and even the deeply nested ones was still
pretty fast. I'm going to look into possibly adding these checks
though.

distance(firstElement, secondElement) doesn't really seem to fit with
typical jQuery methods. Essentially distance would be doing the exact
same thing and would still result in the situation where negative
numbers apply. Getting the offset of an element relative to another
makes sense to me. Even having the negative number makes sense but I'm
prolly just too close to the code.

Is this optional referenceElement confusing? The default for
referenceElement is the body tag if that helps any. If you position
something outside the window then it also has negative offset.

--
Brandon Aaron

On 10/4/06, Paul Bakaus <[EMAIL PROTECTED]> wrote:
> Hi there,
> maybe adding a referenceElement for offset is a bit too confusing - I would
> personally prefer a second method called something like
> distance(firstElement, secondElement) .
> This way you don't have the negative offset problem. For your function, it's
> maybe smart to do a couple of more checks:
>
> 1. element does not have a positioned parent and is not positioned -> do it
> the way like proposed, recursive
> 2. element does not have a positioned parent and is positioned   -> just
> get position values from the element itself (way faster)
> 3. element has a positioned parent and is positioned ->
> do 2 for the element end then do 1 for the parent
> 4. element has a positioned parent and is not positioned->
> do 1 for the element and then 3 for the parent
>
> Good work, tell me wether you want to add it to dimensions.js if ready!
>
> 2006/10/4, Brandon Aaron <[EMAIL PROTECTED]>:
> >
> > Okay so I've modified the offset plugin to take an optional param
> > called referenceElement. If passed in, then it will be used to get the
> > relative offset. Now here is the situation. If the referenceElement is
> > a parent, then the number is positive. If the referenceElement is a
> > child, then the number is negative. That is unless the child is
> > negatively positioned above the parent.
> >
> > My question is: Should the returned offset always be positive or
> > should it be negative if it is a child?
> >
> > --
> > Brandon Aaron
> >
> > On 10/3/06, Brandon Aaron < [EMAIL PROTECTED]> wrote:
> > > On 10/3/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> > > > What about using 'px' as default unit? That way you could write:
> > > > $().top(10).left(10) - and the 'px' is added automatically. In case a
> > > > string is passed you would take that value as is:
> > > > $().top('10%').left('10%').
> > >
> > > That works for me.
> > >
> > > --
> > > Brandon Aaron
> > >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
>
> --
> Paul Bakaus
> Web Developer
> 
> Hildastr. 35
> 79102 Freiburg
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>

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


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Karl Swedberg


On Oct 4, 2006, at 4:56 PM, Jörn Zaefferer wrote:

> Olivier Percebois-Garve schrieb:
>> Its a detail feedback, but you should put your links on the whole  
>> upper
>> cell rather than just the columns title.
>> I was clicking the icon and was wondering why it was sometimes  
>> working,
>> sometimes not.
>>
> I must second that! Its very irritating behaviour.
>
> Apart from that: Groovy!

I agree, both on the links part  and the groovy part. :)

Also, the input column didn't sort as I expected. Looked like maybe  
it treated the numbers as string? Anyway, when I changed the 7.00  
cell to 10.00, it was sorted between 1.00 and 5.00.

Overall, great stuff!

Cheers,
Karl

___
Karl Swedberg
www.englishrules.com
www.learningjquery.com


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


Re: [jQuery] New JTicker version - multiple tickers on a single page

2006-10-04 Thread Andy Matthews
Works great for me in IE6/PC. This is an excellent plugin Jason. Great job.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Jason Levine
Sent: Tuesday, October 03, 2006 2:34 PM
To: jQuery Discussion
Subject: [jQuery] New JTicker version - multiple tickers on a single
page


I've updated JTicker to 0.5 Beta now.  I added the ability to have multiple
tickers on a single page.  This was a feature I really wanted to add and had
to learn a lot of new JavaScript to implement it.  So it was a win-win
situation for me.  ;-)   I hope you like it too:

http://www.jasons-toolbox.com/JTicker/

-Jason Levine
http://www.jasons-toolbox.com/





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


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


Re: [jQuery] New JTicker version - multiple tickers on a single page

2006-10-04 Thread Jörn Zaefferer
Klaus Hartl schrieb:
> I'm going to change that. The tabs plugin will be found in the
> repository soon by the way...
>   
Cool.
>
>   
>> This would enable plugin writes to simply point to the docs for animate, 
>> instead of documenting their custom animation parser over and over again.
>> 
>
> That was already my intention.
>   
Ye, I thought so that you thought so :-) Just wanted to state it, as I 
intend to add this to the plugin authoring guide.
>
>   
>>> The problem was that the original object is modified so I have to copy 
>>> the animate hash everytime and pass a copy to animate...
>>>   
>>>   
>> Could you explain this some more? Why was the original object modified?
>> 
>
> Yes, the object that is passed to animate was altered, all values were
> converted to booleans which causes an error next time the animation was
> executed with this object.
>
> Consider this:
>
> // fails second time...:
> tabToHide.animate(options.fxAnimate[1], options.fxSpeed, ...);
>
> // works fine...:
> var hideAnim = $.extend({}, options.fxAnimate[1]); // copy object
> tabToHide.animate(hideAnim, options.fxSpeed, ...);
>
> It's a workaround, but I couldn't find out yet where and why the object
> is altered.
>   
Seems like a bug to me: http://jquery.com/dev/bugs/bug/237/

-- Jörn

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


Re: [jQuery] NEWS: JQuery being used for Bookmarklets

2006-10-04 Thread dizzledorf

Patrick,

I haven's used JS Shell, but digging around that site led me to their
Bookmarklets page:
http://www.squarefree.com/bookmarklets/

This is a godsend for development and testing!  Many features are already
present in the Web Dev toolbar, other bookmarklets, etc.  But there's still
a few gems here... Thanks for the lead.



Patrick Hall wrote:
> 
> Anyone else use Jesse Ruderman's js shell?
> 
> http://www.squarefree.com/categories/javascript-shell/
> 
> I love that thing, use it every day. Using this 

[jQuery] Small jQuery demo

2006-10-04 Thread Jörn Zaefferer
Hi folks,

while I hardly get the chance to use jQuery at work (or even update my 
blog to use jQuery), I implemented a small script for a page of a 
friend. I implemented it to work with only one picture, but in FF it 
already works with two of em. You can see it here: 
http://www.erdeanthomas.de/ Just wait some seconds, then the pictures on 
the right should change. You may even spot myself on some of the 
pictures :-)

The interesting code:

var img = $('#images');
var loadThumbs = function() {

$('').hide().appendTo('body').load('/wp-content/themes/3c-black-letterhead/bilder.php',
 function() {
  var self = this;
  $(this).find('img').load(function() {
$('a', img).fadeOut('slow', function() {
  img.empty().append($('a', self)).fadeIn('slow');
  $(self).remove();
  setTimeout(loadThumbs, 8000);
  applyHandlers()
});
  });
});
  };

You simply have to love jQuery :-)

-- Jörn

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


Re: [jQuery] jQuery Plugin question

2006-10-04 Thread Brandon Aaron
Also most JavaScript compressors depend on the var being their or you
could get undesired results.

--
Brandon Aaron

On 10/4/06, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Ⓙⓐⓚⓔ schrieb:
> > Javascript doesn't have block scoping, providing only global and
> > function scopes!
> >
> That may be right, but in most cases it is enough to keep your code
> clean to prevent problems resulting from the non-existant block scope.
> On the other hand, creating global variables causes quite a lot of
> trouble...
>
> -- Jörn
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Jörn Zaefferer
Olivier Percebois-Garve schrieb:
> Its a detail feedback, but you should put your links on the whole upper 
> cell rather than just the columns title.
> I was clicking the icon and was wondering why it was sometimes working, 
> sometimes not.
>   
I must second that! Its very irritating behaviour.

Apart from that: Groovy!

-- Jörn

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


Re: [jQuery] Getting x- and y-positions of elements

2006-10-04 Thread Brandon Aaron
On 10/4/06, Paul Bakaus <[EMAIL PROTECTED]> wrote:
> Good work, tell me wether you want to add it to dimensions.js if ready!

I think it is ready to be included in dimensions.js as it is if no one
has any objections or feature requests. :)

--
Brandon Aaron

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


Re: [jQuery] jQuery Plugin question

2006-10-04 Thread Jörn Zaefferer
Ⓙⓐⓚⓔ schrieb:
> Javascript doesn't have block scoping, providing only global and
> function scopes!
>   
That may be right, but in most cases it is enough to keep your code 
clean to prevent problems resulting from the non-existant block scope. 
On the other hand, creating global variables causes quite a lot of 
trouble...

-- Jörn

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


Re: [jQuery] extending functions?

2006-10-04 Thread Rey Bango
Much smoother Franck. It works great in IE7 as well.

Great work!

Rey,..

Franck Marcia wrote:
> 2006/10/4, Rey Bango <[EMAIL PROTECTED]>:
> 
>>In FF, it looks very nice.
>>
>>In IE 7, on the accordian with options, there's a very noticeable color
>>change in the text from dark to light which doesn't happen in FF.
>>
>>Also, the accordian w/ options also has a very distracting flicker to it
>>  when you select a div to expand or contract.
>>
> 
> 
> Thanks, Rey
> 
> Both of them are caused by the onClick option. I tried to demonstrate
> its use. Bad idea as I just did not test it with IE7 :-(
> 
> Now, it just logs every action.
> 
> And I tested it with IE5.5, IE6, IE7RC1, FF1.5.0.7 and Opera 9.02.
> 
> Franck.
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

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


Re: [jQuery] Single Value Attributes

2006-10-04 Thread Brandon Aaron
I think it has already been brought up that this will not work as
expected but ... here it goes again ...

These attributes are used to set the 'default' value and are
thereafter ignored in favor of the JS object's properties. At least
that is how I understand it.

--
Brandon Aaron


On 10/2/06, John Resig <[EMAIL PROTECTED]> wrote:
> Hey everyone -
>
> I stumbled across a point of optimization today, all of the following
> attributes (and probably more - let me know) can only have a single
> value.
>
> checked="checked"
> multiple="multiple"
> disabled="disabled"
> readonly="readonly"
> disabled="disabled"
> selected="selected"
>
> I'd like to add in methods like:
> .checked( true | false )
>
> Which does this in the background (but for each attribute):
>
> $.fn.checked = function(b) {
> if ( b )
> this.attr( "checked", "checked" );
> else
> this.removeAttr( "checked" );
> };
>
> What do you think?
>
> --John
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] fadeIn and fieldsets (pixel shifting bug)

2006-10-04 Thread Sam Collett
Update page.

There is a way to prevent fields from moving when you mouse over them.
Simply set cssText to 'null'. However, not ideal - if you set the CSS
manually with jQuery, plus the text content is shifted instead.

Anyone know of a proper solution?

On 04/10/06, Sam Collett <[EMAIL PROTECTED]> wrote:
> I have come across a bug with fadeIn, demonstrated on the following page:
> http://www.texotela.co.uk/fadeinbug.php
>
> Form inputs (radio button, dropdowns, text boxes etc) move by a pixel
> whenever I mouse over them. I know it is to do with fadeIn as the
> fieldset below (which is left alone by jQuery) doesn't have this
> problem.
>
> Only happens in Firefox (IE works fine).
>

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


Re: [jQuery] Full featured form validation library in jQuery?

2006-10-04 Thread Andy Matthews
Brian...

Good points. I hesitated before sending my "request" because I don't want to
be one of those people that just asks for things without giving back.
Unfortunately I'm just not all that good at Javascript so any contribution I
make in that arena will be nearly worthless.

What I can offer back to the community is testing and proofing. I'm running
IE/PC which seems to be the minority in this crowd. I'm a mature
professional programmer (just use a different language is all) who does have
valuable input on behaviour and user-interaction.

It's all give and take and I try to give what I can, just like the people
creating these excellent plug-ins.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Brian Miller
Sent: Tuesday, October 03, 2006 12:38 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Full featured form validation library in jQuery?


That's a lot of stuff!

Seriously, I think that what is being requested here, more than anything
else, is organization.

Can we start grouping our code into "plugin packs", or something?  One for
forms and friends, one for all kinds of visual effects (perhaps a package
that groups the "best of the best" visual plugins with Interface?), one
for language extensions, and so on.  It might even be a Good Thing to
version them, and pack them to save space.

There are a lot of really great plugins here, but they're not as easily
accessible as they can be.

For everyone else:  All these plugins are done on a largely volunteer
basis.  This is an unfunded, we-do-this-because-we-love-it open source
project.  Generally, our response to "I need ___" is "Great!  I can't wait
to see how it looks after you've written it!"  So, don't expect anything
huge to be done upon request.  But, a lot of useful plugins are already
rolling around here.  So, don't despair.  :)

- Brian


> One thing I'd also like to request is a complete form widgets plugin. At
> the
> moment there are a plethora of form widgets, each of them single plugins.
> That's not very useful for someone that wants something that gets included
> once and called multiple times. Ideally, someone would come out with a
> forms
> plugin that includes basic validation and error display along with form
> widgets.


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


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


Re: [jQuery] Chainable if/else - hot or not?

2006-10-04 Thread sivy
As an aside, or perhaps a branch, to this conversation... I'm a jQuery
newbie, and have found it interesting that callbacks in the system do
not seem to get parameters. In systems that I've used before that
provided callbacks, those callbacks typically got a parameter or set of
parameters that would allow them to affect the data being operated on.
Is this a philosophical matter (callbacks should not modify the current
operation?) or is there something I'm missing?

Thanks!

--Steve
[EMAIL PROTECTED] | irc: monkinetic|redmonk


> I don't know, I've been using .filter( "foo", Function ) and .find(
> "foo", Function ) for a while now and I find them to be immensely
> useful - especially considering that they're non-destructive. IMO,
> having the functions be destructive in the first place was something
> of a mistake, but not really something that can be easily fixed at
> this point. At least having this callback can provide some sanity for
> those who want it ;-)
> 
> --John


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


Re: [jQuery] extending functions?

2006-10-04 Thread Franck Marcia
2006/10/4, Rey Bango <[EMAIL PROTECTED]>:
> In FF, it looks very nice.
>
> In IE 7, on the accordian with options, there's a very noticeable color
> change in the text from dark to light which doesn't happen in FF.
>
> Also, the accordian w/ options also has a very distracting flicker to it
>   when you select a div to expand or contract.
>

Thanks, Rey

Both of them are caused by the onClick option. I tried to demonstrate
its use. Bad idea as I just did not test it with IE7 :-(

Now, it just logs every action.

And I tested it with IE5.5, IE6, IE7RC1, FF1.5.0.7 and Opera 9.02.

Franck.

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


[jQuery] jQuery stylesheets

2006-10-04 Thread Mark Gibson
Recently I've been playing with loading of HTML into pages dynamically,
which lead to my script evaluation plugin, that I posted yesterday.

Now I've hit another problem:

I'd like to apply a common set of operations (ie. applying plugins)
to all elements on a page, whether they were there from the start,
or loaded dynamically.

The first part is easily handled by $(document).ready(), but loaded
content can only be processed by supplying a callback every time.

The solution I've considered is to register callback functions that
act like stylesheets, and are applied to dynamic content.

eg:

 $.stylesheet(function() {
 $('input').each(function() {
 $(this).addClass(this.type);
 });
 });

This stylesheet adds the input type to the class name, so we can style
different input types individually (in browser that don't fully
implement CSS selectors, you know who you are! ;)

$.stylesheet is the registration function.

Within the 'load' function, or other places where content is added,
we call:

self.applyStylesheets();


Here is the implementation of these functions:

$.stylesheet = function(callback) {
if ($.stylesheet.list === undefined)
$.stylesheet.list = new Array();

if (typeof callback == 'function')
$.stylesheet.list.push(callback);
};

$.fn.applyStylesheets = function() {
if (typeof $.stylesheet.list == 'object') {
var self = this;
$.each($.stylesheet.list, function() {
if (typeof this == 'function') {
this.call(self);
}
});
}
return this;
};


What do you think?

Cheers
- Mark Gibson

(I've resent this email, as it didn't seem to get through first time,
sorry if you get it twice!)


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


Re: [jQuery] New JTicker version - multiple tickers on a single page

2006-10-04 Thread Klaus Hartl
 >> providing something similiar with the tabs plugin. If you want to
>> use your own custom animation, you can pass in hashes exactly of the 
>> form the animate function expects.
>>
>> $(...).tabs({
>>  fxAnimate: [
>>  {height: 'show', opacity: 'show'},
>>  {height: 'hide', opacity: 'hide'}
>>  ]
>> });
>>   
> So the first array entry is used to display a tab, and the second to 
> hide it? Wouldn't it be be better to use it like this:
> $().tabs({
> animateShow: { height: 'show', opacity: 'show'},
> animateHide: { height: 'hide', opacity: 'hide'}
> });

Yes, the first entry is to show, the second is to hide a tab. At first I
thought it's not a good idea too decouple these options, because I
thought if you provide a custom animation you must provide both.

But after thinking about it, your way it's even more flexible. If you 
provide only an option for animateShow (I'm going to call it fxShow), no
animation will be used for hiding and vice versa. And it's much more 
readable too.

I'm going to change that. The tabs plugin will be found in the
repository soon by the way...


> This would enable plugin writes to simply point to the docs for animate, 
> instead of documenting their custom animation parser over and over again.

That was already my intention.


>> The problem was that the original object is modified so I have to copy 
>> the animate hash everytime and pass a copy to animate...
>>   
> Could you explain this some more? Why was the original object modified?

Yes, the object that is passed to animate was altered, all values were
converted to booleans which causes an error next time the animation was
executed with this object.

Consider this:

// fails second time...:
tabToHide.animate(options.fxAnimate[1], options.fxSpeed, ...);

// works fine...:
var hideAnim = $.extend({}, options.fxAnimate[1]); // copy object
tabToHide.animate(hideAnim, options.fxSpeed, ...);

It's a workaround, but I couldn't find out yet where and why the object 
is altered.


-- Klaus



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


[jQuery] fadeIn/fadeOut in Firefox?

2006-10-04 Thread XriS

Hello everybody,

I have a problem with fadeIn/fadeOut in Firefox 1.5/2.0.

I tried to program a simple drop-down menu with jQuery und use the fadeIn
animation to show the sub-menu. The sub-menu is not completely faded in,
though. A small part is faded and the rest unfolds as in the Interface
Unfold Effect.

Yet, it does work on the same page on a simple p...

Does somebody know this behaviour and can help?

Here my test-page:

[code]


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





$(function () {

$("#menu li").hover(
function () { 
$(this).addClass("sfClass");
$("ul", this).fadeIn("fast"); },
function () { 
$(this).removeClass("sfClass"); }
);

$("p").fadeIn("slow");

});




#menu ul { padding: 0; margin: 0; }
#menu li { position: relative; display: block; float: left;
background-color: #e1e1e1; }
#menu ul ul { position: absolute; top: -999em; margin: -10px; padding: 12px;
}
#menu li.sfClass ul { top: auto; }
#menu ul ul li { float: none; white-space: nowrap; }








Test 1

Test 1.1
Test 1.2
   

Test 2
Test 3

Test 3.1
Test 3.2
   




Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed lacus
ligula, egestas id, vehicula non, luctus et, urna. Ut congue viverra eros.
Praesent in nunc. Integer ac est congue turpis porttitor tristique. Nunc sit
amet enim. Integer sed tellus. Nunc magna lorem, laoreet ultricies,
ullamcorper sed, pharetra aliquet, massa. Suspendisse mollis augue. Lorem
ipsum dolor sit amet, consectetuer adipiscing elit. Fusce ut dui. Ut nec
arcu vitae lorem ultricies condimentum. Ut vel orci nec quam porta feugiat.
Sed fringilla ligula eget dolor. Phasellus ullamcorper ultricies leo. Mauris
urna. Maecenas augue libero, molestie quis, facilisis ut, volutpat a,
nisl.




[/code]

Thank you very much!

XriS
-- 
View this message in context: 
http://www.nabble.com/fadeIn-fadeOut-in-Firefox--tf2382298.html#a6639437
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] jQuery Plugin question

2006-10-04 Thread Ⓙⓐⓚⓔ
While I agree that var is often missing and global vars are often not
a good idea...

In JS vars are not scoped in a for or if so var inside the for (or
if) does little more than a var before it. This is the reason that we
have to resort to the confusing looking

function(){var x = 1...}();

when the code says:

var i = 22;
for (var i = 0; i < 5; ++i){};
alert(i);
JS shows 5, any other normal language would show 22!

Javascript doesn't have block scoping, providing only global and
function scopes!

On 10/4/06, Dave Methvin <[EMAIL PROTECTED]> wrote:
>
> > Is there a way to set a variable in an each that will be stored
> > separately for each instance of the plugin (for example, if I am
> > performing an action on all s, is there a way to store the
> > input type and reuse it later?). Maybe I'm not being clear, so
> > here's the example:
> >
> > $(".slider").each(function() {
> > rangeEl = $(this).siblings().filter("input.range");
>
> You haven't put the keyword "var" in front of rangeEl (and the others), so
> that creates a global variable; as you noted it's clobbered each time
> through the function. If you say "var rangeEl" it will be a local variable
> and you'll get a different one each time the function is called, creating a
> closure that your $(this).Slider() plugin can use.
>
> My experience is that 99 out of 100 times you want to say "var" anywhere you
> first start using the variable. Say it early and say it often--Javascript
> doesn't mind if you say it more than once in the same function. That
> especially applies to for-loop variables.  Every for loop should start with
> "for ( var" or it's most likely broken in a very dangerous way.
>
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒
░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░
▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒
░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░
▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery Plugin question

2006-10-04 Thread Dave Methvin
 
> Is there a way to set a variable in an each that will be stored 
> separately for each instance of the plugin (for example, if I am 
> performing an action on all s, is there a way to store the 
> input type and reuse it later?). Maybe I'm not being clear, so
> here's the example:
>
> $(".slider").each(function() {
> rangeEl = $(this).siblings().filter("input.range");

You haven't put the keyword "var" in front of rangeEl (and the others), so
that creates a global variable; as you noted it's clobbered each time
through the function. If you say "var rangeEl" it will be a local variable
and you'll get a different one each time the function is called, creating a
closure that your $(this).Slider() plugin can use.

My experience is that 99 out of 100 times you want to say "var" anywhere you
first start using the variable. Say it early and say it often--Javascript
doesn't mind if you say it more than once in the same function. That
especially applies to for-loop variables.  Every for loop should start with
"for ( var" or it's most likely broken in a very dangerous way.



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


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Olivier Percebois-Garve
Its a detail feedback, but you should put your links on the whole upper 
cell rather than just the columns title.
I was clicking the icon and was wondering why it was sometimes working, 
sometimes not.

Christian Bach wrote:
> Hi,
>
> I put together a small demo of some new improved features in the upcoming 1.1 
> release.
>
> More info and live demo:
> http://motherrussia.polyester.se/pub/jquery/demos/extraction/
>
>
> Best regards
> christian
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>   


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


Re: [jQuery] New JTicker version - multiple tickers on a single page

2006-10-04 Thread Klaus Hartl
>> providing something similiar with the tabs plugin. If you want to
>> use your own custom animation, you can pass in hashes exactly of the 
>> form the animate function expects.
>>
>> $(...).tabs({
>>  fxAnimate: [
>>  {height: 'show', opacity: 'show'},
>>  {height: 'hide', opacity: 'hide'}
>>  ]
>> });
>>   
> So the first array entry is used to display a tab, and the second to 
> hide it? Wouldn't it be be better to use it like this:
> $().tabs({
> animateShow: { height: 'show', opacity: 'show'},
> animateHide: { height: 'hide', opacity: 'hide'}
> });

Yes, the first entry is to show, the second is to hide a tab. At first I
thought it's not a good idea too decouple these options, because I
thought if you provide a custom animation you must provide both.

But after thinking about it, your way it's even more flexible. If you
provide only an option for animateShow (I'm going to call it fxShow), no
animation will be used for hiding and vice versa. And it's much more
readable too.

I'm going to change that. The tabs plugin will be found in the
repository soon by the way...


> This would enable plugin writes to simply point to the docs for animate, 
> instead of documenting their custom animation parser over and over again.

That was already my intention.


>> The problem was that the original object is modified so I have to copy 
>> the animate hash everytime and pass a copy to animate...
>>   
> Could you explain this some more? Why was the original object modified?

Yes, the object that is passed to animate was altered, all values were
converted to booleans which causes an error next time the animation was
executed with this object.

Consider this:

// fails second time...:
tabToHide.animate(options.fxAnimate[1], options.fxSpeed, ...);

// works fine...:
var hideAnim = $.extend({}, options.fxAnimate[1]); // copy object
tabToHide.animate(hideAnim, options.fxSpeed, ...);

It's a workaround, but I couldn't find out yet where and why the object
is altered.


-- Klaus




-- 
___
Dipl.-Ing. Klaus Hartl
Email [EMAIL PROTECTED]
Sredzkistraße 20, 10435 Berlin

Phone +49 (0)30 4985 3209
Mobile +49 (0)176 2125 5168
Web http://www.stilbuero.de

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


Re: [jQuery] question on how not() works

2006-10-04 Thread John Resig
> I tried to assign an id 'checkbox' to the checkbox in the example.
> Using not('[EMAIL PROTECTED]') result in js error in firefox:
>
> 'z has no properties' points to line 710 of jQuery.js (Rev: 249)

Also, just using = should be sufficient. If you're trying to match a
set of checkboxs, you should go against the @type attribute, or its
classname, instead.

--John

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


Re: [jQuery] jQuery Plugin question

2006-10-04 Thread Brian Miller
Create an empty object, pass it to the .each() block, and add each id as a
property of it as you go.

My first crack (which is probably hopelessly b0rked, but may get the point
across...):

var myInputs = {};
function sliderCallback { myInputs[this.id].rangeEl =
$(this).siblings().filter("input.range"); ...;  };
$(".slider").each( sliderCallback( myInputs ) );

I hope I'm on the right track...?

- Brian


> Is there a way to set a variable in an each that will be stored separately
> for each instance of the plugin (for example, if I am performing an action
> on all s, is there a way to store the input type and reuse it
> later?). Maybe I'm not being clear, so here's the example:
>
> $(".slider").each(function() {
> rangeEl = $(this).siblings().filter("input.range");
> rangeEl.css("border", "1px solid green");
> rangeMax = parseInt(rangeEl.attr("max")) || 100;
> rangeMin = parseInt(rangeEl.attr("min")) || 0;
> rangeVal = parseInt(rangeEl.val()) || 0;
> step = parseInt(rangeEl.attr("step"));
> difference = rangeMax - rangeMin;
> differential = difference / 100.0;
> $(this).Slider({
> accept: ".indicator", fractions: (difference /
> step),
> onSlide: function(cordx, cordy, x , y) {
> rangeEl.val(parseInt((cordx * differential) +
> rangeMin))
> }
> });
> $(this).SliderSetValues([[234 * ((rangeVal - rangeMin)
> /
> (difference)),0]]);
> rangeEl.val(rangeVal);
> });
>
>
> What seems to be happening is that the rangeEl element is getting
> overwritten, and all sliders are using the same (last) element.



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


Re: [jQuery] Chainable if/else - hot or not?

2006-10-04 Thread Dave Methvin
> As an aside, or perhaps a branch, to this conversation...
> I'm a jQuery newbie, and have found it interesting that
> callbacks in the system do not seem to get parameters.
> In systems that I've used before that provided callbacks,
> those callbacks typically got a parameter or set of
> parameters that would allow them to affect the data
> being operated on.

You can pass as much data as you need using a closure, so there's no need to
have a parameter passed in:

var mydata = 0;
$("p").each(function(){
  if ( ++mydata > 4 ) this.style.fontWeight = "bold";
});

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, October 04, 2006 11:59 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Chainable if/else - hot or not?

As an aside, or perhaps a branch, to this conversation... I'm a jQuery
newbie, and have found it interesting that callbacks in the system do not
seem to get parameters. In systems that I've used before that provided
callbacks, those callbacks typically got a parameter or set of parameters
that would allow them to affect the data being operated on.
Is this a philosophical matter (callbacks should not modify the current
operation?) or is there something I'm missing?

Thanks!

--Steve
[EMAIL PROTECTED] | irc: monkinetic|redmonk


> I don't know, I've been using .filter( "foo", Function ) and .find( 
> "foo", Function ) for a while now and I find them to be immensely 
> useful - especially considering that they're non-destructive. IMO, 
> having the functions be destructive in the first place was something 
> of a mistake, but not really something that can be easily fixed at 
> this point. At least having this callback can provide some sanity for 
> those who want it ;-)
> 
> --John


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


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


Re: [jQuery] Autocomplete Plugin: iframe visible in IE6.

2006-10-04 Thread Karl Swedberg


On Oct 4, 2006, at 10:33 AM, Jason Huck wrote:

>
> When using the Autocomplete plugin found here:
>
> http://www.dyve.net/jquery?autocomplete
>
> I've got one version of IE (6.0.3790.1830) that shows the entire  
> 3000px by
> 3000px iframe on the screen, obscuring everything behind it and  
> causing huge
> scrollbars to appear on the page. It even happens on the demo page  
> itself.
>
> Other browsers (even other versions of IE 6) have a few mild quirks  
> here and
> there, but nothing like this.
>
> Anyone else seeing this? Any ideas for a workaround? I am guessing,  
> looking
> at the CSS, that it has something to do with z-index and/or  
> filter:mask()...
>
> Thanks,
> Jason

Hi Jason,

I'm getting the huge scrollbars, too, but the iframe isn't visible.  
(6.0.2900.2180)

That's why I've been using the height and width of the element that's  
supposed to cover the select box for the height and width of the  
iframe as well.

You might want to use one of the bgiframe plugins available:
http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js
or
http://stilbuero.de/jquery/bgiframe/jquery.bgiframe.js

Cheers,
Karl
___
Karl Swedberg
www.englishrules.com
www.learningjquery.com


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


Re: [jQuery] New Plugin: bgiframe

2006-10-04 Thread Klaus Hartl


Brandon Aaron schrieb:
> Cool! It's always great to see how different people come up with
> different solutions.
> 
> I'm curious why you need to toggle the iframe's display if you are
> hiding and showing its parent? Am I missing something? It seems like
> it is just an extra call in the chain that is unnecessary.

Hey Brandon, that I ask myself now too... oh man... :-)


-- Klaus

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


[jQuery] position: fixed with

2006-10-04 Thread Vaska
Bonjour:

Has anybody successfully used 'position: fixed;' with Interface FX?

http://interface.eyecon.ro/demos/ifxslide.html

In particular, the 'slide toggle down' function.

I'm using...

html>body #footer {
 position:fixed;
 bottom:0;
 z-index:10;
}

// jquery layer
html>body #toggled {
 position: fixed;
 bottom: 0;
 z-index: 9;
 background: #fff20d;
 width: 100%;
 height: 200px;
}

The #footer works as it should. #toggled loads fine as well. But when  
the function is enacted it ends up operating from the upper left.

Any ideas on this?

Thanks...

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


Re: [jQuery] question on how not() works

2006-10-04 Thread Brian Miller
That's fixed in the current SVN version.  The problem is that you have
elements that don't have an ID.  The recent fix prevents the ^= operator
from choking in that case.

- Brian


> I tried to assign an id 'checkbox' to the checkbox in the example.
> Using not('[EMAIL PROTECTED]') result in js error in firefox:
>
> 'z has no properties' points to line 710 of jQuery.js (Rev: 249)



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


Re: [jQuery] hover, Firefox, uncaught exception

2006-10-04 Thread Choan C. Gálvez
On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> Okay ... So instead of this:
> while ( p && p != this ) try { p = p.parentNode } catch(e) { p = null; };
>
> I should have set p = this like this:
> while ( p && p != this ) try { p = p.parentNode } catch(e) { p = this; };
>
> You can see it working here:
> http://brandonaaron.net/jquery/hoverbug/hover.patched.html
>
> I'll update the ticket now.

Thanks, Brandon. I hope this goes soon into SVN (meanwhile I've
modified my copy).

-- 
Choan C. Gálvez, desarrollo web


> On 10/3/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > Sure enough... looking into a better fix now.
> >
> > --
> > Brandon Aaron
> >
> > On 10/3/06, Choan C. Gálvez <[EMAIL PROTECTED]> wrote:
> > > Hi all.
> > >
> > > There has been some recent posts on this mailing list about a bug in
> > > Firefox related to jQuery`s `hover` functionality. (Subjects "Uncaught
> > > exception (Autocomplete / jQuery 1.0.1)", "bug: hover over table cells
> > > containing form elements" and "Input text hover error".)
> > >
> > > Theoretically, this bug was resolved in Rev 375. Unfortunately, the
> > > solution doesn't work quite well :(
> > >
> > > Let me describe the situation:
> > >
> > > HTML:
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > CSS:
> > >
> > > #test {
> > > background: black;
> > > padding: 20px; /* make it obvious */
> > > }
> > >
> > > #test.over {
> > > background: #ccc;
> > > }
> > >
> > > JS:
> > >
> > > $(function() {
> > > $("#test").hover(
> > > function() { $(this).addClass("over"); },
> > > function() { $(this).removeClass("over"); },
> > > );
> > > });
> > >
> > > Trouble is, in svn versions previous to Rev 375, Mozilla based
> > > browsers raise an exception while abandoning the `input` (this is a
> > > Mozilla bug [1]). I can live with that as it doesn't break my code.
> > >
> > > Since Rev 375, there is a new code to handle exceptions (in events.js):
> > >
> > > while ( p && p != this ) try { p = p.parentNode } catch(e) { p = 
> > > null; };
> > >
> > > Well, now the exception is catched. Good. But the `mouseover` function
> > > is called when the mouse hovers the input. This _breaks_ my code.
> > >
> > > So, could we have a better workaround? I've tried with no success :(
> > >
> > > [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=208427
> > > --
> > > Choan
> > > 
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] New tableSorter demo, custom text extraction and more.

2006-10-04 Thread Christian Bach
Hi,

I put together a small demo of some new improved features in the upcoming 1.1 
release.

More info and live demo:
http://motherrussia.polyester.se/pub/jquery/demos/extraction/


Best regards
christian

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


[jQuery] Remove elements with a particular first-child from matches?

2006-10-04 Thread Luke Lutman
Hi all,

I'm having trouble removing a  from a set of matches if the div has a 
particular 
first-child element.

##Here's what I've got:

123
abcxyz
defghi

I have a $() object matching all divs (i.e. $('div')), but I only want to 
process  which 
don't have a span as their first child element. I should only end up processing 
one div (the 
first one).


##Here's what I've tried:

$('//span/../div')
XPath with parent axis. Doesn't match anything.

$('div').not('div/span/../div')
jQuery object filtered with XPath with parent axis. Doesn't match anything

$('div').not(('div > span').parent()[0])
Only removes abcxyz, leaving two matches.

$('div').each(function(){
if($('span:first-child', this).size()) return;
alert(this);
});
This works, but it's kinda oogly.


##My question(s):

Am I missing something with the XPath parent axis selectors? Shouldn't they be 
matching something?

Is there a better way to do this than the last method? I'd rather not iterate 
over unnecessary 
elements.


Thanks,
Luke Lutman

P.S. This is my first post to the list, so please be gentle ;-)

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


Re: [jQuery] extending functions?

2006-10-04 Thread Rey Bango
In FF, it looks very nice.

In IE 7, on the accordian with options, there's a very noticeable color 
change in the text from dark to light which doesn't happen in FF.

Also, the accordian w/ options also has a very distracting flicker to it 
  when you select a div to expand or contract.

Other than that, it looks good!

Rey...

Franck Marcia wrote:
> OK
> 
> I modified Accordion to be more flexible:
> http://fmarcia.info/jquery/accordion.html.
> 
> You can now set an action when an item is clicked, shown or hidden and
> you can choose the animation speed.
> 
> Any comment appreciated.
> 
> Cheers,
> 
> Franck.
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

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


Re: [jQuery] New JTicker version - multiple tickers on a single page

2006-10-04 Thread Rey Bango
Working good in FF & IE 7.

Rey

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Jason Levine
> Sent: Tuesday, October 03, 2006 2:34 PM
> To: jQuery Discussion
> Subject: [jQuery] New JTicker version - multiple tickers on a single
> page
> 
> 
> I've updated JTicker to 0.5 Beta now.  I added the ability to have multiple
> tickers on a single page.  This was a feature I really wanted to add and had
> to learn a lot of new JavaScript to implement it.  So it was a win-win
> situation for me.  ;-)   I hope you like it too:
> 
> http://www.jasons-toolbox.com/JTicker/
> 
> -Jason Levine
> http://www.jasons-toolbox.com/
> 
> 
> 
> 
> 
> ___
> 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/


[jQuery] fadeIn and fieldsets (pixel shifting bug)

2006-10-04 Thread Sam Collett
I have come across a bug with fadeIn, demonstrated on the following page:
http://www.texotela.co.uk/fadeinbug.php

Form inputs (radio button, dropdowns, text boxes etc) move by a pixel
whenever I mouse over them. I know it is to do with fadeIn as the
fieldset below (which is left alone by jQuery) doesn't have this
problem.

Only happens in Firefox (IE works fine).

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


[jQuery] Autocomplete Plugin: iframe visible in IE6.

2006-10-04 Thread Jason Huck

When using the Autocomplete plugin found here:

http://www.dyve.net/jquery?autocomplete

I've got one version of IE (6.0.3790.1830) that shows the entire 3000px by
3000px iframe on the screen, obscuring everything behind it and causing huge
scrollbars to appear on the page. It even happens on the demo page itself.

Other browsers (even other versions of IE 6) have a few mild quirks here and
there, but nothing like this.

Anyone else seeing this? Any ideas for a workaround? I am guessing, looking
at the CSS, that it has something to do with z-index and/or filter:mask()...

Thanks,
Jason



-- 
View this message in context: 
http://www.nabble.com/Autocomplete-Plugin%3A-iframe-visible-in-IE6.-tf2382681.html#a6640691
Sent from the JQuery mailing list archive at Nabble.com.


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


[jQuery] Object cloning

2006-10-04 Thread Yehuda Katz
Is there a way to clone an object so that I can hold onto the data but still rename the original variable (without assigning it to a new variable... I need to do this an arbitrary amount of times, so doing it anonymously would be best).
-- Yehuda KatzWeb Developer | Wycats Designs(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JCarousel + ajax + Safari = trouble!

2006-10-04 Thread Francisco Brito
I didn't like your puppy.ok, just kidding.  On 10/3/06, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
no comments? did you even like my puppy? did any versions work in IE?No safari gurus out there? does Jan Sorgalla have any idea?
On 10/2/06, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:> My first jquery page was to celebrate my new puppy, I had a few> pictures, and I read about JCarousel, so it was simple!
>>  http://cigar.dynalias.org/junior/>>> then I realized I needed more pictures, and being too lazy to update> the html every time, I decided to parse the index page from my server,
> and let ajax do it's stuff... and since it was built into jCarousel, I> gave it a try!>> http://cigar.dynalias.org/junior/index-2-dyn.html
>> And that worked great in my firefox, but it didn't show the> pictures It scrolled , and did everything, except the pictures.>> So I guessed maybe my simplified callback was to blame:
>> function loadItemHandler(carousel, start, last, available){> if (!available)> jQuery.get("Pix", function(data) {> var hrefs = 
data.match(/(href\s*=\s*")[^"]*\.(jpe?g|gif|png)(")/gi);> for (i in hrefs) {> var url = "" + hrefs[i].match(/"(.*)"/)[1];
> var item = carousel.add(i, '> target="Pix">');> }
>> });> carousel.loaded();> };> hmm, so I tried doing the ajax outside of  jCarousel...>> 
http://cigar.dynalias.org/junior/index-3-dyn.html>> jQuery.get("Pix", function(data) {> var hrefs = data.match(/(href\s*=\s*")[^"]*\.(jpe?g|gif|png)(")/gi);
> for (i in hrefs) {> var url = "" + hrefs[i].match(/"(.*)"/)[1];> jQuery("#mycarousel").prepend('\r\t\t\t> class="Pix" target="Pix">');> }> jQuery("#mycarousel").jcarousel({
> itemVisible: 2,> itemScroll: 1,> wrap: true,> autoScroll:1,
> scrollAnimation: "slow"> });> });>>> They all work in firefox, but safari croaks on the 2 ajax versions!
>> Any ideas? --> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ> ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒> ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░> ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒> ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░
> ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒>--Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒
___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
-- Francisco Britoon software:http://nullisnull.blogspot.comon everything else:   http://brito.mindsay.com
photography:   http://www.flickr.com/photos/darkgoyle
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] extending functions?

2006-10-04 Thread sivy
Hi Franck (et al),

You know, I had a whole post written as to how I needed to be able to
extend the accordion object somehow, but in the process realized that
it would be easier to explain what it is I'm trying to do. I've been
asked to create a wizard version of the accordion, such that:

1) each section contains some group of form elements, and a next button.
The form must validate before the next button can be clicked (and
indeed, the next button is not even active until the form validates).
Following sections are un-clickable at this point.

2) The next button opens the next section of the accordion. The previous
section remains clickable.

3) As each section is completed, they become clickable (you can go back
but not forward).

4) There is a main set of ok/cancel buttons at the bottom, of which the
ok button can only be clicked after the whole form validates.

Clear as mud? I'd be open to any ideas on implementation. I did actually
get 90% of this done in moo.fx, but could net get the accordion to even
work right in IE, so that kind of made the rest of my work moot. (no
pun intended.)

Cheers,

--Steve 

>  Original Message 
> Subject: Re: [jQuery] extending functions?
> From: "Franck Marcia" <[EMAIL PROTECTED]>
> Date: Tue, October 03, 2006 11:34 pm
> To: "jQuery Discussion." 
> 
> 2006/10/4, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > Is it possible to extend this accordion such that I maintain its
> > features and can then extend it with new features?
> >
> 
> The code of accordion (dian?) is pretty locked... means, no way to extend it.
> 
> But I could integrate your new features if you want. Tell me.
> 
> Cheers,
> 
> Franck.
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


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


[jQuery] jQuery stylesheets

2006-10-04 Thread Mark Gibson
Recently I've been playing with loading of HTML into pages dynamically,
which lead to my script evaluation plugin, that I posted yesterday.

Now I've hit another problem:

I'd like to apply a common set of operations (ie. applying plugins)
to all elements on a page, whether they were there from the start,
or loaded dynamically.

The first part is easily handled by $(document).ready(), but loaded
content can only be processed by supplying a callback every time.

The solution I've considered is to register callback functions that
act like stylesheets, and are applied to dynamic content.

eg:

 $.stylesheet(function() {
 $('input').each(function() {
 $(this).addClass(this.type);
 });
 });

This stylesheet adds the input type to the class name, so we can style
different input types individually (in browser that don't fully
implement CSS selectors, you know who you are! ;)

$.stylesheet is the registration function.

Within the 'load' function, or other places where content is added,
we call:

self.applyStylesheets();


Here is the implementation of these functions:

$.stylesheet = function(callback) {
if ($.stylesheet.list === undefined)
$.stylesheet.list = new Array();

if (typeof callback == 'function')
$.stylesheet.list.push(callback);
};

$.fn.applyStylesheets = function() {
if (typeof $.stylesheet.list == 'object') {
var self = this;
$.each($.stylesheet.list, function() {
if (typeof this == 'function') {
this.call(self);
}
});
}
return this;
};


What do you think?

Cheers
- Mark Gibson

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


[jQuery] Interface Sortables Slow in IE

2006-10-04 Thread Matthew Bidwell

I just update an application that uses the Sortables plug-in-in with the
current code.  It works, however the speed is much slower than the previous
version that I was using from 6-8 weeks ago.  The slow part happens
immediately when you click on an item to drag begin dragging it.  Any idea
what changed that is causing the speed problem?  My list is only 40 items
long.

Thanks,

Matt


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


Re: [jQuery] extending functions?

2006-10-04 Thread Franck Marcia
OK

I modified Accordion to be more flexible:
http://fmarcia.info/jquery/accordion.html.

You can now set an action when an item is clicked, shown or hidden and
you can choose the animation speed.

Any comment appreciated.

Cheers,

Franck.

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


Re: [jQuery] question on how not() works

2006-10-04 Thread Jacky
I tried to assign an id 'checkbox' to the checkbox in the example.
Using not('[EMAIL PROTECTED]') result in js error in firefox:

'z has no properties' points to line 710 of jQuery.js (Rev: 249)


On 10/4/06, John Resig <[EMAIL PROTECTED]> wrote:
> > But in not('[EMAIL PROTECTED]@name=checkbox]') ,
> > It should read: select input element OR element with checkbox type OR
> > element named 'checkbox'.
> >
> > Is that right?
>
> .not() is the inverse of .filter()
>
> .filter("[EMAIL PROTECTED]@name=checkbox]') would be:
>
> "Is an input element AND is a checkbox AND is named checkbox"
>
> whereas .not("[EMAIL PROTECTED]@name=checkbox]') is:
>
> "Is NOT an input element AND is NOT a checkbox AND is NOT named checkbox"
>
> I guess it's not the true inverse, but you get the idea.
>
> --John
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Best Regards,
Jacky
網絡暴民 http://jacky.seezone.net

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


[jQuery] slashing

2006-10-04 Thread Andrea Ercolino
I 've found that addresses like http://jquery.com/dev/ don't work if the last slash is stripped off. I think they should be mapped to the slash version in the server configuration.
 
 ___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] slideUp / slideDown and nested divs

2006-10-04 Thread Mika Tuupola

On Oct 4, 2006, at 11:16, Mika Tuupola wrote:

> ** Example 1:
> http://www.appelsiini.net/~tuupola/jquery/slideupdown/ 
> slideupdown2.html
> ** Example 2:
> http://www.appelsiini.net/~tuupola/jquery/slideupdown/ 
> slideupdown3.html

Answering to myself here. It seems that calling slideDown() also sets  
elements absolute height in pixels. Thus any nested divs will be broken.

-cut-

-cut-

Workaround for this would be using callback after slideUp/Down which  
removes the height. For example:

-cut-
 $("a.folder").toggle(function(e) {
$(this).parent().next().slideDown('fast', function() {
$(this).height('');
});
 }, function(e) {
$(this).parent().next().slideUp('fast', function() {
$(this).height('');
});
 });
-cut-

Working example:
http://www.appelsiini.net/~tuupola/jquery/slideupdown/slideupdown4.html


-- 
Mika Tuupola
http://www.appelsiini.net/~tuupola/



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


Re: [jQuery] New Plugin: bgiframe

2006-10-04 Thread Klaus Hartl
Brandon Aaron schrieb:
> I went ahead and added my bgiframe plugin into SVN here:
> http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js
> 
> A big thanks goes out to Mark Gibson for pointing me in the right
> direction with using the expression in the CSS!
> 

Hi,

I made my own version of that plugin:

* you don't have to call show() for the iframe anymore (uses toggle)
* an iframe is created on demand (I found that if you create several 
iframes at once it slows down IE pretty much)

http://stilbuero.de/jquery/bgiframe/jquery.bgiframe.js

Usage:

$('div').show().bgiframe();
$('div').hide().bgiframe();


-- Klaus

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


Re: [jQuery] slideUp / slideDown and nested divs

2006-10-04 Thread Mika Tuupola
On Sep 30, 2006, at 14:25, Mika Tuupola wrote:

I am still trying to figure out solution for this problem:

** Example 1:
http://www.appelsiini.net/~tuupola/jquery/slideupdown/slideupdown2.html

click: toggle 2nd level -> toggle 2nd level -> toggle 1st level ->  
toggle 1st level -> toggle 2nd level

Bottom part of page does not follow closing second level div anymore.

** Example 2:
http://www.appelsiini.net/~tuupola/jquery/slideupdown/slideupdown3.html
click: toggle root -> toggle 1st level -> toggle 2nd level

Bottom part of page does not get pushed down by opening 2nd level div.


Is this problem with html or jQuery?

-- 
Mika Tuupola
http://www.appelsiini.net/~tuupola/



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


Re: [jQuery] question on how not() works

2006-10-04 Thread John Resig
> But in not('[EMAIL PROTECTED]@name=checkbox]') ,
> It should read: select input element OR element with checkbox type OR
> element named 'checkbox'.
>
> Is that right?

.not() is the inverse of .filter()

.filter("[EMAIL PROTECTED]@name=checkbox]') would be:

"Is an input element AND is a checkbox AND is named checkbox"

whereas .not("[EMAIL PROTECTED]@name=checkbox]') is:

"Is NOT an input element AND is NOT a checkbox AND is NOT named checkbox"

I guess it's not the true inverse, but you get the idea.

--John

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


Re: [jQuery] Getting x- and y-positions of elements

2006-10-04 Thread Paul Bakaus
Hi there,maybe adding a referenceElement for offset is a bit too confusing - I would personally prefer a second method called something like  distance(firstElement, secondElement) .This way you don't have the negative offset problem. For your function, it's maybe smart to do a couple of more checks:
1. element does not have a positioned parent and is not positioned -> do it the way like proposed, recursive2. element does not have a positioned parent and is positioned   -> just get position values from the element itself (way faster)
3. element has a positioned parent and is positioned -> do 2 for the element end then do 1 for the parent4. element has a positioned parent and is not positioned    -> do 1 for the element and then 3 for the parent
Good work, tell me wether you want to add it to dimensions.js if ready!2006/10/4, Brandon Aaron <[EMAIL PROTECTED]>:
Okay so I've modified the offset plugin to take an optional paramcalled referenceElement. If passed in, then it will be used to get the
relative offset. Now here is the situation. If the referenceElement isa parent, then the number is positive. If the referenceElement is achild, then the number is negative. That is unless the child isnegatively positioned above the parent.
My question is: Should the returned offset always be positive orshould it be negative if it is a child?--Brandon AaronOn 10/3/06, Brandon Aaron <
[EMAIL PROTECTED]> wrote:> On 10/3/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:> > What about using 'px' as default unit? That way you could write:
> > $().top(10).left(10) - and the 'px' is added automatically. In case a> > string is passed you would take that value as is:> > $().top('10%').left('10%').>> That works for me.
>> --> Brandon Aaron>___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/-- Paul BakausWeb DeveloperHildastr. 3579102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] question on how not() works

2006-10-04 Thread Jacky
So, it's a special case in not()? Just to clarify:

If I use $('[EMAIL PROTECTED]@name=checkbox]') ,
It should read: select an input element with checkbox type and named 'checkbox'.

But in not('[EMAIL PROTECTED]@name=checkbox]') ,
It should read: select input element OR element with checkbox type OR
element named 'checkbox'.

Is that right?

On 10/4/06, John Resig <[EMAIL PROTECTED]> wrote:
> .not() is really greedy, if filters out /everything/ that you specify,
> so when you say:
>
> [EMAIL PROTECTED]@name=checkbox]
>
> You're saying:
> - Anything that's not an input element
> - AND anything that's type property isn't checkbox
> - AND anything that's name isn't checkbox
>
> It's the first one that's goofing you up, in the end you can probably
> just reduce it to:
>
> .not("[EMAIL PROTECTED]")
>
> Hope this helps!
>
> --John
>
> On 10/4/06, Jacky <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I'm a newbie in jQuery. I have some question on how 'not()' works. e.g.
> >
> > HTML:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 0
> > 
> > 
> > 
> >  > name="textarea">
> > 
> > 
> > 
> >
> >
> > JS:
> > $(document).ready(function(){
> > $("#test")
> > .find("tr").find("input,select,textarea")
> > .not("[EMAIL PROTECTED]@name=checkbox]")
> > .each(function(){
> > alert(this.name);
> > });
> > });
> >
> > What I thought was that it should find all the input,select,textara in
> >  ,remove all checkbox elements and alert their names. So I'm
> > expecting 'hidden','text','select' and 'textarea' would be alerted.
> >
> > But in reality, it will only alert 'select' and 'textarea'. Why is that??
> >
> > --
> > Best Regards,
> > Jacky
> > http://jacky.seezone.net
> >
> > ___
> > 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/
>


-- 
Best Regards,
Jacky
網絡暴民 http://jacky.seezone.net

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


Re: [jQuery] question on how not() works

2006-10-04 Thread John Resig
.not() is really greedy, if filters out /everything/ that you specify,
so when you say:

[EMAIL PROTECTED]@name=checkbox]

You're saying:
- Anything that's not an input element
- AND anything that's type property isn't checkbox
- AND anything that's name isn't checkbox

It's the first one that's goofing you up, in the end you can probably
just reduce it to:

.not("[EMAIL PROTECTED]")

Hope this helps!

--John

On 10/4/06, Jacky <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm a newbie in jQuery. I have some question on how 'not()' works. e.g.
>
> HTML:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 0
> 
> 
> 
>  name="textarea">
> 
> 
> 
>
>
> JS:
> $(document).ready(function(){
> $("#test")
> .find("tr").find("input,select,textarea")
> .not("[EMAIL PROTECTED]@name=checkbox]")
> .each(function(){
> alert(this.name);
> });
> });
>
> What I thought was that it should find all the input,select,textara in
>  ,remove all checkbox elements and alert their names. So I'm
> expecting 'hidden','text','select' and 'textarea' would be alerted.
>
> But in reality, it will only alert 'select' and 'textarea'. Why is that??
>
> --
> Best Regards,
> Jacky
> http://jacky.seezone.net
>
> ___
> 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/


[jQuery] question on how not() works

2006-10-04 Thread Jacky
Hi all,

I'm a newbie in jQuery. I have some question on how 'not()' works. e.g.

HTML:











0









JS:
$(document).ready(function(){
$("#test")
.find("tr").find("input,select,textarea")
.not("[EMAIL PROTECTED]@name=checkbox]")
.each(function(){
alert(this.name);
});
});

What I thought was that it should find all the input,select,textara in
 ,remove all checkbox elements and alert their names. So I'm
expecting 'hidden','text','select' and 'textarea' would be alerted.

But in reality, it will only alert 'select' and 'textarea'. Why is that??

-- 
Best Regards,
Jacky
http://jacky.seezone.net

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