[jQuery] jQuery Demo - Portlets

2006-10-20 Thread Nathan Smith
Here's a little demo I whipped up, just to show off the basics of
jQuery, plus using the Interface sortables. I tried to approach the
tutorial from the standpoint of designers, who might feel intimidated
by JavaScript, but still want to get their feet wet.

http://host.sonspring.com/portlets/

http://sonspring.com/journal/jquery-portlets

-- 
Nathan Smith
208 348 2213 - work
859 229 9587 - cell
http://sonspring.com

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


Re: [jQuery] Test suite failures

2006-10-20 Thread John Resig
Karl -

I think we all have the same problem with Safari, it's totally
bizarre. Every once-in-a-while I can get it to run, and when it does,
it shows no errors. It's so strange though - it makes everyone's
Safari crash so reliably.

--John

On 10/21/06, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Ok, this is weird. When I ran the test suite in Firefox 1.5, I got:
> Tests completed in 11578 milliseconds.
> 0 tests of 242 failed.
>
> Then I ran it in Safari 2.0.4, and Safari crashed. Tried it three
> times, got the same result.
> Has anyone else had this problem with running the tests on Safari?
> Could the problem be with my old Powerbook? (867 MHz PowerPC G4,
> 640MB DDR SDRAM)
>
> here is the URL where I tried it:
>
> http://test.learningjquery.com/test/

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


Re: [jQuery] Test suite failures

2006-10-20 Thread Karl Swedberg
Ok, this is weird. When I ran the test suite in Firefox 1.5, I got:
Tests completed in 11578 milliseconds.
0 tests of 242 failed.

Then I ran it in Safari 2.0.4, and Safari crashed. Tried it three  
times, got the same result.
Has anyone else had this problem with running the tests on Safari?  
Could the problem be with my old Powerbook? (867 MHz PowerPC G4,  
640MB DDR SDRAM)

here is the URL where I tried it:

http://test.learningjquery.com/test/

thanks,

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

On Oct 20, 2006, at 11:43 PM, Karl Swedberg wrote:

> On Oct 20, 2006, at 7:31 PM, John Resig wrote:
>
>> Are you running this on a local machine? I had a similar problem too
>> until I realized that the test suite refers to PHP files and such  
>> that
>> can only be run on a web server. That's something that needs to be
>> kept in mind when running them.
>>
>> --John
>
> Ah! thanks for that explanation, John. I, too, was wondering about
> those test suite errors, but was too shy to ask about it and figured
> I was doing something wrong. Surprise, surprise -- I /was/ doing
> something wrong. Trying to run it on my local machine. I think I'll
> try it out on my web server now. Yippee!
>
> Karl
>
>
> ___
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


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


Re: [jQuery] jQuery Events

2006-10-20 Thread Brandon Aaron
On 10/20/06, Adam van den Hoven <[EMAIL PROTECTED]> wrote:
> if (e.target.nodeType == 3) { // defeat Safari bug
>e.target = e.target.parentNode;
> }
>
> as I don't know whether or not some strange side effects might occur.
> I suspect not, but I was being cautious.

The target property is read-only
(http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html). It
sucks that it would have to be under a different name to fix that
Safari bug.

Just a thought ... couldn't we create a new object (var newEvent = {})
and then extend it with the existing event object? Then the read-only
properties wouldn't be read-only and could be normalized for issues
like the Safari one.

--
Brandon Aaron

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


Re: [jQuery] Test suite failures

2006-10-20 Thread Karl Swedberg
On Oct 20, 2006, at 7:31 PM, John Resig wrote:

> Are you running this on a local machine? I had a similar problem too
> until I realized that the test suite refers to PHP files and such that
> can only be run on a web server. That's something that needs to be
> kept in mind when running them.
>
> --John

Ah! thanks for that explanation, John. I, too, was wondering about  
those test suite errors, but was too shy to ask about it and figured  
I was doing something wrong. Surprise, surprise -- I /was/ doing  
something wrong. Trying to run it on my local machine. I think I'll  
try it out on my web server now. Yippee!

Karl


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


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


[jQuery] Style sheet modification snippet

2006-10-20 Thread Brandon Aaron
Today I found the need to actually create a stylesheet and add rules
to it instead of using the style property. The style property puts any
of the styles inline and this really hurt my print styles. So, for a
few styles in my site I used this snippet to actually add a style
sheet and rules. It is a first draft and lacks a lot but thought I
would share anyways.

jQuery.style = function(selector, declaration) {
  if (!jQuery.style.sheet) jQuery.style.createSheet();
  var s = jQuery.style.sheet;
  var n = jQuery.style.node;

  if ($.browser.safari) {
n.appendChild( document.createTextNode(selector+" { "+declaration+" }") );
  } else if (s && s.insertRule) {
s.insertRule(selector+" { "+declaration+" }", s.cssRules.length);
  } else if (s && s.addRule) {
s.addRule(selector, declaration, s.rules.length);
  }
};

jQuery.extend(jQuery.style, {
  sheet: null,
  node: null,

  createSheet: function() {
var style = document.createElement('style');
style.setAttribute('type', 'text/css');
style.setAttribute('media', 'screen');
jQuery.style.node  =
document.getElementsByTagName('head')[0].appendChild(style);
jQuery.style.sheet = document.styleSheets[document.styleSheets.length-1];
  }
});

--
Brandon Aaron

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


Re: [jQuery] jQuery Image Cropper

2006-10-20 Thread sime
If you're not in a rush, I have just started to convert my own cropper, 
previously written just in javascript (not using any of the libraries). 
But it will take a few weeks, being a side project and being my first 
jQuery project.

A demonstration of the cropper can be viewed here (click the clown), but 
the wider project involves a few other UI features. It is licenced GPL 
and I'm open to any offers by established jQuerians to work on the 
conversion if they'd like to name their bounty.
http://urbits.com/_/demos/insizer_demo_page4.php

Simon


Felix Geisendörfer wrote:

> Hi guys,
>
> I've just been wondering if there is an Image Cropper Plugin for 
> jQuery out there somewhere?
>
> I'm finishing up the administration area of my current project and 
> wanted to add this functionality, but the only decent one I could find 
> is for for prototype (see docs 
> 
>  
> & demo ) which I 
> don't like.
>
> Otherwise this could be a nice opportunity to write a bigger plugin 
> for me ; ).
>
> Best Regards,
> Felix Geisendörfer
> -- 
> --
> http://www.thinkingphp.org
> http://www.fg-webdesign.de
>
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/
>  
>

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


Re: [jQuery] Popup window reference problem

2006-10-20 Thread Francisco Brito
You can theoretically do it, but you'll run into problems right away in IE when you create a node in one document and try to append it in another; plus I'd figure it's not as straightforward, having to do things like $.fn.apply(blah blah) instead of the regular sweet syntax.
I wouldn't bother.cheers-franciscoOn 10/19/06, Blair McKenzie <[EMAIL PROTECTED]> wrote:
That's what I've done. It may be possible to do it another way, but I haven't had the time to experiment.
BlairOn 10/19/06, Jacky <

[EMAIL PROTECTED]> wrote:So, I should:1. includes jQuery library in popup.
2. call ref.$()where ref is the window reference created in window.open?On 10/19/06, Blair McKenzie <
[EMAIL PROTECTED]> wrote:> The only way I know of to use jQuery in another window/frame is to include
> jquery in that page's html, and then access it using window.$().>> Blair>>> On 10/19/06, Jacky <
[EMAIL PROTECTED]> wrote:> >
> > I have tried to directly use the window reference.> > i.e.> > var abc = ref.document.getElementById("abc1");> > abc.parentNode.removeChild(abc);> >> > The result is correct that the input box in popup windows being removed.
> > Seems that jQuery cannot use popup window reference?> >> > On 10/17/06, Jacky <
[EMAIL PROTECTED]> wrote:> > > Dear all,> > >
> > > I would like to make a simple popup which would copy current page> > > content and do some conversion ( e.g. text box to text). But I have met> > > a problem of getting a wrong reference. Here is the code to
> > > demonstrate the problem:> > >> > > > > > > > > Test Popup> > > > > > 
> > > $(document).ready(function(){
> > >
> $("#popup").click(specificPop);
> > >
> > > function specificPop(){
> > > var ref =
> genericPopup();
> > >
> $(ref.document ).find("#popup_body #abc1").remove();
> > > }
> > >
> > > function
> genericPopup(){
> > > var ref =
> window.open('','','resizable=1,width=400,height=400');
> > > var diva =
> $("#diva").clone();
> > >
> ref.document.open();
> > >
> ref.document.write('Popup');
> > >
> ref.document.write ('');
> > >
> ref.document.write($(diva).html());
> > >
> ref.document.write('');
> > >
> ref.document.close();
> > > return ref;
> > > }
> > > });
> > > > > > > > > > > > > > > > > > > > > > > > popup> > > > > > > > >> > > In this example, I would expect the text box #abc1 in the popup is> > > removed. But it removes current window's one instead. For the removal> > > code, I have tried the following approaches: > > >> > > $(ref.document).find("#abc1").remove();> > > $(ref.document).find("#popup_body #abc1").remove();> > > $("#popup_body #abc1",ref.document ).remove();> > > $(ref.document ).find("#popup_body #abc1",ref.document).remove();> > >> > > but all failed. Any idea how can I can the correct reference??> > > > > > P.S. using jQ ver 1.0.2> > > --> > > Best Regards,> > > Jacky> > > http://jacky.seezone.net> > > > >> >> >> > --> > Best Regards,> > Jacky> > 網絡暴民 http://jacky.seezone.net> >> > ___ > > jQuery mailing list> > discuss@jquery.com> > http://jquery.com/discuss/> ___ > 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 mailing listdiscuss@jquery.com http://jquery.com/discuss/-- Francisco Britosoftware:http://nullisnull.blogspot.comphotography:   http://www.flickr.com/photos/darkgoyleeverything else:   http://brito.mindsay.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] Point me in the right direction...

2006-10-20 Thread Robert
On 10/20/06, David <[EMAIL PROTECTED]> wrote:
> Robert schreef:
> > I have just found jQuery today and started using it. Very nice. I am
> > looking to change the values in one combo box based on the choice in
> > another combo box. Does jQuery have something like that or something
> > similiar that you can point me to?
> >
> quick code here so it may not work 'out-of-the-box'
>
> $('#combo1').change(function () {
> $.get('file.html', {param: $(this).val()}, function(comboitems) {
>$(this).after(' id="combo2">'+comboitems+'');
> });
> });
>
> The first line is an event trigger that fires when an item gets selected
> The second line is an ajax call with the selected element as a parameter
> to extract the  right items,  the parameter in the function is the
> response from the called page. I assume the response are option tags.
> The third line adds an element after the first select so you don't have
> to hard code it in your html file.
>
> I hope that was what you were thinking about and i hope the explaination
> is clear enough.
>
>

That was actually more than I was hoping for. I was thinking "go look
here" kind of advice.

Thanks!

Robert

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


Re: [jQuery] jQuery Kinda Plugin: every

2006-10-20 Thread Blair Mitchelmore

Michael Geary wrote:
>
> You can simplify that code quite a bit. every() and doin() are nearly
> identical, so they can both call a common implementation. Ditto for the two
> inner loops in stop().
Great suggestions Mike. I noticed that they were very similar but I was 
too lazy to combine them but now you have challenged me, and I have 
realized that just as with the immortals, there can be only one.

The code you modified was the original rewrite which didn't include the 
additional passed arguments feature so my version of the rewrite is 
slightly different but inspired by yours.
>
> Since I was moving the whole thing inside a function to get a local scope
> for the every() helper, that gave me a chance to rename jQuery as $. This is
> a matter of taste, of course, but I like being able to write plugin code the
> same way as ordinary jQuery code, using $.
It's definitely a matter of taste, as I tend to prefer to use the jQuery 
in plug-in development seeing as the ultimate result is intended for 
much generic uses than my page specfici code so it brings me into a 
different more methodical mindset.

> One last thing - in the inner function inside every(), I changed the uses of
> "this" to "self", because there's a "var self = this;" at the top of the
> function. I think it helps readability to only use "self" after a "var self
> = this;" instead of mixing "this" and "self".
That's probably because self was an afterthought. I always forget about 
the intransitive nature of 'this' so my this closures are usually not 
written until I realize I need them.
>
> The code is untested, but should work the same as the original unless I
> goofed. :-)
>
> -Mike
Well Actually it wouldn't have worked because I made a goof in my code! 
Initially by setting interval to the result of jQuery.speed rather than 
the duration property of the result. Noticed when testing the new code.

Here's the updated code (it'll probably be wrapped by my mail client):
jQuery.fn.extend({
every: function(interval,id,fn) {
return 
jQuery.timer.add.apply(this,[false].concat(jQuery.map(arguments,"a")));
},
doin: function(interval,id,fn) {
return 
jQuery.timer.add.apply(this,[true].concat(jQuery.map(arguments,"a")));
},
stop: function(id) {
return jQuery.timer.remove.apply(this,[id]);
}
});

jQuery.extend({
timer: {
add: function(oneOff,interval,id,fn) {
var args = jQuery.map(arguments,"a"), slice = 4;
return this.each(function() {
var self = this, counter = 0;
interval = jQuery.speed(interval)['duration'];
if (fn == undefined || id.constructor == Function) {
fn = id;
id = interval;
slice = 3;
}
if (!self.timers) self.timers = {};
if (!self.timers[id]) self.timers[id] = [];
self.timers[id].push(window.setInterval(function() {
if (oneOff && counter++ >= 1) return 
jQuery(self).stop(id);
fn.apply(self,args.slice(slice));
},interval));
});
},
remove: function(id) {
return this.each(function() {
if (!this.timers) return;
jQuery.each(id == undefined ? this.timers : 
[this.timers[id]], function(i) {
jQuery.each(this,function(j) {
window.clearInterval(this);
});
});
});
}
}
});

-blair

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


Re: [jQuery] Test suite failures

2006-10-20 Thread John Resig
Dave -

Are you running this on a local machine? I had a similar problem too
until I realized that the test suite refers to PHP files and such that
can only be run on a web server. That's something that needs to be
kept in mind when running them.

--John

On 10/20/06, Dave Methvin <[EMAIL PROTECTED]> wrote:
> I finally got around to setting up a build environment here. With revision
> 453 I am seeing errors in $.find (sibling axis tests) and several of the
> ajax functions. Ideas?

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


Re: [jQuery] Jquery mentioned in an article

2006-10-20 Thread John Resig
Fixed. I just setup jquery.net and .org to both redirect to jquery.com
(good thing I already own them!) Thanks for the heads up!

--John

On 10/20/06, David <[EMAIL PROTECTED]> wrote:
> http://www.hiveminds.co.uk/node/3141
>
> It's an article about how lite programming is becoming a trend. By that
> they mean less resources and  smaller filesizes.  jQuery get mentioned
> as one of the lite libraries.
>
> Too bad they got the url wrong.

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


Re: [jQuery] Get element ID

2006-10-20 Thread Adam van den Hoven
Keep in mind that "this" refers to the element on which the event is
being handled, NOT the element that originated the event. See
http://www.quirksmode.org/js/events_order.html  for an explaination of
how events are captured and
http://www.quirksmode.org/js/events_properties.html for good measure.

Depending on what your needs are the following will give you the
element that originated the event:
$(document).ready(function() {
$("td").click(function() {
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode;
var id = targ.id
});

John's approach is probably what you are looking for. I'm just helping
with a complete answer.

Adam

On 10/20/06, John Resig <[EMAIL PROTECTED]> wrote:
> Something like this:
>
> $(document).ready(function() {
>$("td").click(function() {
>var id = this.id;
>// now do stuff with id!
>});
> });
>
> --John
>
> > How do I get the id of the item which was just clicked?
> >
> > For instance, if a user clicks a  which has a specific id, how do I use
> > this id in my script?
> >
> > $(document).ready(function() {
> > $("td").click(function() {
> >   // get the id of the table cell clicked
> >   // use the id in a script
> > });
> > });
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


[jQuery] Jquery mentioned in an article

2006-10-20 Thread David
http://www.hiveminds.co.uk/node/3141

It's an article about how lite programming is becoming a trend. By that 
they mean less resources and  smaller filesizes.  jQuery get mentioned 
as one of the lite libraries.

Too bad they got the url wrong.


David


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


Re: [jQuery] Point me in the right direction...

2006-10-20 Thread David
Robert schreef:
> I have just found jQuery today and started using it. Very nice. I am
> looking to change the values in one combo box based on the choice in
> another combo box. Does jQuery have something like that or something
> similiar that you can point me to?
>   
quick code here so it may not work 'out-of-the-box'

$('#combo1').change(function () {
$.get('file.html', {param: $(this).val()}, function(comboitems) {
   $(this).after(''+comboitems+'');
});
});

The first line is an event trigger that fires when an item gets selected
The second line is an ajax call with the selected element as a parameter 
to extract the  right items,  the parameter in the function is the 
response from the called page. I assume the response are option tags.
The third line adds an element after the first select so you don't have 
to hard code it in your html file.

I hope that was what you were thinking about and i hope the explaination 
is clear enough.


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


Re: [jQuery] Test suite failures

2006-10-20 Thread Jörn Zaefferer
Dave Methvin schrieb:
> I finally got around to setting up a build environment here. With revision
> 453 I am seeing errors in $.find (sibling axis tests) and several of the
> ajax functions. Ideas?
>   
Those weird errors seem to be related to a change to attr. It seems to 
occur when using getAttribute with an XML element. But instead of 
throwing a normal exception that could be handled, IE throws weird 
errors. Would be nice to have that fixed before 1.0.3.

-- Jörn

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Jörn Zaefferer
Klaus Hartl schrieb:
>> Talking about verbosity, isn't fxFade and fxSlide and fxShow and fxHide 
>> somewhat verbose?
>> 
>
> Jörn, I think not. If I've had that documented already you would know 
> why not :-)
>   
Cool.
>   
> I already tried that with my new history/hijax plugin. But I had the 
> need to pass in the 'e' object, which isn't possible in trigger...
>
> I needed e.clientX to distinguish between a true click and a triggered 
> click event. Maybe someone has an alternative idea for that?
>   
Could you explain that in more detail?

-- Jörn

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


[jQuery] Interface ifxshake bug

2006-10-20 Thread aedmonds

Just to make sure the users of ifxshake know (along with Stefan), there is a
bug on line 37 of ifxshake.js. This bug causes the failure of the callback
function.

The simple fix: switch "z.callback = z.callback;" with "z.callback =
callback;".

Thanks Stefan for Interface!

-Aaron
-- 
View this message in context: 
http://www.nabble.com/Interface-ifxshake-bug-tf2483947.html#a6926408
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Firefox Javascript console hangs with jQuery?

2006-10-20 Thread Michael Crowl

Yup - can't tell if it's when there are certain timeouts running or 
not.  It even happens when all I've done is declared a 
$(document).ready() with nothing in it.

W2K
Firefox 1.5.0.7
jQuery 1.0.2

-- mike


Ⓙⓐⓚⓔ wrote:
> you have debugger enabled in firebug? I had a similar problem.
>
> On 10/19/06, Michael Crowl <[EMAIL PROTECTED]> wrote:
>   
>> On any page with jQuery included, when I try to open the Javascript
>> console Firefox hangs for a bit and eventually asks me if I want to
>> "stop the currently running script".  This occurs whether the console
>> has been cleared or not, and on pages where jQuery is the only
>> Javascript on the page - even if there are no currently running
>> functions, as far as I can tell.
>>
>> Haven't been able to find anyone else mentioning this problem anywhere.
>>
>> -- mike
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
>> 
>
>
>   

-- 


| Michael Crowl
| Web Developer
| [EMAIL PROTECTED]



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


Re: [jQuery] Get element ID

2006-10-20 Thread John Resig
Something like this:

$(document).ready(function() {
   $("td").click(function() {
   var id = this.id;
   // now do stuff with id!
   });
});

--John

> How do I get the id of the item which was just clicked?
>
> For instance, if a user clicks a  which has a specific id, how do I use
> this id in my script?
>
> $(document).ready(function() {
> $("td").click(function() {
>   // get the id of the table cell clicked
>   // use the id in a script
> });
> });

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


[jQuery] Get element ID

2006-10-20 Thread smeranda

How do I get the id of the item which was just clicked?

For instance, if a user clicks a  which has a specific id, how do I use
this id in my script?

$(document).ready(function() {
$("td").click(function() {
  // get the id of the table cell clicked
  // use the id in a script
});
});
-- 
View this message in context: 
http://www.nabble.com/Get-element-ID-tf2483865.html#a6926187
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Non-Destructive jQuery

2006-10-20 Thread John Resig
> Just an optimization, but it would be good to have the
> .destructiveMethod(selector, function) case not create a new object since it
> doesn't (permanently) change the original object. It looks like _pushStack
> will stack the old jQuery object's nodes in the new jQuery object, which it
> won't use. The internal stack has been replaced by the prevObject chain,
> which is a good thing because it makes earlier states easily accessible via
> simple object references. Before, we couldn't get to the internal stack
> without .end()ing.

Yeah, in the end, the new pushStack would have to be smarter (probably
just implementing the current feature set of pushStack, but with using
references instead of an array stack). This is good enough for people
to, at least, start using a 'cleaner' version of jQuery.

Although, in thinking about it, this new version will probably use
much less memory than the previous version. Hmm, it would be
interesting to test this further.

--John

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


[jQuery] Test suite failures

2006-10-20 Thread Dave Methvin
I finally got around to setting up a build environment here. With revision
453 I am seeing errors in $.find (sibling axis tests) and several of the
ajax functions. Ideas?


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


Re: [jQuery] Non-Destructive jQuery

2006-10-20 Thread Tombo

i am grateful that you have been able to contain the destructive power of
jquery with such little code



John Resig wrote:
> 
> Hi Everyone -
> 
> There's been some rabble-rousing concerning the destructive nature of
> jQuery (it's ok, rousing is a good thing ;-)). I claimed that it'd be
> easy to have it exist as a plugin. Well, it took me all of 10 minutes,
> but here it is:
> 
> jQuery.fn._pushStack = jQuery.fn.pushStack;
>   
> jQuery.fn.pushStack = function(){
> var ret = jQuery.fn._pushStack.apply( jQuery(this), arguments );
> ret.prevObject = this;
> return ret;
> };
>   
> jQuery.fn.end = function(){
> return this.prevObject || jQuery([]);
> };
> 
> You can see a demo (requires Firebug) here:
> http://john.jquery.com/jquery/test/destruct.html
> 
> So, if the destructive nature of jQuery bothers you - and you can't
> wait for jQuery 2.0, then just stick the above code in the header of
> your site (after jQuery) and you'll be good to go. Enjoy!
> 
> --John
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Non-Destructive-jQuery-tf2482924.html#a6926106
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Non-Destructive jQuery

2006-10-20 Thread Dave Methvin
> There's been some rabble-rousing concerning the destructive
> nature of jQuery (it's ok, rousing is a good thing ;-)). I claimed
> that it'd be easy to have it exist as a plugin. Well, it took me
> all of 10 minutes, but here it is:
>
> jQuery.fn._pushStack = jQuery.fn.pushStack;
>   
> jQuery.fn.pushStack = function(){
> var ret = jQuery.fn._pushStack.apply( jQuery(this), arguments );
> ret.prevObject = this;
> return ret;
> };
>   
> jQuery.fn.end = function(){
> return this.prevObject || jQuery([]); };
> 
> You can see a demo (requires Firebug) here:
> http://john.jquery.com/jquery/test/destruct.html

Your ideas intrigue me and I'd like to subscribe to your newsletter. :)

Just an optimization, but it would be good to have the
.destructiveMethod(selector, function) case not create a new object since it
doesn't (permanently) change the original object. It looks like _pushStack
will stack the old jQuery object's nodes in the new jQuery object, which it
won't use. The internal stack has been replaced by the prevObject chain,
which is a good thing because it makes earlier states easily accessible via
simple object references. Before, we couldn't get to the internal stack
without .end()ing.



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


Re: [jQuery] Returning a query?

2006-10-20 Thread Christopher Jordan




good to note the difference, Mike. For my current
purpose, single domain is fine. Thanks for the tip! :)

Chris

Michael Geary wrote:

  
From Rey Bango:

and then use the JSON plugin
 (http://mg.to/2006/01/25/json-for-jquery) to work with the data. 

  
  
  
  
From: Aaron Heimlich

Or you could (as of 1.0.2, possibly a bit earlier) do 

$.getJSON("file.php",function(r) {
 alert(r);
});

See the API docs   under "G" for more info

  
  
Just as a note, my old JSON plugin and $.getJSON serve two different needs.
Mine uses a dynamic script tag, so it uses JSONP format and works
cross-domain. $.getJSON uses XMLHttpRequest, so it uses ordinary JSON format
(not JSONP) and it works only from your own domain.

-Mike


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


  



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


Re: [jQuery] Returning a query?

2006-10-20 Thread Michael Geary
> From Rey Bango:
> 
> and then use the JSON plugin
>  (http://mg.to/2006/01/25/json-for-jquery) to work with the data. 

> From: Aaron Heimlich
> 
> Or you could (as of 1.0.2, possibly a bit earlier) do 
> 
> $.getJSON("file.php",function(r) {
>  alert(r);
> });
> 
> See the API docs   under "G" for more info

Just as a note, my old JSON plugin and $.getJSON serve two different needs.
Mine uses a dynamic script tag, so it uses JSONP format and works
cross-domain. $.getJSON uses XMLHttpRequest, so it uses ordinary JSON format
(not JSONP) and it works only from your own domain.

-Mike


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


Re: [jQuery] Returning a query?

2006-10-20 Thread Christopher Jordan




Sweet! I'd found that site, but hadn't made it down to
the bottom of the page first. This looks like it won't be very hard. I
appreciate all the help guys!

Chris

Aaron Heimlich wrote:
You should head over to http://www.json.org.
Towards the bottom of the page, there are links to JSON encoders
written in many different languages (I'm guessing you would want one of
the ColdFusion ones).
  
  
  On 10/20/06, cjordan <[EMAIL PROTECTED]> wrote:
  
Wow! Replys galore! I feel so loved, now! :-D

Thanks for the tips guys. JSON sounds like what I want then. I'll give
that
a search on the net, do some reading, and holler back if I've got any
questions, but it seems like the example below is pretty easy to
follow. I'm

just needing to understand what I have to do special on the server side
(if
anything).

And if nothing special is required on the server side, could someone
just
reply and let me know, so I don't waste a bunch of time? :-)


Thanks heaps!
Chris


Matt Stith wrote:
>
> Acctually, jQuery 1.0 and up can handle JSON for you. Try this out:
>
> $.getJSON("file.php",function(r) {
>  alert(r.column1
);
> });
>
> No need for a plugin. ;)
> On 10/20/06, Rey Bango <[EMAIL PROTECTED]>
wrote:
>>
>> Hi Chris,
>>
>> You're not going to be able to manipulate a query like you
would in

>> AjaxCFC since AjaxCFC is a CF wrapper for DWR and hence, gives
you
>> access to CF functionality.
>>
>> Return your query as a JSON packet using CFJSon
>> (
http://jehiah.com/projects/cfjson/) and then use the JSON plugin
>> (http://mg.to/2006/01/25/json-for-jquery)
to work with the data.
>>
>> Rey...

>>
>> cjordan wrote:
>> > I re-read this and thought I should maybe clarify my
question. I need
>> to
>> > return a query result set to the client side using Ajax.
How does

>> jQuery
>> go
>> > about handling that? What's the simplest way of
accomplishing this
>> task.
>> >
>> > I know that with ajaxCFC I could return a query object
from my

>> ColdFusion
>> > function and it gave me a _javascript_ structure (or
object... whatever)
>> that
>> > I could address really easily. How easy is this sort of
thing in
>> jQuery.

>> >
>> > Also, I gotta say for such an active list, I've posted
three or four
>> times,
>> > and only one bloke's even responded and that's because he
and I knew
>> > eachother from a different list and were emailing off
list.

>> >
>> > Can *anybody* help with this question?
>> >
>> > Thanks,
>> > Chris
>> >
>> > cjordan wrote:
>> >
>> >>Hi folks,

>> >>
>> >>I need to know if jQuery can return a query result set
from an Ajax
>> >>call. What's the best way to do this?
>> >>
>> >>Chris
>> >>

>> >>___
>> >>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/
>
>

--
View this message in context: 
http://www.nabble.com/Returning-a-query--tf2483121.html#a6925517
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/
  



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


Re: [jQuery] Returning a query?

2006-10-20 Thread Rey Bango
Chris,

You're going to need to send the query back as a JSON packet. Use the 
link that I sent for CFJson to convert your query to JSON.

Rey...

cjordan wrote:
> Wow! Replys galore! I feel so loved, now! :-D
> 
> Thanks for the tips guys. JSON sounds like what I want then. I'll give that
> a search on the net, do some reading, and holler back if I've got any
> questions, but it seems like the example below is pretty easy to follow. I'm
> just needing to understand what I have to do special on the server side (if
> anything).
> 
> And if nothing special is required on the server side, could someone just
> reply and let me know, so I don't waste a bunch of time? :-)
> 
> Thanks heaps!
> Chris
> 
> 
> Matt Stith wrote:
> 
>>Acctually, jQuery 1.0 and up can handle JSON for you. Try this out:
>>
>>$.getJSON("file.php",function(r) {
>> alert(r.column1);
>>});
>>
>>No need for a plugin. ;)
>>On 10/20/06, Rey Bango <[EMAIL PROTECTED]> wrote:
>>
>>>Hi Chris,
>>>
>>>You're not going to be able to manipulate a query like you would in
>>>AjaxCFC since AjaxCFC is a CF wrapper for DWR and hence, gives you
>>>access to CF functionality.
>>>
>>>Return your query as a JSON packet using CFJSon
>>>(http://jehiah.com/projects/cfjson/) and then use the JSON plugin
>>>(http://mg.to/2006/01/25/json-for-jquery) to work with the data.
>>>
>>>Rey...
>>>
>>>cjordan wrote:
>>>
I re-read this and thought I should maybe clarify my question. I need
>>>
>>>to
>>>
return a query result set to the client side using Ajax. How does
>>>
>>>jQuery
>>>go
>>>
about handling that? What's the simplest way of accomplishing this
>>>
>>>task.
>>>
I know that with ajaxCFC I could return a query object from my
>>>
>>>ColdFusion
>>>
function and it gave me a javascript structure (or object... whatever)
>>>
>>>that
>>>
I could address really easily. How easy is this sort of thing in
>>>
>>>jQuery.
>>>
Also, I gotta say for such an active list, I've posted three or four
>>>
>>>times,
>>>
and only one bloke's even responded and that's because he and I knew
eachother from a different list and were emailing off list.

Can *anybody* help with this question?

Thanks,
Chris

cjordan wrote:


>Hi folks,
>
>I need to know if jQuery can return a query result set from an Ajax
>call. What's the best way to do this?
>
>Chris
>
>___
>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 mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Returning a query?

2006-10-20 Thread Aaron Heimlich
You should head over to http://www.json.org. Towards the bottom of the page, there are links to JSON encoders written in many different languages (I'm guessing you would want one of the ColdFusion ones).
On 10/20/06, cjordan <[EMAIL PROTECTED]> wrote:
Wow! Replys galore! I feel so loved, now! :-DThanks for the tips guys. JSON sounds like what I want then. I'll give thata search on the net, do some reading, and holler back if I've got anyquestions, but it seems like the example below is pretty easy to follow. I'm
just needing to understand what I have to do special on the server side (ifanything).And if nothing special is required on the server side, could someone justreply and let me know, so I don't waste a bunch of time? :-)
Thanks heaps!ChrisMatt Stith wrote:>> Acctually, jQuery 1.0 and up can handle JSON for you. Try this out:>> $.getJSON("file.php",function(r) {>  alert(r.column1
);> });>> No need for a plugin. ;)> On 10/20/06, Rey Bango <[EMAIL PROTECTED]> wrote: Hi Chris, You're not going to be able to manipulate a query like you would in
>> AjaxCFC since AjaxCFC is a CF wrapper for DWR and hence, gives you>> access to CF functionality. Return your query as a JSON packet using CFJSon>> (
http://jehiah.com/projects/cfjson/) and then use the JSON plugin>> (http://mg.to/2006/01/25/json-for-jquery) to work with the data. Rey...
 cjordan wrote:>> > I re-read this and thought I should maybe clarify my question. I need>> to>> > return a query result set to the client side using Ajax. How does
>> jQuery>> go>> > about handling that? What's the simplest way of accomplishing this>> task.>> >>> > I know that with ajaxCFC I could return a query object from my
>> ColdFusion>> > function and it gave me a _javascript_ structure (or object... whatever)>> that>> > I could address really easily. How easy is this sort of thing in>> jQuery.
>> >>> > Also, I gotta say for such an active list, I've posted three or four>> times,>> > and only one bloke's even responded and that's because he and I knew>> > eachother from a different list and were emailing off list.
>> >>> > Can *anybody* help with this question?>> >>> > Thanks,>> > Chris>> >>> > cjordan wrote:>> >>> >>Hi folks,
>>  >>I need to know if jQuery can return a query result set from an Ajax>> >>call. What's the best way to do this?>>  >>Chris>> >>
>> >>___>> >>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/>>--View this message in context: 
http://www.nabble.com/Returning-a-query--tf2483121.html#a6925517Sent from the JQuery mailing list archive at Nabble.com.___
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Point me in the right direction...

2006-10-20 Thread Robert
I have just found jQuery today and started using it. Very nice. I am
looking to change the values in one combo box based on the choice in
another combo box. Does jQuery have something like that or something
similiar that you can point me to?

Thanks!

Robert

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


Re: [jQuery] Returning a query?

2006-10-20 Thread cjordan

Wow! Replys galore! I feel so loved, now! :-D

Thanks for the tips guys. JSON sounds like what I want then. I'll give that
a search on the net, do some reading, and holler back if I've got any
questions, but it seems like the example below is pretty easy to follow. I'm
just needing to understand what I have to do special on the server side (if
anything).

And if nothing special is required on the server side, could someone just
reply and let me know, so I don't waste a bunch of time? :-)

Thanks heaps!
Chris


Matt Stith wrote:
> 
> Acctually, jQuery 1.0 and up can handle JSON for you. Try this out:
> 
> $.getJSON("file.php",function(r) {
>  alert(r.column1);
> });
> 
> No need for a plugin. ;)
> On 10/20/06, Rey Bango <[EMAIL PROTECTED]> wrote:
>>
>> Hi Chris,
>>
>> You're not going to be able to manipulate a query like you would in
>> AjaxCFC since AjaxCFC is a CF wrapper for DWR and hence, gives you
>> access to CF functionality.
>>
>> Return your query as a JSON packet using CFJSon
>> (http://jehiah.com/projects/cfjson/) and then use the JSON plugin
>> (http://mg.to/2006/01/25/json-for-jquery) to work with the data.
>>
>> Rey...
>>
>> cjordan wrote:
>> > I re-read this and thought I should maybe clarify my question. I need
>> to
>> > return a query result set to the client side using Ajax. How does
>> jQuery
>> go
>> > about handling that? What's the simplest way of accomplishing this
>> task.
>> >
>> > I know that with ajaxCFC I could return a query object from my
>> ColdFusion
>> > function and it gave me a javascript structure (or object... whatever)
>> that
>> > I could address really easily. How easy is this sort of thing in
>> jQuery.
>> >
>> > Also, I gotta say for such an active list, I've posted three or four
>> times,
>> > and only one bloke's even responded and that's because he and I knew
>> > eachother from a different list and were emailing off list.
>> >
>> > Can *anybody* help with this question?
>> >
>> > Thanks,
>> > Chris
>> >
>> > cjordan wrote:
>> >
>> >>Hi folks,
>> >>
>> >>I need to know if jQuery can return a query result set from an Ajax
>> >>call. What's the best way to do this?
>> >>
>> >>Chris
>> >>
>> >>___
>> >>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/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Returning-a-query--tf2483121.html#a6925517
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Returning a query?

2006-10-20 Thread Aaron Heimlich
On 10/20/06, Rey Bango <[EMAIL PROTECTED]> wrote:
Thanks Aaron!Rey...Your welcome, dude. Happy to help!
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Returning a query?

2006-10-20 Thread Rey Bango
Even better. :o)

Rey...

Matt Stith wrote:
> Acctually, jQuery 1.0 and up can handle JSON for you. Try this out:
> 
> $.getJSON("file.php",function(r) {
>  alert(r.column1);
> });
> 
> No need for a plugin. ;)
> On 10/20/06, *Rey Bango* <[EMAIL PROTECTED] > 
> wrote:
> 
> Hi Chris,
> 
> You're not going to be able to manipulate a query like you would in
> AjaxCFC since AjaxCFC is a CF wrapper for DWR and hence, gives you
> access to CF functionality.
> 
> Return your query as a JSON packet using CFJSon
> (http://jehiah.com/projects/cfjson/) and then use the JSON plugin
> (http://mg.to/2006/01/25/json-for-jquery) to work with the data.
> 
> Rey...
> 
> cjordan wrote:
>  > I re-read this and thought I should maybe clarify my question. I
> need to
>  > return a query result set to the client side using Ajax. How does
> jQuery go
>  > about handling that? What's the simplest way of accomplishing
> this task.
>  >
>  > I know that with ajaxCFC I could return a query object from my
> ColdFusion
>  > function and it gave me a javascript structure (or object...
> whatever) that
>  > I could address really easily. How easy is this sort of thing in
> jQuery.
>  >
>  > Also, I gotta say for such an active list, I've posted three or
> four times,
>  > and only one bloke's even responded and that's because he and I knew
>  > eachother from a different list and were emailing off list.
>  >
>  > Can *anybody* help with this question?
>  >
>  > Thanks,
>  > Chris
>  >
>  > cjordan wrote:
>  >
>  >>Hi folks,
>  >>
>  >>I need to know if jQuery can return a query result set from an Ajax
>  >>call. What's the best way to do this?
>  >>
>  >>Chris
>  >>
>  >>___
>  >>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 mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Returning a query?

2006-10-20 Thread Aaron Heimlich
On 10/20/06, Matt Stith <[EMAIL PROTECTED]> wrote:
Acctually, jQuery 1.0 and up can handle JSON for you. Try this out:Ah. I knew $.getJSON was available before 1.0.2, just couldn't remember when.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Returning a query?

2006-10-20 Thread Rey Bango
Thanks Aaron!

Rey...

Aaron Heimlich wrote:
> On 10/20/06, *Rey Bango* <[EMAIL PROTECTED] > 
> wrote:
> 
> and then use the JSON plugin
> (http://mg.to/2006/01/25/json-for-jquery) to work with the data.
> 
> 
> 
> Or you could (as of 1.0.2, possibly a bit earlier) do
> 
> $.getJSON("file.php",function(r) {
>  alert(r);
> });
> 
> See the API docs  under "G" for more info
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

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


Re: [jQuery] Returning a query?

2006-10-20 Thread Rey Bango
Hi Matt,

Its the term used to identify a result set in ColdFusion. Its what a SQL 
query returns when ColdFusion executes a standard SQL query.

Rey...

Matt Stith wrote:
> I still really dont understand what you mean by a query.
> 
> On 10/20/06, *cjordan* <[EMAIL PROTECTED] > 
> wrote:
> 
> 
> I re-read this and thought I should maybe clarify my question. I need to
> return a query result set to the client side using Ajax. How does
> jQuery go
> about handling that? What's the simplest way of accomplishing this task.
> 
> I know that with ajaxCFC I could return a query object from my
> ColdFusion
> function and it gave me a javascript structure (or object...
> whatever) that
> I could address really easily. How easy is this sort of thing in jQuery.
> 
> Also, I gotta say for such an active list, I've posted three or four
> times,
> and only one bloke's even responded and that's because he and I knew
> eachother from a different list and were emailing off list.
> 
> Can *anybody* help with this question?
> 
> Thanks,
> Chris
> 
> cjordan wrote:
>  >
>  > Hi folks,
>  >
>  > I need to know if jQuery can return a query result set from an Ajax
>  > call. What's the best way to do this?
>  >
>  > Chris
>  >
>  > ___
>  > jQuery mailing list
>  > discuss@jquery.com 
>  > http://jquery.com/discuss/
>  >
>  >
> 
> --
> View this message in context:
> http://www.nabble.com/Returning-a-query--tf2483121.html#a6925033
> 
> 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/

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


Re: [jQuery] Returning a query?

2006-10-20 Thread Aaron Heimlich
On 10/20/06, Rey Bango <[EMAIL PROTECTED]> wrote:
and then use the JSON plugin(http://mg.to/2006/01/25/json-for-jquery) to work with the data.Or you could (as of 1.0.2, possibly a bit earlier) do
$.getJSON("file.php",function(r) { alert(r);});See the API docs under "G" for more info
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Returning a query?

2006-10-20 Thread Matt Stith
Acctually, jQuery 1.0 and up can handle JSON for you. Try this out:$.getJSON("file.php",function(r) { alert(r.column1);});No need for a plugin. ;)On 10/20/06, 
Rey Bango <[EMAIL PROTECTED]> wrote:
Hi Chris,You're not going to be able to manipulate a query like you would inAjaxCFC since AjaxCFC is a CF wrapper for DWR and hence, gives youaccess to CF functionality.Return your query as a JSON packet using CFJSon
(http://jehiah.com/projects/cfjson/) and then use the JSON plugin(http://mg.to/2006/01/25/json-for-jquery) to work with the data.
Rey...cjordan wrote:> I re-read this and thought I should maybe clarify my question. I need to> return a query result set to the client side using Ajax. How does jQuery go> about handling that? What's the simplest way of accomplishing this task.
>> I know that with ajaxCFC I could return a query object from my ColdFusion> function and it gave me a _javascript_ structure (or object... whatever) that> I could address really easily. How easy is this sort of thing in jQuery.
>> Also, I gotta say for such an active list, I've posted three or four times,> and only one bloke's even responded and that's because he and I knew> eachother from a different list and were emailing off list.
>> Can *anybody* help with this question?>> Thanks,> Chris>> cjordan wrote:>>>Hi folks,I need to know if jQuery can return a query result set from an Ajax
>>call. What's the best way to do this?Chris___>>jQuery mailing list>>
discuss@jquery.com>>http://jquery.com/discuss/>>___jQuery mailing list
discuss@jquery.comhttp://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Returning a query?

2006-10-20 Thread Matt Stith
Ohh i think i know what you mean, like a JSON object? For example, the server could respond:{"column1":"Some data","column2":"Some more data","column3":"Foobar"
}, Which you could then do this:$.get("file.php",function(r) { data = ""> alert(data.column1);});Is that what you mean?
On 10/20/06, cjordan <[EMAIL PROTECTED]> wrote:
Thanks for responding Matt. That's not quite what I'm looking for (I don'tthink)...when I was using ajaxCFC I could return a query object (a result set) and inreturn it gave me a _javascript_ object that represented the query as an array
of structures:   query[i].column1where query is the name of the variable that held the query returned from myColdFusion function.How do folks handle this now? Does it get the query as an array of structs
or something similar?Am I still missing something Matt?thanks,ChrisMatt Stith wrote:>> I think this is what your saying:>> $.get("file.php",function(r) {
>  alert(r);> });>> That will get the contents of "file.php", and show them in an alert> window.>> On 10/20/06, Christopher Jordan <
[EMAIL PROTECTED]> wrote:  Hi folks, I need to know if jQuery can return a query result set from an Ajax call.>> What's the best way to do this?>>
>> Chris ___>> jQuery mailing list>> discuss@jquery.com>> 
http://jquery.com/discuss/ ___> jQuery mailing list> discuss@jquery.com
> http://jquery.com/discuss/>>--View this message in context: http://www.nabble.com/Returning-a-query--tf2483121.html#a6925093
Sent from the JQuery mailing list archive at Nabble.com.___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Returning a query?

2006-10-20 Thread Rey Bango
Hi Chris,

You're not going to be able to manipulate a query like you would in 
AjaxCFC since AjaxCFC is a CF wrapper for DWR and hence, gives you 
access to CF functionality.

Return your query as a JSON packet using CFJSon 
(http://jehiah.com/projects/cfjson/) and then use the JSON plugin 
(http://mg.to/2006/01/25/json-for-jquery) to work with the data.

Rey...

cjordan wrote:
> I re-read this and thought I should maybe clarify my question. I need to
> return a query result set to the client side using Ajax. How does jQuery go
> about handling that? What's the simplest way of accomplishing this task.
> 
> I know that with ajaxCFC I could return a query object from my ColdFusion
> function and it gave me a javascript structure (or object... whatever) that
> I could address really easily. How easy is this sort of thing in jQuery.
> 
> Also, I gotta say for such an active list, I've posted three or four times,
> and only one bloke's even responded and that's because he and I knew
> eachother from a different list and were emailing off list.
> 
> Can *anybody* help with this question?
> 
> Thanks,
> Chris
> 
> cjordan wrote:
> 
>>Hi folks,
>>
>>I need to know if jQuery can return a query result set from an Ajax 
>>call. What's the best way to do this?
>>
>>Chris
>>
>>___
>>jQuery mailing list
>>discuss@jquery.com
>>http://jquery.com/discuss/
>>
>>
> 
> 

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


Re: [jQuery] Returning a query?

2006-10-20 Thread Matt Stith
I still really dont understand what you mean by a query.On 10/20/06, cjordan <[EMAIL PROTECTED]> wrote:
I re-read this and thought I should maybe clarify my question. I need toreturn a query result set to the client side using Ajax. How does jQuery go
about handling that? What's the simplest way of accomplishing this task.I know that with ajaxCFC I could return a query object from my ColdFusionfunction and it gave me a _javascript_ structure (or object... whatever) that
I could address really easily. How easy is this sort of thing in jQuery.Also, I gotta say for such an active list, I've posted three or four times,and only one bloke's even responded and that's because he and I knew
eachother from a different list and were emailing off list.Can *anybody* help with this question?Thanks,Chriscjordan wrote:>> Hi folks,>> I need to know if jQuery can return a query result set from an Ajax
> call. What's the best way to do this?>> Chris>> ___> jQuery mailing list> discuss@jquery.com
> http://jquery.com/discuss/>>--View this message in context: http://www.nabble.com/Returning-a-query--tf2483121.html#a6925033
Sent from the JQuery mailing list archive at Nabble.com.___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Returning a query?

2006-10-20 Thread cjordan

Thanks for responding Matt. That's not quite what I'm looking for (I don't
think)...
when I was using ajaxCFC I could return a query object (a result set) and in
return it gave me a javascript object that represented the query as an array
of structures:

   query[i].column1

where query is the name of the variable that held the query returned from my
ColdFusion function.

How do folks handle this now? Does it get the query as an array of structs
or something similar?

Am I still missing something Matt?

thanks,
Chris



Matt Stith wrote:
> 
> I think this is what your saying:
> 
> $.get("file.php",function(r) {
>  alert(r);
> });
> 
> That will get the contents of "file.php", and show them in an alert
> window.
> 
> On 10/20/06, Christopher Jordan <[EMAIL PROTECTED]> wrote:
>>
>>  Hi folks,
>>
>> I need to know if jQuery can return a query result set from an Ajax call.
>> What's the best way to do this?
>>
>> Chris
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
>>
>>
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Returning-a-query--tf2483121.html#a6925093
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Returning a query?

2006-10-20 Thread cjordan

I re-read this and thought I should maybe clarify my question. I need to
return a query result set to the client side using Ajax. How does jQuery go
about handling that? What's the simplest way of accomplishing this task.

I know that with ajaxCFC I could return a query object from my ColdFusion
function and it gave me a javascript structure (or object... whatever) that
I could address really easily. How easy is this sort of thing in jQuery.

Also, I gotta say for such an active list, I've posted three or four times,
and only one bloke's even responded and that's because he and I knew
eachother from a different list and were emailing off list.

Can *anybody* help with this question?

Thanks,
Chris

cjordan wrote:
> 
> Hi folks,
> 
> I need to know if jQuery can return a query result set from an Ajax 
> call. What's the best way to do this?
> 
> Chris
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Returning-a-query--tf2483121.html#a6925033
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Returning a query?

2006-10-20 Thread Matt Stith
I think this is what your saying:$.get("file.php",function(r) { alert(r);});That will get the contents of "file.php", and show them in an alert window.
On 10/20/06, Christopher Jordan <[EMAIL PROTECTED]> wrote:



  


Hi folks,

I need to know if jQuery can return a query result set from an Ajax
call. What's the best way to do this?

Chris




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


Re: [jQuery] jQuery Events

2006-10-20 Thread Adam van den Hoven
Klaus

Generally, I agree with you with the following caveat. On PPK's site
(http://www.quirksmode.org/js/events_properties.html) he points out a
problem with safari where events get triggered on text nodes instead
of elements. I am hesitant to do

if (e.target.nodeType == 3) { // defeat Safari bug
   e.target = e.target.parentNode;
}

as I don't know whether or not some strange side effects might occur.
I suspect not, but I was being cautious.

A

On 10/20/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > fix: function(event) {
> >   if ( event ) {
> >   if( !event.preventDefault ) {
> >   event.preventDefault = function() {
> >   this.returnValue = false;
> >   };
> >   }
> >   if( !event.stopPropagation ) {
> >   event.stopPropagation = function() {
> >   this.cancelBubble = true;
> >   };
> >   }
> >   /*Taken from PPK:
> >   http://www.quirksmode.org/js/events_properties.html
> >   */
> >   var targ;
> >   if (event.target) {
> >   targ = event.target;
> >   }
> >   else if( event.srcElement ) {
> >   targ = event.srcElement;
> >   }
> >   if (targ.nodeType == 3) { // defeat Safari bug
> >   targ = targ.parentNode;
> >   }
> >   event.realTarget = targ;
> >   }
> >   return event;
> > }
> >
> > Now, I haven't actually tested this so there's bound to be a bug
> > somewhere in that code but you get the general idea.
> >
>
>
> Hi Adam,
>
> interesting, I was talking about normalizing the target property quite
> recently as well.
>
> I also think that e.target should be fixed. But I wouldn't use a new
> variable targ for that, instead simply attach target to e in IE:
>
> if (e.srcElement) e.target = e.srcElement;
>
> First I wasn't sure if that would break existing scripts that rely on
> the as-is state. But as most scripts go like this:
>
> var evTarget = e.target || e.srcElement;
>
> that would still work out fine.
>
>
> John or Jörn, shouldn't that be added to the event fix? And maybe the
> two or three other properties that are different from each other?
>
>
> -- Klaus
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] All top level elements within an element...

2006-10-20 Thread Tom Holder
That's great... it makes me feel nice.ThanksOn 10/20/06, John Resig <[EMAIL PROTECTED]> wrote:
> Can I take it one step further and only attach it to direct children?> e.g the  gets left out (and any other sub sub elements).
Yep - $("#foo > *") only grabs direct children (which is what youwant). If you want to grab all descendants (children and children ofchildren and children of children of children, etc.) then you would
do: $("#foo *")> P.S. JQuery rocks... you're a god. You might actually be the god. ;)LOL... I just like to help out - glad you're enjoying jQuery.--John___
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/-- Tom Holder
Managing DirectorAtom Software Ltdt: 01722 770001f: 0117 923 9922
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Returning a query?

2006-10-20 Thread Christopher Jordan




Hi folks,

I need to know if jQuery can return a query result set from an Ajax
call. What's the best way to do this?

Chris



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


Re: [jQuery] All top level elements within an element...

2006-10-20 Thread John Resig
> Can I take it one step further and only attach it to direct children?
> e.g the  gets left out (and any other sub sub elements).

Yep - $("#foo > *") only grabs direct children (which is what you
want). If you want to grab all descendants (children and children of
children and children of children of children, etc.) then you would
do: $("#foo *")

> P.S. JQuery rocks... you're a god. You might actually be the god. ;)

LOL... I just like to help out - glad you're enjoying jQuery.

--John

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


Re: [jQuery] All top level elements within an element...

2006-10-20 Thread Tom Holder
Hi John,Thanks so much for the quick response. That works a treat.Can I take it one step further and only attach it to direct children? e.g the  gets left out (and any other sub sub elements).
TomP.S. JQuery rocks... you're a god. You might actually be the god. ;)On 10/20/06, John Resig <[EMAIL PROTECTED]
> wrote:Something like this:$("#wrapper > *").hover( ... );
The > lets you select all child elements, which is what you want. Enjoy!--John> How can I attach the hover event to all elements in another element?>> For example:>> 
> Hello> Test hello> >> I want to add the .hover event to  and  within the > id="wrapper">. The amount of elements could obviously change.
___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
-- Tom HolderManaging DirectorAtom Software Ltdt: 01722 770001f: 0117 923 9922
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] mouse gestures?

2006-10-20 Thread Matt Stith
Yeah, YUI uses tons and tons of code, i think it was around half a meg!On 10/20/06, Dan Atkinson <[EMAIL PROTECTED]
> wrote:That looks like it determines the position of the mouse on the page on
mouseDown, and then has a look on mouseUp and does a calculation with atolerance for minute movements.I'm guessing it's that simple, because you can trick it by holding the mousebutton down (keeping it still) but moving the page up or down with the
cursor.Either way, the amount of script needed for this seems excessive (unlessthat's normal for YUI  :-S ).Armand Datema wrote:>> just found another example>> YUI this time
>> http://blog.davglass.com/files/yui/gestures/>> On 10/2/06, Dan Atkinson <[EMAIL PROTECTED]
> wrote: http://www.xs4all.nl/~peterned/>> Armand Datema wrote:>> >>> > there was a good script once that used mouse gestures
>> >>> > it was from a dutch guy his site was called peterned  but i couldnt>> > find it back anymore>> >>> > Armand>> >>> > Armand Datema
>> > CTO SchwingSoft>> >>> -->> View this message in context:>> http://www.nabble.com/mouse-gestures--tf2359444.html#a6604702
>> Sent from the JQuery mailing list archive at Nabble.com.>> ___>> jQuery mailing list
>> discuss@jquery.com>> http://jquery.com/discuss/> --> Armand Datema> CTO SchwingSoft
>> ___> jQuery mailing list> discuss@jquery.com> http://jquery.com/discuss/
>>--View this message in context: http://www.nabble.com/mouse-gestures--tf2359444.html#a6912269Sent from the JQuery mailing list archive at 
Nabble.com.___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] All top level elements within an element...

2006-10-20 Thread John Resig
Something like this:

$("#wrapper > *").hover( ... );

The > lets you select all child elements, which is what you want. Enjoy!

--John

> How can I attach the hover event to all elements in another element?
>
> For example:
>
> 
> Hello
> Test hello
> 
>
> I want to add the .hover event to  and  within the  id="wrapper">. The amount of elements could obviously change.

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


[jQuery] Non-Destructive jQuery

2006-10-20 Thread John Resig
Hi Everyone -

There's been some rabble-rousing concerning the destructive nature of
jQuery (it's ok, rousing is a good thing ;-)). I claimed that it'd be
easy to have it exist as a plugin. Well, it took me all of 10 minutes,
but here it is:

jQuery.fn._pushStack = jQuery.fn.pushStack;

jQuery.fn.pushStack = function(){
var ret = jQuery.fn._pushStack.apply( jQuery(this), arguments );
ret.prevObject = this;
return ret;
};

jQuery.fn.end = function(){
return this.prevObject || jQuery([]);
};

You can see a demo (requires Firebug) here:
http://john.jquery.com/jquery/test/destruct.html

So, if the destructive nature of jQuery bothers you - and you can't
wait for jQuery 2.0, then just stick the above code in the header of
your site (after jQuery) and you'll be good to go. Enjoy!

--John

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


[jQuery] All top level elements within an element...

2006-10-20 Thread Tom Holder
Hi Guys,How can I attach the hover event to all elements in another element?For example:        Hello    Test hello
    I want to add the .hover event to  and  within the . The amount of elements could obviously change.Thanks-- 
Tom HolderManaging DirectorAtom Software Ltdt: 01722 770001f: 0117 923 9922
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Internal workings of jquery

2006-10-20 Thread Dave Methvin

>>> I am trying to figure out how jQuery works internally. There is a 
>>> stack maintained within jQuery but why does jQuery change the 'this' 
>>> array of objects? why not just pass back the modified array when 
>>> using things like find?
>>
>> The stack allows to revert to older states. Check the documentation 
>> for end(), that explains it better.
>
> Yeh, I got that, but when you try to use a jquery object twice in a 
> chain it doens't work...
>
>  $('div').each(
>$('div').find('img').hide();
>$('div').find('img').show();
>  );
> Wouldn't it just be easier to pass back the this (instead of changing
> in the jquery object itself)?

Well, that makes three votes this week.

Right now, jQuery methods change the original object and return that or
chaining.

If you wanted to experiment with returning a fresh jQuery object rather than
changing the original, and I think John is considering it, it seems like the
change would be localized to pushStack. I have no idea what the other
implications are, but this passes the test suite. Did I get this right?

pushStack: function(a,args) {
var fn = args && args[args.length-1];
var fn2 = args && args[args.length-2];

if ( fn && fn.constructor != Function ) fn = null;
if ( fn2 && fn2.constructor != Function ) fn2 = null;

if ( !fn ) {
var fresh = new jQuery(this);
fresh.stack = [ this.get() ];
fresh.get( a );
return fresh;
}

// function(s) specified, stay with existing object
var old = this.get();
this.get( a );  // just temporary
if ( fn2 && a.length || !fn2 )
this.each( fn2 || fn ).get( old );
else
this.get( old ).each( fn );
return this;
}


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


Re: [jQuery] jQuery Events

2006-10-20 Thread Klaus Hartl

> fix: function(event) {
>   if ( event ) {
>   if( !event.preventDefault ) {
>   event.preventDefault = function() {
>   this.returnValue = false;
>   };
>   }
>   if( !event.stopPropagation ) {
>   event.stopPropagation = function() {
>   this.cancelBubble = true;
>   };
>   }
>   /*Taken from PPK:
>   http://www.quirksmode.org/js/events_properties.html
>   */
>   var targ;
>   if (event.target) {
>   targ = event.target;
>   }
>   else if( event.srcElement ) {
>   targ = event.srcElement;
>   }
>   if (targ.nodeType == 3) { // defeat Safari bug
>   targ = targ.parentNode; 
>   }
>   event.realTarget = targ;
>   }
>   return event;
> }
> 
> Now, I haven't actually tested this so there's bound to be a bug
> somewhere in that code but you get the general idea.
> 


Hi Adam,

interesting, I was talking about normalizing the target property quite 
recently as well.

I also think that e.target should be fixed. But I wouldn't use a new 
variable targ for that, instead simply attach target to e in IE:

if (e.srcElement) e.target = e.srcElement;

First I wasn't sure if that would break existing scripts that rely on 
the as-is state. But as most scripts go like this:

var evTarget = e.target || e.srcElement;

that would still work out fine.


John or Jörn, shouldn't that be added to the event fix? And maybe the 
two or three other properties that are different from each other?


-- Klaus

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


[jQuery] Image Cropping

2006-10-20 Thread mrkris
Hi list,

New to jquery and javascript in general and have to say, jquery has 
helped me a lot in my projects. Unfortunately, at this moment, I need an 
image cropping tool and have seen it done in javascript before and am 
wondering if any of you have done it with jquery. If so, mind giving me 
a bit of information on how I can do it, or a link to a plugin?

Thanks,

mrkris

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


Re: [jQuery] Problems with JQuery

2006-10-20 Thread Adam van den Hoven
On 10/19/06, Dave Methvin <[EMAIL PROTECTED]> wrote:
> That's an interesting idea. Since $ has been done to death, perhaps it could
> use a trailing underscore? I think that's the only remaining special
> character left. Alternatively, it could use a trailing capital letter like X
> to indicate it changed the object.

How about $('foo').destroFind()   ;)

Thanks for the help... I'd be happy to help with the documentation,
I'm just not entirely sure how I can contribute.

Adam

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


[jQuery] jQuery Events

2006-10-20 Thread Adam van den Hoven
I was working with the event model and I noticed that while some steps
are taken to "fix" the IE event object some of the cross browser
inconsistancies, it doesn't fix all of them. It doesn't even fix the
most annoying inconsistancies, namely the target and/or srcElement is
not unified. Is there any reason for this?

I was nosing around PPK's quirksmode site, as I frequently do, and I
realized that some of his event stuff could be integrated into jQuery
(taken from a snippet of jQuery code):

handle: function(event) {
if ( typeof jQuery == "undefined" ) return;

event = jQuery.event.fix( event || window.event );

// If no correct event was found, fail
if ( !event ) return;

var returnValue = true;

var c = this.events[event.type];

var args = [].slice.call( arguments, 1 );
args.unshift( event );

for ( var j in c ) {
if ( c[j].apply( this, args ) === false ) {
event.preventDefault();
event.stopPropagation();
returnValue = false;
}
}

return returnValue;
},

fix: function(event) {
if ( event ) {
if( !event.preventDefault ) {
event.preventDefault = function() {
this.returnValue = false;
};
}
if( !event.stopPropagation ) {
event.stopPropagation = function() {
this.cancelBubble = true;
};
}
/*Taken from PPK:
http://www.quirksmode.org/js/events_properties.html
*/
var targ;
if (event.target) {
targ = event.target;
}
else if( event.srcElement ) {
targ = event.srcElement;
}
if (targ.nodeType == 3) { // defeat Safari bug
targ = targ.parentNode; 
}
event.realTarget = targ;
}
return event;
}

Now, I haven't actually tested this so there's bound to be a bug
somewhere in that code but you get the general idea.

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Giuliano Marcangelo
Klaus,this mod is a "must have" for any site IMHO, so many uses, so easy to usetruly excellentGiuliano
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Internal workings of jquery

2006-10-20 Thread John Resig
> Wouldn't it just be easier to pass back the this (instead of changing in
> the jquery object itself)?

Unfortunately, with the way jQuery was structured originally, it
worked best to have the stack work in this way. It would definitely be
best if it didn't modify the original object - however, a change of
that magnatude is going to have to wait until jQuery 2.0 (or a plugin
for 1.x). I'll see if I can get something working in a plugin form.

--John

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


Re: [jQuery] Possible IE7 fadeOut bug

2006-10-20 Thread Brandon Aaron
A link would be most helpful in trying to find a solution. Would it be
possible to post a link?

--
Brandon Aaron

On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> Interesting - .css returned a function value, but .animate was
> undefined. I'm pretty sure the animation module is in there, though,
> as it's working in FF, and indeed (checking) FF returns the expected
> function.
>
> On 10/20/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > Could you also try doing an alert(clickBlock.css) and 
> > alert(clickBlock.animate)?
> >
> > Thanks
> >
> > --
> > Brandon Aaron
> >
> > On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > > On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > > > I forgot to say that if you uncomment the alert, it gives "undefined" 
> > > > in IE7.
> > > >
> > > alert should read alert(clickBlock.fadeOut); // no 'this'
> > >
> > > > On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > > > > Hi
> > > > >
> > > > > I have a problem where fadeOut is undefined in IE7 (final), but
> > > > > working fine in Firefox (2.0RC3).
> > > > >
> > > > > The relevant code is:
> > > > > //alert(this.clickBlock.fadeOut);
> > > > > clickBlock.fadeOut("slow", function() {
> > > > >  $(this).remove();
> > > > > });
> > > > >
> > > > > clickBlock is a regular  jQuery object defined earlier by
> > > > >
> > > > > clickBlock = $(document.createElement("div")).id("block");
> > > > >
> > > > > I originally had clickBlock.remove(); here and it worked just fine.
> > > > >
> > > > > Can't check in IE6 at present, so don't know if it only affects IE7.
> > > > >
> > > > > If someone can confirm this as a bug, I'll file a bug report.
> > > > >
> > > > > --
> > > > > Chris Ovenden
> > > > >
> > > > > http://thepeer.blogspot.com
> > > > > "Imagine all the people / Sharing all the world"
> > > > >
> > > >
> > > >
> > > > --
> > > > Chris Ovenden
> > > >
> > > > http://thepeer.blogspot.com
> > > > "Imagine all the people / Sharing all the world"
> > > >
> > >
> > >
> > > --
> > > Chris Ovenden
> > >
> > > http://thepeer.blogspot.com
> > > "Imagine all the people / Sharing all the world"
> > >
> > > ___
> > > jQuery mailing list
> > > discuss@jquery.com
> > > http://jquery.com/discuss/
> > >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
> --
> Chris Ovenden
>
> http://thepeer.blogspot.com
> "Imagine all the people / Sharing all the world"
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Klaus Hartl
Jörn Zaefferer schrieb:
> nice to see a new release.
>> * Here is an overview of the settings that can be passed in inside the 
>> object literal (shown values are default values):
>>
>> {
>>  fxFade: null,
>>  fxSlide: null,
>>  fxShow: null,
>>  fxHide: null,
>>  fxSpeed: 'normal',
>>  fxShowSpeed: null,
>>  fxHideSpeed: null,
>>  fxAutoheight: false,
>>  callback: null,
>>  selectedTabClass: 'selected',
>>  hiddenTabContainerClass: 'tabs-hide'
>> }
>>   
> Talking about verbosity, isn't fxFade and fxSlide and fxShow and fxHide 
> somewhat verbose?

Jörn, I think not. If I've had that documented already you would know 
why not :-)

Usage is as follows:

fxSlide: true
fxFade: true

This is meant to define the same animation for opening (slideDown) and 
closing a tab (slideUp) in the shortest possible way. Both can be combined.

fxHide and fxShow on the other hand is for passing in your own custom 
animation:

fxShow: {height: show}

That way you can have an animation for showing a new tab but no 
animation for closing. Or vice versa. Or two different animations. 
Because of that I also added the possibility to pass in different speeds 
(fxShowSpeed, fxHideSpeed). If not defined they default to fxSpeed which 
defaults to 'normal'.

Note that fxFade/fxSlide overrule custom animation. I did that to not 
add to much overhead. Shouldn't be a problem if documented.

So next maybe I can add an additional element for styling purposes ;-)


> Another, more important thing, consider this:
> $('#container').tabs().bind('tabChange', function() {
>   // do stuff on every tab change, just like 'callback' above
> }).bindOnce('tabChange', function() {
>  // do stuff only on the first tab change
> });
> 
> Inside your plugin code, you would somewhere use this:
> containerReference.trigger('tabChange');
> 
> Actually, there is no bindOnce (oook!), but there is still hope.
> 
> jQuery already has a nice event handling system, why not just use it for 
> custom events?

I already tried that with my new history/hijax plugin. But I had the 
need to pass in the 'e' object, which isn't possible in trigger...

I needed e.clientX to distinguish between a true click and a triggered 
click event. Maybe someone has an alternative idea for that?


-- Klaus




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


Re: [jQuery] Internal workings of jquery

2006-10-20 Thread Abdur-Rahman Advany
Yeh, I got that, but when you try to use a jquery object twice in a 
chain it doens't work...

$('div').each(
  $('div').find('img').hide();
  $('div').find('img').show();
);

Wouldn't it just be easier to pass back the this (instead of changing in 
the jquery object itself)?

Jörn Zaefferer wrote:
> Abdur-Rahman Advany schrieb:
>   
>> Hi guys,
>>
>> I am trying to figure out how jQuery works internally. There is a stack 
>> maintained within jQuery but why does jQuery change the 'this' array of 
>> objects? why not just pass back the modified array when using things 
>> like find?
>>   
>> 
> The stack allows to revert to older states. Check the documentation for 
> end(), that explains it better.
>
> -- Jörn
>   
>> Abdul
>>
>> ___
>> 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] Possible IE7 fadeOut bug

2006-10-20 Thread Chris Ovenden
Interesting - .css returned a function value, but .animate was
undefined. I'm pretty sure the animation module is in there, though,
as it's working in FF, and indeed (checking) FF returns the expected
function.

On 10/20/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> Could you also try doing an alert(clickBlock.css) and 
> alert(clickBlock.animate)?
>
> Thanks
>
> --
> Brandon Aaron
>
> On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > > I forgot to say that if you uncomment the alert, it gives "undefined" in 
> > > IE7.
> > >
> > alert should read alert(clickBlock.fadeOut); // no 'this'
> >
> > > On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > > > Hi
> > > >
> > > > I have a problem where fadeOut is undefined in IE7 (final), but
> > > > working fine in Firefox (2.0RC3).
> > > >
> > > > The relevant code is:
> > > > //alert(this.clickBlock.fadeOut);
> > > > clickBlock.fadeOut("slow", function() {
> > > >  $(this).remove();
> > > > });
> > > >
> > > > clickBlock is a regular  jQuery object defined earlier by
> > > >
> > > > clickBlock = $(document.createElement("div")).id("block");
> > > >
> > > > I originally had clickBlock.remove(); here and it worked just fine.
> > > >
> > > > Can't check in IE6 at present, so don't know if it only affects IE7.
> > > >
> > > > If someone can confirm this as a bug, I'll file a bug report.
> > > >
> > > > --
> > > > Chris Ovenden
> > > >
> > > > http://thepeer.blogspot.com
> > > > "Imagine all the people / Sharing all the world"
> > > >
> > >
> > >
> > > --
> > > Chris Ovenden
> > >
> > > http://thepeer.blogspot.com
> > > "Imagine all the people / Sharing all the world"
> > >
> >
> >
> > --
> > Chris Ovenden
> >
> > http://thepeer.blogspot.com
> > "Imagine all the people / Sharing all the world"
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Klaus Hartl
John Resig schrieb:
> Hi Mike -
> 
>> What I meant was, as an "official" plugin are you required to play by
>> the same rules as jQuery itself where API changes are reserved for
>> major releases?
> 
> Until a specific plugin is physically bundled with jQuery directly -
> then you're free to run your own versioning and make your own API
> changes.
> 
> Honestly, for the forms and tabs plugins, there shouldn't be many
> features removed (since people are actively using them), but adding
> features is still "fair game" (IMO).

Sure! The change I made is really only a little one and won't even break 
existing scripts, except for not showing the correct initial tab and the 
first one instead.

For that reason I will add documentation soon, so that developers won't 
  get headache over that.

Sooner or later that usage is deprecated anyway, because whenever you 
want to highlight a certain tab, you just need to put the appropriate 
hash into the url of the page.


-- Klaus

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


Re: [jQuery] Internal workings of jquery

2006-10-20 Thread Jörn Zaefferer
Abdur-Rahman Advany schrieb:
> Hi guys,
>
> I am trying to figure out how jQuery works internally. There is a stack 
> maintained within jQuery but why does jQuery change the 'this' array of 
> objects? why not just pass back the modified array when using things 
> like find?
>   
The stack allows to revert to older states. Check the documentation for 
end(), that explains it better.

-- Jörn
> Abdul
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>   


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


Re: [jQuery] Sorting (not tables)

2006-10-20 Thread Jörn Zaefferer
Erik Beeson schrieb:
> Without the appendTo, the items aren't removed, but they aren't
> reordered either. This is something about the 'adding items in a
> different order replaces the old version' DOM feature, isn't it?
>   
Without appendTo, only the jQuery object should be sorted. So far the 
DOM itself isn't modified. It gets modified as soon as you use appendTo.

-- Jörn

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


[jQuery] window.opener and $('#el_id').load

2006-10-20 Thread Jeremy Bratton
I've started using jQuery in an existing web app and am having some trouble.
The app uses a javascript date selector - click on the little calendar image
and a popup opens; click on the date and it sets a text box value in the
main window then closes itself. 

In between updating the text box and closing the popup, I have added a call
to a function defined in the main window (i.e. setTextBox(v);
window.opener.updateFunc(); window.close; ). updateFunc() updates a select
input in the main window based on the selected date - basically just
$('#selector').load(page, params). This works as expected when manually
typing an address into the box - it's just wired to the text box's change
event. With the popup, updateFunc is called with correct arguments (verified
via alerts), but the load doesn't actually happen. Any ideas why? Any work
arounds?

I first expected that the calendar popup setting the text box value would
trigger the box's change event, but it doesn't.

Thanks,

Jeremy Bratton
Application Developer
Big River Telephone Company, LLC
800.455.1608 x103
573.651.3373 x103
[EMAIL PROTECTED] 


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


Re: [jQuery] Possible IE7 fadeOut bug

2006-10-20 Thread Brandon Aaron
Could you also try doing an alert(clickBlock.css) and alert(clickBlock.animate)?

Thanks

--
Brandon Aaron

On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > I forgot to say that if you uncomment the alert, it gives "undefined" in 
> > IE7.
> >
> alert should read alert(clickBlock.fadeOut); // no 'this'
>
> > On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > > Hi
> > >
> > > I have a problem where fadeOut is undefined in IE7 (final), but
> > > working fine in Firefox (2.0RC3).
> > >
> > > The relevant code is:
> > > //alert(this.clickBlock.fadeOut);
> > > clickBlock.fadeOut("slow", function() {
> > >  $(this).remove();
> > > });
> > >
> > > clickBlock is a regular  jQuery object defined earlier by
> > >
> > > clickBlock = $(document.createElement("div")).id("block");
> > >
> > > I originally had clickBlock.remove(); here and it worked just fine.
> > >
> > > Can't check in IE6 at present, so don't know if it only affects IE7.
> > >
> > > If someone can confirm this as a bug, I'll file a bug report.
> > >
> > > --
> > > Chris Ovenden
> > >
> > > http://thepeer.blogspot.com
> > > "Imagine all the people / Sharing all the world"
> > >
> >
> >
> > --
> > Chris Ovenden
> >
> > http://thepeer.blogspot.com
> > "Imagine all the people / Sharing all the world"
> >
>
>
> --
> Chris Ovenden
>
> http://thepeer.blogspot.com
> "Imagine all the people / Sharing all the world"
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] method/plugin for getting query string vars?

2006-10-20 Thread Luke Lutman
Yup, that makes sense :-)

Luke

Jörn Zaefferer wrote:
> Luke Lutman schrieb:
>> I was thinking of something a little fancier ;-)
>>
>> jQuery.query = function() {
>>  var r = {};
>>  var q = location.search;
>>  q = q.replace(/^\?/,''); // remove the leading ?
>>  q = q.replace(/\&$/,''); // remove the trailing &
>>  jQuery.each(q.split('&'), function(){
>>  var key = this.split('=')[0];
>>  var val = this.split('=')[1];
>>  // convert floats
>>  if(/^[0-9.]+$/.test(val))
>>  val = parseFloat(val);
>>  // ingnore empty values
>>  if(val)
>>  r[key] = val;
>>  });
>>  return r;
>> };
>>
>> Then you could use it like so:
>>
>> http://www.bork.com?foo=helloworld&bar=0.333&;
>>
>> $.query()['foo']; // helloworld (string)
>> $.query()['bar']; // 0.333 (number)
>>   
> In that case, you should just assign the result to jQuery.query, eg:
> (function() {
> 
>   jQuery.query = r = {};
>   var q = location.search;
>   q = q.replace(/^\?/,''); // remove the leading ?
>   q = q.replace(/\&$/,''); // remove the trailing &
>   jQuery.each(q.split('&'), function(){
>   var key = this.split('=')[0];
>   var val = this.split('=')[1];
>   // convert floats
>   if(/^[0-9.]+$/.test(val))
>   val = parseFloat(val);
>   // ingnore empty values
>   if(val)
>   r[key] = val;
>   });
> 
> })();
> 
> Considering that location.search does not change. I hope I'm not 
> confusing something.
> 
> -- Jörn
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


-- 
zinc Roe Design
www.zincroe.com
(647) 477-6016

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Sean O

Klaus,


Great job on the Tabs plugin.

One suggestion on semantics... I'd consider renaming the fxAutoheight
setting.  As it stands now, setting this to be True causes all tab heights
to be constant (the height of the tallest tab).  Whereas, set to "false",
the height adjusts *automatically* to the size of the current tab's content. 
This can be confusing.

It should also be CamelCase for consistency... "fxTallestHeight" perhaps?


SEAN O



Klaus Hartl wrote:
> 
> Hi jQuerians,
> 
> I worked on the tabs plugin, did some clean up and changed the "API" a 
> little bit, so that I call it v2.0 now:
> 
> * to pass in the initial tab to start with you no longer specify it with 
> an "on" option. Instead you pass the number as first parameter to the 
> tabs() function (that's the way it was in the beginning and I found 
> passing in the initial tab as {on: 2} a little too verbose):
> 
> $(...).tabs(2);
> $(...).tabs(2, {
>  // options
> });
> 
> No index but options works fine as well:
> $(...).tabs({
>  // options
> });
> 
> 
> * The plugin uses the proposed method to initialize settings:
> 
> settings = jQuery.extend({
>  ...
> }, settings || {});
> 
> * I made the class name for the currently selected tab configurable via 
> settings (default is now .selected)
> 
> * I removed conditional compilation and replaced it with 
> jQuery.browser.msie checks. That means the plugin is now packable.
> 
> Therefore the ant build file contains a task 'pack_tabs' that creates a 
> packed version in the dist folder...
> 
> * Here is an overview of the settings that can be passed in inside the 
> object literal (shown values are default values):
> 
> {
>  fxFade: null,
>  fxSlide: null,
>  fxShow: null,
>  fxHide: null,
>  fxSpeed: 'normal',
>  fxShowSpeed: null,
>  fxHideSpeed: null,
>  fxAutoheight: false,
>  callback: null,
>  selectedTabClass: 'selected',
>  hiddenTabContainerClass: 'tabs-hide'
> }
> 
> I promise to add some useful inline documentation soon (finally).
> 
> 
> * I am too still working on the history plugin and if both plugins are 
> used together back/forward button will be enabled for the tabs (work in 
> progress).
> 
> 
> Cheers!
> 
> 
> Klaus
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tabs-plugin-2.0-tf2481044.html#a6921215
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Possible IE7 fadeOut bug

2006-10-20 Thread Chris Ovenden
On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> I forgot to say that if you uncomment the alert, it gives "undefined" in IE7.
>
alert should read alert(clickBlock.fadeOut); // no 'this'

> On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I have a problem where fadeOut is undefined in IE7 (final), but
> > working fine in Firefox (2.0RC3).
> >
> > The relevant code is:
> > //alert(this.clickBlock.fadeOut);
> > clickBlock.fadeOut("slow", function() {
> >  $(this).remove();
> > });
> >
> > clickBlock is a regular  jQuery object defined earlier by
> >
> > clickBlock = $(document.createElement("div")).id("block");
> >
> > I originally had clickBlock.remove(); here and it worked just fine.
> >
> > Can't check in IE6 at present, so don't know if it only affects IE7.
> >
> > If someone can confirm this as a bug, I'll file a bug report.
> >
> > --
> > Chris Ovenden
> >
> > http://thepeer.blogspot.com
> > "Imagine all the people / Sharing all the world"
> >
>
>
> --
> Chris Ovenden
>
> http://thepeer.blogspot.com
> "Imagine all the people / Sharing all the world"
>


-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"

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


Re: [jQuery] method/plugin for getting query string vars?

2006-10-20 Thread Jörn Zaefferer
Luke Lutman schrieb:
> I was thinking of something a little fancier ;-)
>
> jQuery.query = function() {
>   var r = {};
>   var q = location.search;
>   q = q.replace(/^\?/,''); // remove the leading ?
>   q = q.replace(/\&$/,''); // remove the trailing &
>   jQuery.each(q.split('&'), function(){
>   var key = this.split('=')[0];
>   var val = this.split('=')[1];
>   // convert floats
>   if(/^[0-9.]+$/.test(val))
>   val = parseFloat(val);
>   // ingnore empty values
>   if(val)
>   r[key] = val;
>   });
>   return r;
> };
>
> Then you could use it like so:
>
> http://www.bork.com?foo=helloworld&bar=0.333&;
>
> $.query()['foo']; // helloworld (string)
> $.query()['bar']; // 0.333 (number)
>   
In that case, you should just assign the result to jQuery.query, eg:
(function() {

jQuery.query = r = {};
var q = location.search;
q = q.replace(/^\?/,''); // remove the leading ?
q = q.replace(/\&$/,''); // remove the trailing &
jQuery.each(q.split('&'), function(){
var key = this.split('=')[0];
var val = this.split('=')[1];
// convert floats
if(/^[0-9.]+$/.test(val))
val = parseFloat(val);
// ingnore empty values
if(val)
r[key] = val;
});

})();

Considering that location.search does not change. I hope I'm not 
confusing something.

-- Jörn

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


Re: [jQuery] jQuery Kinda Plugin: every

2006-10-20 Thread Michael Geary
> jQuery.fn.extend({
> every: function(interval,id,fn) {
> return this.each(function() {
> var self = this;
> interval = jQuery.speed(interval);
> if (fn == undefined) {
> fn = id;
> id = interval;
> }
> if (!this.timers) this.timers = {};
> if (!this.timers[id]) this.timers[id] = [];
> this.timers[id].push(window.setInterval(function() {
> fn.call(self);
> },interval));
> });
> },
> doin: function(interval,id,fn) {
> return this.each(function() {
> var self = this, counter = 0;
> interval = jQuery.speed(interval);
> if (fn == undefined) {
> fn = id;
> id = interval;
> }
> if (!this.timers) this.timers = {};
> if (!this.timers[id]) this.timers[id] = [];
> this.timers[id].push(window.setInterval(function() {
> if (counter++ >= 1) return jQuery(self).stop(id);
> fn.call(self);
> },interval));
> });
> },
> stop: function(id) {
> return this.each(function() {
> if (!this.timers) return;
> if (id == undefined)
> jQuery.each(this.timers, function(i) {
> jQuery.each(this,function(j) {
> window.clearInterval(this);
> });
> });
> else if (this.timers[id])
> jQuery.each(this.timers[id],function(i) {
> window.clearInterval(this);
> });
> });
> }
> });

You can simplify that code quite a bit. every() and doin() are nearly
identical, so they can both call a common implementation. Ditto for the two
inner loops in stop().

(function( $ ) {
function every(thing,interval,id,fn,counter) {
return thing.each(function() {
var self = this;
interval = $.speed(interval);
if (fn == undefined) {
fn = id;
id = interval;
}
if (!self.timers) self.timers = {};
if (!self.timers[id]) self.timers[id] = [];
self.timers[id].push(window.setInterval(function() {
if (counter != undefined && counter++ >= 1)
return $(self).stop(id);
fn.call(self);
},interval));
});
}

$.fn.extend({
every: function(interval,id,fn) {
return every(this,interval,id,fn);
},
doin: function(interval,id,fn) {
return every(this,interval,id,fn,0);
},
stop: function(id) {
function clear(array) {
if (array) $.each(array,function() {
window.clearInterval(this);
});
}

return this.each(function() {
if (!this.timers) return;
if (id == undefined)
$.each(this.timers, function() { clear(this); });
else
clear(this.timers[id]);
});
}
});
})( jQuery );

Since I was moving the whole thing inside a function to get a local scope
for the every() helper, that gave me a chance to rename jQuery as $. This is
a matter of taste, of course, but I like being able to write plugin code the
same way as ordinary jQuery code, using $.

If you really wanted to get fancy, you could replace this bit of code:

if (!self.timers) self.timers = {};
if (!self.timers[id]) self.timers[id] = [];
self.timers[id].push(...

with this:

var timers = self.timers = self.timers || {};
( timers[id] = timers[id] || [] ).push(...

One last thing - in the inner function inside every(), I changed the uses of
"this" to "self", because there's a "var self = this;" at the top of the
function. I think it helps readability to only use "self" after a "var self
= this;" instead of mixing "this" and "self".

The code is untested, but should work the same as the original unless I
goofed. :-)

-Mike


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


Re: [jQuery] Possible IE7 fadeOut bug

2006-10-20 Thread Chris Ovenden
I forgot to say that if you uncomment the alert, it gives "undefined" in IE7.

On 10/20/06, Chris Ovenden <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a problem where fadeOut is undefined in IE7 (final), but
> working fine in Firefox (2.0RC3).
>
> The relevant code is:
> //alert(this.clickBlock.fadeOut);
> clickBlock.fadeOut("slow", function() {
>  $(this).remove();
> });
>
> clickBlock is a regular  jQuery object defined earlier by
>
> clickBlock = $(document.createElement("div")).id("block");
>
> I originally had clickBlock.remove(); here and it worked just fine.
>
> Can't check in IE6 at present, so don't know if it only affects IE7.
>
> If someone can confirm this as a bug, I'll file a bug report.
>
> --
> Chris Ovenden
>
> http://thepeer.blogspot.com
> "Imagine all the people / Sharing all the world"
>


-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"

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


[jQuery] Possible IE7 fadeOut bug

2006-10-20 Thread Chris Ovenden
Hi

I have a problem where fadeOut is undefined in IE7 (final), but
working fine in Firefox (2.0RC3).

The relevant code is:
//alert(this.clickBlock.fadeOut);
clickBlock.fadeOut("slow", function() {
 $(this).remove();
});

clickBlock is a regular  jQuery object defined earlier by

clickBlock = $(document.createElement("div")).id("block");

I originally had clickBlock.remove(); here and it worked just fine.

Can't check in IE6 at present, so don't know if it only affects IE7.

If someone can confirm this as a bug, I'll file a bug report.

-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"

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


Re: [jQuery] method/plugin for getting query string vars?

2006-10-20 Thread Luke Lutman
I was thinking of something a little fancier ;-)

jQuery.query = function() {
var r = {};
var q = location.search;
q = q.replace(/^\?/,''); // remove the leading ?
q = q.replace(/\&$/,''); // remove the trailing &
jQuery.each(q.split('&'), function(){
var key = this.split('=')[0];
var val = this.split('=')[1];
// convert floats
if(/^[0-9.]+$/.test(val))
val = parseFloat(val);
// ingnore empty values
if(val)
r[key] = val;
});
return r;
};

Then you could use it like so:

http://www.bork.com?foo=helloworld&bar=0.333&;

$.query()['foo']; // helloworld (string)
$.query()['bar']; // 0.333 (number)



Luke


Sam Collett wrote:
> On 20/10/06, Luke Lutman <[EMAIL PROTECTED]> wrote:
>> Is there a jQuery method or plugin for parsing the browser's query string 
>> into an object?
>>
>> I looked through the api and did a bit of searching around, but no luck ...
>>
>> Thanks,
>> Luke
>>
>> --
>> zinc Roe Design
>> www.zincroe.com
>> (647) 477-6016
> 
> 
> You don't need jQuery for that. You can get the query string by using
> 'location.search'.
> 
> if(location.search.length !=0)
> {
> // create an array
> var qs = location.search.substr(1).split("&");
> // get first parameter value
> alert(qs[0].split("=")[1]);
> }
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


-- 
zinc Roe Design
www.zincroe.com
(647) 477-6016

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Jörn Zaefferer
Hi Klaus,

nice to see a new release.
> * Here is an overview of the settings that can be passed in inside the 
> object literal (shown values are default values):
>
> {
>  fxFade: null,
>  fxSlide: null,
>  fxShow: null,
>  fxHide: null,
>  fxSpeed: 'normal',
>  fxShowSpeed: null,
>  fxHideSpeed: null,
>  fxAutoheight: false,
>  callback: null,
>  selectedTabClass: 'selected',
>  hiddenTabContainerClass: 'tabs-hide'
> }
>   
Talking about verbosity, isn't fxFade and fxSlide and fxShow and fxHide 
somewhat verbose?

Another, more important thing, consider this:
$('#container').tabs().bind('tabChange', function() {
  // do stuff on every tab change, just like 'callback' above
}).bindOnce('tabChange', function() {
 // do stuff only on the first tab change
});

Inside your plugin code, you would somewhere use this:
containerReference.trigger('tabChange');

Actually, there is no bindOnce (oook!), but there is still hope.

jQuery already has a nice event handling system, why not just use it for 
custom events?

-- Jörn

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread John Resig
Hi Mike -

> What I meant was, as an "official" plugin are you required to play by
> the same rules as jQuery itself where API changes are reserved for
> major releases?

Until a specific plugin is physically bundled with jQuery directly -
then you're free to run your own versioning and make your own API
changes.

Honestly, for the forms and tabs plugins, there shouldn't be many
features removed (since people are actively using them), but adding
features is still "fair game" (IMO).

Let me know if this makes sense.

--John

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Rey Bango
My pleasure. It works beautifully in FF 1.5.0.7 and looks awesome. I 
definitely want to use the plugin.

I'll test it in IE 6 later via another PC.

Rey...

> Hi Rey, I know what you're talking about. It's because I want to have 
> the tabs bookmarkable. Therefore the hash in the URL changes and that 
> causes the page to jump. I thought I had fixed that, but apparently IE7 
> does behave differently as IE6 does.
> 
> Will have a look into it... Thanks for the catch!
> 
> 
> -- Klaus
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

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


Re: [jQuery] IE 7 & Windows Update

2006-10-20 Thread Rey Bango
Thanks for the info!

Rey...

[EMAIL PROTECTED] wrote:
> According to the IE Blog (http://blogs.msdn.com/ie/) timestamped Thursday, 
> October 19, 2006 8:56 AM:
> 
> "To help you become more secure and up-to-date, we will distribute IE7 via 
> Automatic Updates as a high-priority update. We will start very soon with 
> those of you who are already running IE7 pre-releases and then move onto IE6 
> users after a few weeks. We will progressively roll out to all IE6 users over 
> a few months, so don’t be surprised if you don’t see the update right away."
> 
> 
>  -- Original message --
> From: Rey Bango <[EMAIL PROTECTED]>
> 
>>>I just did that and it didn't give me IE7 as an update. I think it must only
>>>offer the update for people with IE7 beta/RC already installed. I would test
>>>that hypothesis but I manually upgraded my only IE7 beta on another system
>>>yesterday.
>>
>>I think you're right. I haven't checked my IE6 PC yet but will do it 
>>after lunchtime to verify.
>>
>>Rey
>>
>>___
>>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] method/plugin for getting query string vars?

2006-10-20 Thread Sam Collett
On 20/10/06, Luke Lutman <[EMAIL PROTECTED]> wrote:
> Is there a jQuery method or plugin for parsing the browser's query string 
> into an object?
>
> I looked through the api and did a bit of searching around, but no luck ...
>
> Thanks,
> Luke
>
> --
> zinc Roe Design
> www.zincroe.com
> (647) 477-6016


You don't need jQuery for that. You can get the query string by using
'location.search'.

if(location.search.length !=0)
{
// create an array
var qs = location.search.substr(1).split("&");
// get first parameter value
alert(qs[0].split("=")[1]);
}

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


Re: [jQuery] IE 7 & Windows Update

2006-10-20 Thread kscholl . jq
According to the IE Blog (http://blogs.msdn.com/ie/) timestamped Thursday, 
October 19, 2006 8:56 AM:

"To help you become more secure and up-to-date, we will distribute IE7 via 
Automatic Updates as a high-priority update. We will start very soon with those 
of you who are already running IE7 pre-releases and then move onto IE6 users 
after a few weeks. We will progressively roll out to all IE6 users over a few 
months, so don’t be surprised if you don’t see the update right away."


 -- Original message --
From: Rey Bango <[EMAIL PROTECTED]>
> > I just did that and it didn't give me IE7 as an update. I think it must only
> > offer the update for people with IE7 beta/RC already installed. I would test
> > that hypothesis but I manually upgraded my only IE7 beta on another system
> > yesterday.
> 
> I think you're right. I haven't checked my IE6 PC yet but will do it 
> after lunchtime to verify.
> 
> Rey
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/



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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Klaus Hartl


Rey Bango schrieb:
> Some feedback on this. In IE7 final, there's some odd behavior. When I 
> click on a tab, the page shoots up and then resets itself to its 
> original position. Here's what I mean by this.
> 
> Say that that I'm looking at the section of your demo page that says 
> "Slide and Fade Effect Combined" and that section is at about the center 
> of the page (vertically). What seems to be happening is that the div 
> containing the tabs (tabs labeled Section 13-15) will be brought up to 
> the very top of the viewable section and then put back into place.
> 
> I hope that explains what I'm seeing.
> 
> Rey...


Hi Rey, I know what you're talking about. It's because I want to have 
the tabs bookmarkable. Therefore the hash in the URL changes and that 
causes the page to jump. I thought I had fixed that, but apparently IE7 
does behave differently as IE6 does.

Will have a look into it... Thanks for the catch!


-- Klaus

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Klaus Hartl
Mike Alsup schrieb:
>> I use the latter to keep tabs compatible with jQuery < 1.03.
> 
> What I meant was, as an "official" plugin are you required to play by
> the same rules as jQuery itself where API changes are reserved for
> major releases?

Not sure if it is called official at all. People asked me to put the 
plugin into SVN and I found that reasonable.

Thoughts anyone else? I'm not that experienced with versioning... :)

Why I was calling it v2 was 1. because of the change that has impact on 
existing prior versions and 2. because I think it the plugin is quite 
mature now.


-- Klaus

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Rey Bango
Some feedback on this. In IE7 final, there's some odd behavior. When I 
click on a tab, the page shoots up and then resets itself to its 
original position. Here's what I mean by this.

Say that that I'm looking at the section of your demo page that says 
"Slide and Fade Effect Combined" and that section is at about the center 
of the page (vertically). What seems to be happening is that the div 
containing the tabs (tabs labeled Section 13-15) will be brought up to 
the very top of the viewable section and then put back into place.

I hope that explains what I'm seeing.

Rey...


Klaus Hartl wrote:
> Hi jQuerians,
> 
> I worked on the tabs plugin, did some clean up and changed the "API" a 
> little bit, so that I call it v2.0 now:
> 
> * to pass in the initial tab to start with you no longer specify it with 
> an "on" option. Instead you pass the number as first parameter to the 
> tabs() function (that's the way it was in the beginning and I found 
> passing in the initial tab as {on: 2} a little too verbose):
> 
> $(...).tabs(2);
> $(...).tabs(2, {
>  // options
> });
> 
> No index but options works fine as well:
> $(...).tabs({
>  // options
> });
> 
> 
> * The plugin uses the proposed method to initialize settings:
> 
> settings = jQuery.extend({
>  ...
> }, settings || {});
> 
> * I made the class name for the currently selected tab configurable via 
> settings (default is now .selected)
> 
> * I removed conditional compilation and replaced it with 
> jQuery.browser.msie checks. That means the plugin is now packable.
> 
> Therefore the ant build file contains a task 'pack_tabs' that creates a 
> packed version in the dist folder...
> 
> * Here is an overview of the settings that can be passed in inside the 
> object literal (shown values are default values):
> 
> {
>  fxFade: null,
>  fxSlide: null,
>  fxShow: null,
>  fxHide: null,
>  fxSpeed: 'normal',
>  fxShowSpeed: null,
>  fxHideSpeed: null,
>  fxAutoheight: false,
>  callback: null,
>  selectedTabClass: 'selected',
>  hiddenTabContainerClass: 'tabs-hide'
> }
> 
> I promise to add some useful inline documentation soon (finally).
> 
> 
> * I am too still working on the history plugin and if both plugins are 
> used together back/forward button will be enabled for the tabs (work in 
> progress).
> 
> 
> Cheers!
> 
> 
> Klaus
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Mike Alsup
> I use the latter to keep tabs compatible with jQuery < 1.03.

What I meant was, as an "official" plugin are you required to play by
the same rules as jQuery itself where API changes are reserved for
major releases?

Mike

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Rey Bango
> Sorry Rey, here's the link:
> http://stilbuero.de/jquery/tabs :)

I knew you'd come through. You da man. ;)

Rey

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Klaus Hartl
Mike Alsup schrieb:
> Hi Klaus,
> 
> Great stuff with the tabs plugin.
> 
> I was wondering about these 2.0 changes.  Are you going to check this
> in to svn?  I've reworked the form plugin to use the preferred
> "options" model too but I don't know what to do with it now since
> we're still in a 1.0.3 release cycle .  Do we hold off checking API
> changes in?  Make it available elsewhere?  Anyone have thoughts on how
> to best manage this?


Hi Mike,

I have already comitted the changes to svn! Tabs should work with 1.03, 
if you're referring to the following regarding the API changes:

$.extend({

}, settings);

or

$.extend({

}, settings || {});

I use the latter to keep tabs compatible with jQuery < 1.03.


Sorry Rey, here's the link:
http://stilbuero.de/jquery/tabs :)


-- Klaus






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


Re: [jQuery] IE 7 & Windows Update

2006-10-20 Thread Rey Bango
> I just did that and it didn't give me IE7 as an update. I think it must only
> offer the update for people with IE7 beta/RC already installed. I would test
> that hypothesis but I manually upgraded my only IE7 beta on another system
> yesterday.

I think you're right. I haven't checked my IE6 PC yet but will do it 
after lunchtime to verify.

Rey

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


[jQuery] method/plugin for getting query string vars?

2006-10-20 Thread Luke Lutman
Is there a jQuery method or plugin for parsing the browser's query string into 
an object?

I looked through the api and did a bit of searching around, but no luck ...

Thanks,
Luke

-- 
zinc Roe Design
www.zincroe.com
(647) 477-6016

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Mike Alsup
Hi Klaus,

Great stuff with the tabs plugin.

I was wondering about these 2.0 changes.  Are you going to check this
in to svn?  I've reworked the form plugin to use the preferred
"options" model too but I don't know what to do with it now since
we're still in a 1.0.3 release cycle .  Do we hold off checking API
changes in?  Make it available elsewhere?  Anyone have thoughts on how
to best manage this?

Mike

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


Re: [jQuery] Tabs plugin 2.0

2006-10-20 Thread Rey Bango
What, no link?!?! You're slacking, Klaus! ;o)

Klaus Hartl wrote:
> Hi jQuerians,
> 
> I worked on the tabs plugin, did some clean up and changed the "API" a 
> little bit, so that I call it v2.0 now:
> 
> * to pass in the initial tab to start with you no longer specify it with 
> an "on" option. Instead you pass the number as first parameter to the 
> tabs() function (that's the way it was in the beginning and I found 
> passing in the initial tab as {on: 2} a little too verbose):
> 
> $(...).tabs(2);
> $(...).tabs(2, {
>  // options
> });
> 
> No index but options works fine as well:
> $(...).tabs({
>  // options
> });
> 
> 
> * The plugin uses the proposed method to initialize settings:
> 
> settings = jQuery.extend({
>  ...
> }, settings || {});
> 
> * I made the class name for the currently selected tab configurable via 
> settings (default is now .selected)
> 
> * I removed conditional compilation and replaced it with 
> jQuery.browser.msie checks. That means the plugin is now packable.
> 
> Therefore the ant build file contains a task 'pack_tabs' that creates a 
> packed version in the dist folder...
> 
> * Here is an overview of the settings that can be passed in inside the 
> object literal (shown values are default values):
> 
> {
>  fxFade: null,
>  fxSlide: null,
>  fxShow: null,
>  fxHide: null,
>  fxSpeed: 'normal',
>  fxShowSpeed: null,
>  fxHideSpeed: null,
>  fxAutoheight: false,
>  callback: null,
>  selectedTabClass: 'selected',
>  hiddenTabContainerClass: 'tabs-hide'
> }
> 
> I promise to add some useful inline documentation soon (finally).
> 
> 
> * I am too still working on the history plugin and if both plugins are 
> used together back/forward button will be enabled for the tabs (work in 
> progress).
> 
> 
> Cheers!
> 
> 
> Klaus
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

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


Re: [jQuery] IE 7 & Windows Update

2006-10-20 Thread Dave Methvin
>>> I'm sure most everyone knows by now that IE 7 has been officially 
>>> released but I just wanted to ensure that everyone knows that last 
>>> night, MS began pushing out IE 7 via Windows Update.
>> 
>> Whoa, are you sure about that? Microsoft said just yesterday that it 
>> wouldn't happen until November:
>>
http://blogs.msdn.com/ie/archive/2006/10/19/be-ready-for-automatic-update-di
stribution-of-ie7-by-november-1.aspx
>>  
>> Did you have the beta installed? Maybe that would trigger it.
>
> Yep, I updated my IE7 RC1 to the full release via Windows Update just
> last night. I don't know if the beta triggered it. I'll look on one of my
> other PCs thats running IE6 to see if IE7 is available via Windows
> Update. If anything, if you're using IE6, just run Windows Update
> and see if the option to upgrade shows up.

I just did that and it didn't give me IE7 as an update. I think it must only
offer the update for people with IE7 beta/RC already installed. I would test
that hypothesis but I manually upgraded my only IE7 beta on another system
yesterday.


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


Re: [jQuery] IE 7 & Windows Update

2006-10-20 Thread Rey Bango
Hi Dave,

Yep, I updated my IE7 RC1 to the full release via Windows Update just 
last night. I don't know if the beta triggered it. I'll look on one of 
my other PCs thats running IE6 to see if IE7 is available via Windows 
Update. If anything, if you're using IE6, just run Windows Update and 
see if the option to upgrade shows up.

Rey...

Dave Methvin wrote:
>>I'm sure most everyone knows by now that IE 7 has been officially
>>released but I just wanted to ensure that everyone knows that
>>last night, MS began pushing out IE 7 via Windows Update.
>>I received an update notification via the automatic updates option
>>so I'm sure a ton of other people did as well and upgraded shortly
>>thereafter.
> 
> 
> Whoa, are you sure about that? Microsoft said just yesterday that it
> wouldn't happen until November:
> http://blogs.msdn.com/ie/archive/2006/10/19/be-ready-for-automatic-update-di
> stribution-of-ie7-by-november-1.aspx
>  
> Did you have the beta installed? Maybe that would trigger it.
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

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


[jQuery] Tabs plugin 2.0

2006-10-20 Thread Klaus Hartl
Hi jQuerians,

I worked on the tabs plugin, did some clean up and changed the "API" a 
little bit, so that I call it v2.0 now:

* to pass in the initial tab to start with you no longer specify it with 
an "on" option. Instead you pass the number as first parameter to the 
tabs() function (that's the way it was in the beginning and I found 
passing in the initial tab as {on: 2} a little too verbose):

$(...).tabs(2);
$(...).tabs(2, {
 // options
});

No index but options works fine as well:
$(...).tabs({
 // options
});


* The plugin uses the proposed method to initialize settings:

settings = jQuery.extend({
 ...
}, settings || {});

* I made the class name for the currently selected tab configurable via 
settings (default is now .selected)

* I removed conditional compilation and replaced it with 
jQuery.browser.msie checks. That means the plugin is now packable.

Therefore the ant build file contains a task 'pack_tabs' that creates a 
packed version in the dist folder...

* Here is an overview of the settings that can be passed in inside the 
object literal (shown values are default values):

{
 fxFade: null,
 fxSlide: null,
 fxShow: null,
 fxHide: null,
 fxSpeed: 'normal',
 fxShowSpeed: null,
 fxHideSpeed: null,
 fxAutoheight: false,
 callback: null,
 selectedTabClass: 'selected',
 hiddenTabContainerClass: 'tabs-hide'
}

I promise to add some useful inline documentation soon (finally).


* I am too still working on the history plugin and if both plugins are 
used together back/forward button will be enabled for the tabs (work in 
progress).


Cheers!


Klaus





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


Re: [jQuery] difference between IE and Firefox

2006-10-20 Thread Antonio Castaldi
sorry. I've just read the bug http://jquery.com/dev/bugs/bug/164/


2006/10/20, Antonio Castaldi <[EMAIL PROTECTED]>:
> Hi at all,
>
> this is the page :
>
> 
> 
> bug
> 
> 
> function getTestXml(str) {
> if (typeof DOMParser == "undefined") {
> DOMParser = function () {}
>
> DOMParser.prototype.parseFromString = 
> function (str, contentType) {
> if (typeof ActiveXObject != "undefined") {
> var d = new 
> ActiveXObject("MSXML.DomDocument");
> d.loadXML(str);
> return d;
> } else if (typeof XMLHttpRequest != 
> "undefined") {
> var req = new XMLHttpRequest;
> req.open("GET", "data:" + 
> (contentType || "application/xml") +
>  ";charset=utf-8," + encodeURIComponent(str), 
> false);
> if (req.overrideMimeType) {
> req.overrideMimeType(contentType);
> }
> req.send(null);
> return req.responseXML;
> }
> }
> }
> return (new DOMParser()).parseFromString(str, 
> "text/xml");
> }
>
>
> //jquery test
> $(document).ready(function() {
> var xml = getTestXml(' version="1.0"?>mondaysunday');
> $("day", xml).each(function(i){
> $("p:last").after('

'+ > $(this).text() + '

'); > }); > }); > > > > week : > > > > naturally I'm interesting about behaviour of the code under "jquery test". > It works perfectly on FireFox but an error occurred on Internet > explorer = (method unsupported by object) on "text()". > > can you help me ? > > thanks. > > -- > My personal site www.totoworld.org > -- My personal site www.totoworld.org ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

[jQuery] difference between IE and Firefox

2006-10-20 Thread Antonio Castaldi
Hi at all,

this is the page :



bug


function getTestXml(str) {
if (typeof DOMParser == "undefined") {
DOMParser = function () {}

DOMParser.prototype.parseFromString = function 
(str, contentType) {
if (typeof ActiveXObject != "undefined") {
var d = new 
ActiveXObject("MSXML.DomDocument");
d.loadXML(str);
return d;
} else if (typeof XMLHttpRequest != 
"undefined") {
var req = new XMLHttpRequest;
req.open("GET", "data:" + (contentType 
|| "application/xml") +
 ";charset=utf-8," + encodeURIComponent(str), 
false);
if (req.overrideMimeType) {
req.overrideMimeType(contentType);
}
req.send(null);
return req.responseXML;
}
}
}
return (new DOMParser()).parseFromString(str, 
"text/xml");  
}


//jquery test
$(document).ready(function() {
var xml = getTestXml('mondaysunday');
$("day", xml).each(function(i){
$("p:last").after('

'+ $(this).text() + '

'); }); }); week : naturally I'm interesting about behaviour of the code under "jquery test". It works perfectly on FireFox but an error occurred on Internet explorer = (method unsupported by object) on "text()". can you help me ? thanks. -- My personal site www.totoworld.org ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] IE 7 & Windows Update

2006-10-20 Thread Dave Methvin
> I'm sure most everyone knows by now that IE 7 has been officially
> released but I just wanted to ensure that everyone knows that
> last night, MS began pushing out IE 7 via Windows Update.
> I received an update notification via the automatic updates option
> so I'm sure a ton of other people did as well and upgraded shortly
> thereafter.

Whoa, are you sure about that? Microsoft said just yesterday that it
wouldn't happen until November:
http://blogs.msdn.com/ie/archive/2006/10/19/be-ready-for-automatic-update-di
stribution-of-ie7-by-november-1.aspx
 
Did you have the beta installed? Maybe that would trigger it.


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


  1   2   >