[jQuery] Re: My first tutorial: jQuery Rollovers

2007-09-27 Thread Marshall Salinger





Looking good Glen. I like the shadow text technique that you use. I
first noticed it on your Intuit work that you did a while back. It's a
neat trick.

-Marshall

Glen Lipka wrote:
Started some
demos, but got sleepy. :(
  I am halfway through a
imageSprite menu.
  But for now, this is what I
gots.
  http://commadot.com/jquery/hover.php
  
  
  Glen
  
  On 9/27/07, Glen Lipka
   <[EMAIL PROTECTED]>
wrote:
  Consider possibly using hover:

$("p").hover(function(){

 
$(this).addClass("hover");
},function(){

 
$(this).removeClass("hover");
});


This could be implemented
in a number of ways.  I find the foreground image-sprite to be the
easiest to maintain and not prone to flicker.  It also allows you to
use HTML for the text (if desired) which helps with search engine
optimization.  I could help whip up a sample if you would like.


I think the tutorial
itself, however, was clear and easy to follow.  Well written! :)


Glen



On 9/27/07, 
AJ <
[EMAIL PROTECTED]> wrote:

Guys,
  
I've decided to try my hand at some basic tutorials. The first is for
  
basic reusable image rollovers for navbars, etc.
  
You can find it here:
  http://www.atlantajones.com/2007/09/27/easy-reusable-image-rollovers-with-jquery/
  
  
Any comments, suggestions or tips for making it better would be much
appreciated!
  
AJ
  




  
  
  






[jQuery] Re: My first tutorial: jQuery Rollovers

2007-09-27 Thread Glen Lipka
Started some demos, but got sleepy. :(
I am halfway through a imageSprite menu.
But for now, this is what I gots.
http://commadot.com/jquery/hover.php

Glen

On 9/27/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
>
> Consider possibly using hover:
>
> $("p").hover(function(){
>   $(this).addClass("hover");
> },function(){
>   $(this).removeClass("hover");
> });
>
> This could be implemented in a number of ways.  I find the foreground
> image-sprite to be the easiest to maintain and not prone to flicker.  It
> also allows you to use HTML for the text (if desired) which helps with
> search engine optimization.  I could help whip up a sample if you would
> like.
>
> I think the tutorial itself, however, was clear and easy to follow.  Well
> written! :)
>
> Glen
>
>
> On 9/27/07, AJ < [EMAIL PROTECTED]> wrote:
> >
> >
> > Guys,
> >
> > I've decided to try my hand at some basic tutorials. The first is for
> > basic reusable image rollovers for navbars, etc.
> >
> > You can find it here:
> > http://www.atlantajones.com/2007/09/27/easy-reusable-image-rollovers-with-jquery/
> >
> >
> > Any comments, suggestions or tips for making it better would be much
> > appreciated!
> >
> > AJ
> >
> >
>


[jQuery] Re: Problem with jQuery.unique( array )

2007-09-27 Thread Richard D. Worth
It looks like $.unique(array) is only working for arrays of objects at the
moment, which does look like a bug. I've created a ticket:

http://dev.jquery.com/ticket/1747

The ticket has a patch attached including unit tests and a possible fix.

- Richard

On 9/27/07, Sparticat <[EMAIL PROTECTED]> wrote:
>
>
>
> Whenever I try to use the $.unique() function it just returns the array
> without removing the duplicates.
>
> $.unique([0,1,1,2,2,3]);  returns [0,1,1,2,2,3] instead of [0,1,2,3] as
> described at: http://docs.jquery.com/Utilities/jQuery.unique#array
>
> Is this a bug or am I missing something?
>
> I'm currently using jQuery 1.2
> --
> View this message in context:
> http://www.nabble.com/Problem-with-jQuery.unique%28-array-%29-tf4529331s15494.html#a12924415
> Sent from the JQuery mailing list archive at Nabble.com.
>
>


[jQuery] Re: My first tutorial: jQuery Rollovers

2007-09-27 Thread Glen Lipka
Consider possibly using hover:

$("p").hover(function(){
  $(this).addClass("hover");
},function(){
  $(this).removeClass("hover");
});

This could be implemented in a number of ways.  I find the foreground
image-sprite to be the easiest to maintain and not prone to flicker.  It
also allows you to use HTML for the text (if desired) which helps with
search engine optimization.  I could help whip up a sample if you would
like.

I think the tutorial itself, however, was clear and easy to follow.  Well
written! :)

Glen


On 9/27/07, AJ <[EMAIL PROTECTED]> wrote:
>
>
> Guys,
>
> I've decided to try my hand at some basic tutorials. The first is for
> basic reusable image rollovers for navbars, etc.
>
> You can find it here:
>
> http://www.atlantajones.com/2007/09/27/easy-reusable-image-rollovers-with-jquery/
>
> Any comments, suggestions or tips for making it better would be much
> appreciated!
>
> AJ
>
>


[jQuery] Re: OT Changing S=style sheet with javascript or jquery?

2007-09-27 Thread Erik Beeson
A google search for 'jQuery stylesheet switcher' turns up:

http://kelvinluck.com/article/switch-stylesheets-with-jquery

--Erik


On 9/27/07, Eridius <[EMAIL PROTECTED]> wrote:
>
>
>
>
> http://demo.sugarondemand.com/sugarcrm_os/index.php?action=index&module=Home
>
> if you click on the blocks of color at the top, i don't know if they are
> just change the css on the fly or completely loading a new css file.  Is
> it
> possible to load a different css file on the fly with javascript itself or
> with jquery easier?
> --
> View this message in context:
> http://www.nabble.com/OT-Changing-S%3Dstyle-sheet-with-javascript-or-jquery--tf4532015s15494.html#a12933318
> Sent from the JQuery mailing list archive at Nabble.com.
>
>


[jQuery] My first tutorial: jQuery Rollovers

2007-09-27 Thread AJ

Guys,

I've decided to try my hand at some basic tutorials. The first is for
basic reusable image rollovers for navbars, etc.

You can find it here:
http://www.atlantajones.com/2007/09/27/easy-reusable-image-rollovers-with-jquery/

Any comments, suggestions or tips for making it better would be much
appreciated!

AJ



[jQuery] Re: jCorner problem?

2007-09-27 Thread Mike Alsup
>
> Because of the nature of floats, I don't really see a universal
> solution.  Wrapping an element or changing its position naturally
> would have a great affect on layout.



I don't think this is a problem with floating the cornered div, but I
suspect it is related to the markup somehow (I haven't had time to look
closely).  My corner demo page uses floated divs for almost all of the
examples.  Is anyone having trouble with that page?

http://www.malsup.com/jquery/corner/

Mike


[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Brandon Aaron
Its all good! :)   I knew that ... no really I mean it! :p

--
Brandon Aaron

On 9/27/07, Michael Geary <[EMAIL PROTECTED]> wrote:
>
>  Man, that is some goofy text formatting. I wasn't using larger type for
> emphasis or to be shouting - it was just some kind of glitch that didn't
> show up in the outgoing message. I've seen it happen before, not sure what
> causes it.
>
> And Brandon, I hope that message didn't come across the wrong way. I was
> just having some fun with the concept of a return statement reaching back in
> time to affect code that had already executed. :-)
>
>  --
> *From:* Michael Geary
>  Um, Brandon, so what you're saying is that if you comment out the "return
> false;" in the first example below (making it the same as cmbtrx's code), it
> will fail to display the alert?
>
> Let's think about this...
>
> alert() is a blocking call. It opens the alert box immediately, and the
> function does not return until you close the box.
>
> Since the "return false;" is executed *after* the alert(), it seems
> unlikely that its presence or absence would affect something that's already
> happened. :-)
>
> The "return false;" does prevent the default action of following the link,
> as you mentioned.
>
> -Mike
>
>  --
> *From:* Brandon Aaron
> The click event on an A tag has a default action associated with it by the
> browser ... more specifically a redirect to the links href. You have to stop
> this default action in order to see your alert. There are two ways to do
> this.
>
> The first way: A click handler can return false to prevent the default
> (and stop propagation). To do this, your event handler would look like this:
>
> $("a").click(function(){
> alert("Thanks for visiting!");
> return false;
> });
>
> The second way: The event handler gets passed the event object as its
> first argument and the event object has a method to prevent the default
> behavior as well. You could also do the above like this:
>
> $("a").click(function(event){
> alert("Thanks for visiting!");
> event.preventDefault();
> });
>
> Hope that helps!
>
> --
> Brandon Aaron
>
>


[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Michael Geary
Man, that is some goofy text formatting. I wasn't using larger type for 
emphasis or to be shouting - it was just some kind of glitch
that didn't show up in the outgoing message. I've seen it happen before, not 
sure what causes it.
 
And Brandon, I hope that message didn't come across the wrong way. I was just 
having some fun with the concept of a return statement
reaching back in time to affect code that had already executed. :-)


  _  

From: Michael Geary

Um, Brandon, so what you're saying is that if you comment out the "return 
false;" in the first example below (making it the same as
cmbtrx's code), it will fail to display the alert?
 
Let's think about this...
 
alert() is a blocking call. It opens the alert box immediately, and the 
function does not return until you close the box.
 
Since the "return false;" is executed *after* the alert(), it seems unlikely 
that its presence or absence would affect something
that's already happened. :-)
 
The "return false;" does prevent the default action of following the link, as 
you mentioned.
 
-Mike



  _  

From: Brandon Aaron

The click event on an A tag has a default action associated with it by the 
browser ... more specifically a redirect to the links
href. You have to stop this default action in order to see your alert. There 
are two ways to do this. 

The first way: A click handler can return false to prevent the default (and 
stop propagation). To do this, your event handler would
look like this:

$("a").click(function(){
alert("Thanks for visiting!"); 
return false;
});

The second way: The event handler gets passed the event object as its first 
argument and the event object has a method to prevent
the default behavior as well. You could also do the above like this: 

$("a").click(function(event){
alert("Thanks for visiting!");
event.preventDefault();
});

Hope that helps!

--
Brandon Aaron



[jQuery] Re: functions after $.get work strange

2007-09-27 Thread Michael Geary

> Michael Geary wrote:
> > You're still expecting things to happen in the wrong order. 
> > It's *inside the callback* that the data becomes available, 
> > and this is long after isTracked() returns.

> From: [EMAIL PROTECTED]
> Yes, but I want have a function that will return what i get from
> istracked.php to use it like that:
> 
> function isTracked(...)
> {
>  $.get('istracked.php',...);
> return value_from_istrackedphp
> }
> //and then
> 
> if (isTracked(...)=='true')
>   //thing A
> else
>//thing B
> 

The only way to do that is to use a synchronous $.ajax call:

http://docs.jquery.com/Ajax/jQuery.ajax#options

But beware! This has the extremely negative effect of completely locking up the 
browser window - and all other browser windows in
many browsers - until your server returns the ajax data.

Do you want to do this this merely for coding convenience, or is there an 
actual reason that your code *has* to work this way? If
it's just for convenience, I strongly recommend using a callback function 
instead. But if there's a real need for it, the
synchronous $.ajax will do the trick.

-Mike



[jQuery] OT Changing S=style sheet with javascript or jquery?

2007-09-27 Thread Eridius


http://demo.sugarondemand.com/sugarcrm_os/index.php?action=index&module=Home

if you click on the blocks of color at the top, i don't know if they are
just change the css on the fly or completely loading a new css file.  Is it
possible to load a different css file on the fly with javascript itself or
with jquery easier?
-- 
View this message in context: 
http://www.nabble.com/OT-Changing-S%3Dstyle-sheet-with-javascript-or-jquery--tf4532015s15494.html#a12933318
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: jCorner problem?

2007-09-27 Thread polyrhythmic

On Sep 27, 1:23 pm, Guy Fraser <[EMAIL PROTECTED]> wrote:
> polyrhythmic wrote:
> > I've seen that happen to me before when running .corner() on a floated
> > element.  Cornertries to adapt properties from its parent from
> > the .cornerdivs, so if you have some css like #container div { float:
> > left; } the float will be applied to your .cornerdivs too, and bork
> > your layout.  Cornerworks better with absolute or relative-ly
> > positioned elements, consider wrapping the div you intend to .corner()
> > in another div.
>
> It would be ideal ifcornercould detect if the div is floated and
> accommodate :)

Because of the nature of floats, I don't really see a universal
solution.  Wrapping an element or changing its position naturally
would have a great affect on layout.  A different corner technique
would have to be used... and maybe one day we'll see border-radius
support in IE (it's already in khtml, webkit, gecko) but as long as
users are stuck on IE6 corner techniques will be a hack.  But yes, I
wish it could accommodate too.

Charles
doublerebel.com



[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Michael Geary
Um, Brandon, so what you're saying is that if you comment out the "return 
false;" in the first example below (making it the same as
cmbtrx's code), it will fail to display the alert?
 
Let's think about this...
 
alert() is a blocking call. It opens the alert box immediately, and the 
function does not return until you close the box.
 
Since the "return false;" is executed *after* the alert(), it seems unlikely 
that its presence or absence would affect something
that's already happened. :-)
 
The "return false;" does prevent the default action of following the link, as 
you mentioned.
 
-Mike



  _  

From: Brandon Aaron

The click event on an A tag has a default action associated with it by the 
browser ... more specifically a redirect to the links
href. You have to stop this default action in order to see your alert. There 
are two ways to do this. 

The first way: A click handler can return false to prevent the default (and 
stop propagation). To do this, your event handler would
look like this:

$("a").click(function(){
alert("Thanks for visiting!"); 
return false;
});

The second way: The event handler gets passed the event object as its first 
argument and the event object has a method to prevent
the default behavior as well. You could also do the above like this: 

$("a").click(function(event){
alert("Thanks for visiting!");
event.preventDefault();
});

Hope that helps!

--
Brandon Aaron



[jQuery] Re: functions after $.get work strange

2007-09-27 Thread Erik Beeson
As I said to you offlist, it doesn't work that way. The value from $.get CAN
NOT be returned from isTracked because isTracked will have returned before
the $.get callback executes. Instead of:

if(isTracked(code) == 'true') {
  // thing A
} else {
  //thing B
}

You have to do:

isTracked(code, function(tracked) {
  if(tracked == 'true') {
// thing A
  } else {
//thing B
  }
});

In JavaScript, there's only 1 thread of execution. There's no
multithreading, and no "waiting". If you want something to run, that isn't
ready to run right now, you have to use some sort of callback that can get
run when it is ready.

--Erik


On 9/27/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
>
>
>
> Michael Geary wrote:
> > You're still expecting things to happen in the wrong order. It's *inside
> the callback* that the data becomes available, and this is
> > long after isTracked() returns. Try this instead:
>
> Yes, but I want have a function that will return what i get from
> istracked.php
> to use it like that:
>
> function isTracked(...)
> {
> $.get('istracked.php',...);
> return value_from_istrackedphp
> }
> //and then
>
> if (isTracked(...)=='true')
>   //thing A
> else
>//thing B
>
> ---
> > var r;
> >
> > function isTracked(personcode, callback) {
> > $.get('trackstudent/istracked.php',{'personcode': personcode},
> callback);
> > }
> >
> > $(document).ready(function() {
> >
> > isTracked('10591891',function(data) {
> > r=data;
> > alert(r);
> > });
> >
> > });
> So in that case I dont have to use callback in isTracked.
> I can do the same thing in this way:
> function isTracked(personcode) {
> $.get('trackstudent/istracked.php',{'personcode': personcode},
> function(data) {
>  r=data;
>  alert(r);
>  });
> }
>
> and i still will have alert with proper value, but its not what I
> want.
> I want to get data from php file and return it from isTracked
> function. ( to do something like that: ...
> if (isTrackes(..)=='true'))
>
>
> Thanks
> Michael
>
>


[jQuery] Re: jQuery 1.1.2 + jQuery carousel, help appreciated. :-)

2007-09-27 Thread Steve Finkelstein

Apologies for replying to my own thread, but I'm getting closer on the "bug",

The callback function here is where the issue occurs:

function mycarousel_itemLoadCallback(carousel, state)
{
for (var i = carousel.first; i <= carousel.last; 
i++) {
if (carousel.has(i)) {
continue;
}

if (i > mycarousel_itemList.length) {
break;
}

// Create an object from HTML
var item =
jQuery(mycarousel_getItemHTML(mycarousel_itemList[i-1])).get(0);

// Apply thickbox
tb_init(item);

carousel.add(i, item);
}
};

Just from debugging that, on initial page load, only the first three
items are getting passed to tb_init();  I have to flicker through the
rest of the carousel for more images to get appended to tb_init. I
should probably remove tb_init from this callback construct and
execute it in an anonymous function which populates all of the images
in tb_init() unless someone has a more appropriate suggestion?

- sf

On 9/27/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> Thank you for peeking inside of my post. Anyhow, so I got a
> semi-functional carousel up at:
>
> http://devel.phpgeek.org/inventory/single/1
>
> My only issue here is, if you click on an image within the scroll
> wheel (but do not yet scroll through past the first three images...),
> you'll notice that within the inline popup div, you may only navigate
> through the first three photos.
>
> You can only receive links past the first three photos if you scroll
> them through the carousel first. I'm assuming something is not
> populating an array until this step is completed.
>
> If anyone can help me catch exactly where it is that I'm making the
> mistake, I'd really appreciate it. The source is viewable right within
> the page.
>
> Thank you kindly for any possible hints/clues as to how I can resolve this 
> bug.
>
> - sf
>


[jQuery] Re: functions after $.get work strange

2007-09-27 Thread [EMAIL PROTECTED]


Michael Geary wrote:
> You're still expecting things to happen in the wrong order. It's *inside the 
> callback* that the data becomes available, and this is
> long after isTracked() returns. Try this instead:

Yes, but I want have a function that will return what i get from
istracked.php
to use it like that:

function isTracked(...)
{
 $.get('istracked.php',...);
return value_from_istrackedphp
}
//and then

if (isTracked(...)=='true')
  //thing A
else
   //thing B

---
> var r;
>
> function isTracked(personcode, callback) {
> $.get('trackstudent/istracked.php',{'personcode': personcode}, 
> callback);
> }
>
> $(document).ready(function() {
>
> isTracked('10591891',function(data) {
> r=data;
> alert(r);
> });
>
> });
So in that case I dont have to use callback in isTracked.
I can do the same thing in this way:
function isTracked(personcode) {
$.get('trackstudent/istracked.php',{'personcode': personcode},
function(data) {
 r=data;
 alert(r);
 });
}

and i still will have alert with proper value, but its not what I
want.
I want to get data from php file and return it from isTracked
function. ( to do something like that: ...
if (isTrackes(..)=='true'))


Thanks
Michael



[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Michael Geary

> From: cmbtrx
> 
> Uh anyway sorry, the page itself is off-limits (per my client's
> request)...

Naw... You can always create a test case, without any of your client's code, 
and post it on a public server like
http://pages.google.com/ - this will make it a LOT easier for people to help 
you.

> ...but here's the code:
> 
>  "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> 
> test
> 
> 
> 
> 
> 
> 
> 
> $(document).ready(function(){
> 
>   $("a").click(function(){
>  alert("Thanks for visiting!");
>});
> 
> });
> 
> 
> 
> 
> http://jquery.com/";>jQuery
> 
> [more html...]
> 
> 
> So, if I understand this, clicking on the "jQuery" link above
> should...uhh, pop an alert right? Or is jQuery really not that simple?
> Or do I have a typo? Or am I in the wrong profession? (OK, don't
> answer that.)

Yes, that's how it should work.

Nothing jumps out at me that's obviously wrong with the code, but what have you 
tried so far in debugging it? If you haven't done
these, already, you should:

* Load the page with Firebug enabled to see if it logs any errors.

* Sprinkle the code with "console.log(123);" calls or "debugger;" statements so 
Firebug logs the messages or stops in the debugger,
to see what if any of your code is actually being executed.

* Use the Information/View JavaScript command in the Web Developer toolbar to 
see if jquery.js is actually being loaded.

Those are the kinds of things you need to do next. If nothing turns up, go get 
that Google Pages account set up and post a test
case.

-Mike



[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Brandon Aaron
Oh and here are the docs that apply:
http://docs.jquery.com/Events/bind#typedatafn

--
Brandon Aaron

On 9/27/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>
> The click event on an A tag has a default action associated with it by the
> browser ... more specifically a redirect to the links href. You have to stop
> this default action in order to see your alert. There are two ways to do
> this.
>
> The first way: A click handler can return false to prevent the default
> (and stop propagation). To do this, your event handler would look like this:
>
> $("a").click(function(){
> alert("Thanks for visiting!");
> return false;
> });
>
> The second way: The event handler gets passed the event object as its
> first argument and the event object has a method to prevent the default
> behavior as well. You could also do the above like this:
>
> $("a").click(function(event){
> alert("Thanks for visiting!");
> event.preventDefault();
> });
>
> Hope that helps!
>
> --
> Brandon Aaron
>
>
> On 9/27/07, cmbtrx < [EMAIL PROTECTED]> wrote:
> >
> >
> > lol, wow--I sure was peeved!
> >
> > Uh anyway sorry, the page itself is off-limits (per my client's
> > request), but here's the code:
> >
> >  > "-//W3C//DTD HTML 4.01//EN"
> > "http://www.w3.org/TR/html4/strict.dtd";>
> > http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> > 
> > test
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > $(document).ready(function(){
> >
> > $("a").click(function(){
> >alert("Thanks for visiting!");
> >  });
> >
> > });
> > 
> > 
> > 
> >
> > http://jquery.com/";>jQuery
> >
> > [more html...]
> >
> >
> > So, if I understand this, clicking on the "jQuery" link above
> > should...uhh, pop an alert right? Or is jQuery really not that simple?
> > Or do I have a typo? Or am I in the wrong profession? (OK, don't
> > answer that.)
> >
> > And thanks for the amazing display of patience, people! (most other
> > code forums would have had me tarred and feathered by now!)
> >
> >
> > On Sep 27, 11:44 am, cmbtrx <[EMAIL PROTECTED]> wrote:
> > > OK, forgive my tone here...I'm actually quite flabbergasted.
> > >
> > > I ***FINALLY*** get around to trying out jquery.
> > >
> > > Oh, I'm sure that quite obviously I'm doing something wrong, because
> > > after following the first few paragraphs of the "How JQuery Works"
> > > section (clicking a link launches an alert box...uh ok, no fine) it
> > > does absolutely nothing.
> > >
> > > Wow.
> > >
> > > So far the javascript skills required for testing this are sub-fetal
> > > so I can't imagine what black magic I might possibly have introduced
> > > into this 79Kb albatross.
> > >
> > > No, OK, I won't condemn it yet, but can somebody enlighten me?
> > >
> > > (I thought this would be easy.)
> >
> >
>


[jQuery] Re: Safari 2.0 crashes while executing http://jquery.com/test/

2007-09-27 Thread Brandon Aaron
Yes, it has to do with Safari's limited call stack and memory issues. In
other words, it can't handle such large amounts of js. I usually test each
module at a time in Safari.

--
Brandon Aaron

On 9/27/07, ravenel <[EMAIL PROTECTED]> wrote:
>
>
> Is this a known problem?
>
>


[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Richard D. Worth
On 9/27/07, cmbtrx <[EMAIL PROTECTED]> wrote:
>
>
> OK, forgive my tone here...I'm actually quite flabbergasted.
>
> I ***FINALLY*** get around to trying out jquery.
>
> Oh, I'm sure that quite obviously I'm doing something wrong, because
> after following the first few paragraphs of the "How JQuery Works"
> section (clicking a link launches an alert box...uh ok, no fine) it
> does absolutely nothing.


After following the first few paragraphs of

  http://docs.jquery.com/How_jQuery_Works

my page looks something like this:

  http://pastie.caboo.se/101553

This works for me. Perhaps you could compare what you have to mine and see
if you can find a significant difference. Or if mine works, use it as a
starting point. Good luck, and let us know how it turns out.

- Richard


[jQuery] jQuery 1.1.2 + jQuery carousel, help appreciated. :-)

2007-09-27 Thread Steve Finkelstein

Hi all!

Thank you for peeking inside of my post. Anyhow, so I got a
semi-functional carousel up at:

http://devel.phpgeek.org/inventory/single/1

My only issue here is, if you click on an image within the scroll
wheel (but do not yet scroll through past the first three images...),
you'll notice that within the inline popup div, you may only navigate
through the first three photos.

You can only receive links past the first three photos if you scroll
them through the carousel first. I'm assuming something is not
populating an array until this step is completed.

If anyone can help me catch exactly where it is that I'm making the
mistake, I'd really appreciate it. The source is viewable right within
the page.

Thank you kindly for any possible hints/clues as to how I can resolve this bug.

- sf


[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Brandon Aaron
The click event on an A tag has a default action associated with it by the
browser ... more specifically a redirect to the links href. You have to stop
this default action in order to see your alert. There are two ways to do
this.

The first way: A click handler can return false to prevent the default (and
stop propagation). To do this, your event handler would look like this:

$("a").click(function(){
alert("Thanks for visiting!");
return false;
});

The second way: The event handler gets passed the event object as its first
argument and the event object has a method to prevent the default behavior
as well. You could also do the above like this:

$("a").click(function(event){
alert("Thanks for visiting!");
event.preventDefault();
});

Hope that helps!

--
Brandon Aaron


On 9/27/07, cmbtrx <[EMAIL PROTECTED]> wrote:
>
>
> lol, wow--I sure was peeved!
>
> Uh anyway sorry, the page itself is off-limits (per my client's
> request), but here's the code:
>
>  "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> 
> test
> 
> 
> 
> 
> 
> 
> 
> $(document).ready(function(){
>
> $("a").click(function(){
>alert("Thanks for visiting!");
>  });
>
> });
> 
> 
> 
>
> http://jquery.com/";>jQuery
>
> [more html...]
>
>
> So, if I understand this, clicking on the "jQuery" link above
> should...uhh, pop an alert right? Or is jQuery really not that simple?
> Or do I have a typo? Or am I in the wrong profession? (OK, don't
> answer that.)
>
> And thanks for the amazing display of patience, people! (most other
> code forums would have had me tarred and feathered by now!)
>
>
> On Sep 27, 11:44 am, cmbtrx <[EMAIL PROTECTED]> wrote:
> > OK, forgive my tone here...I'm actually quite flabbergasted.
> >
> > I ***FINALLY*** get around to trying out jquery.
> >
> > Oh, I'm sure that quite obviously I'm doing something wrong, because
> > after following the first few paragraphs of the "How JQuery Works"
> > section (clicking a link launches an alert box...uh ok, no fine) it
> > does absolutely nothing.
> >
> > Wow.
> >
> > So far the javascript skills required for testing this are sub-fetal
> > so I can't imagine what black magic I might possibly have introduced
> > into this 79Kb albatross.
> >
> > No, OK, I won't condemn it yet, but can somebody enlighten me?
> >
> > (I thought this would be easy.)
>
>


[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Karl Swedberg

On Sep 27, 2007, at 11:44 AM, cmbtrx wrote:


OK, forgive my tone here...I'm actually quite flabbergasted.

I ***FINALLY*** get around to trying out jquery.

Oh, I'm sure that quite obviously I'm doing something wrong, because
after following the first few paragraphs of the "How JQuery Works"
section (clicking a link launches an alert box...uh ok, no fine) it
does absolutely nothing.


Please go back to that page and keep reading. That link wasn't  
intended to be a demo. It was supposed to take you to the events page  
where you can read about the click method.


Two paragraphs down, you'll see this:

For click and most other events, you can prevent the default  
behaviour - here, following the link to jquery.com - by returning  
false from the event handler:


 $("a").click(function(){
   alert("Thanks for visiting!");
   return false;
 });


You can either paste that into Firebug and then try clicking on a  
link or put it in your own script. If you put it in your own script,  
make sure, as that page instructs, that you put it "In the ready  
function (from the example above)."


So, then it would look like this:

$(document).ready(function() {
  $("a").click(function(){
alert("Thanks for visiting!");
return false;
  });
});

Or course, you need to reference the jquery.js file first. And you  
should put this either within a 

[jQuery] Re: Can't parse input from one form of many on page

2007-09-27 Thread mo2g

Didn't work. I set up a function to parse the Params and show them in
an alert.

The results are blank when I add the #adminForm and show all the
fields on the page when I remove it.

Any other ideas?

On Sep 27, 4:42 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Try this:
>
> $('input,select,hidden', '#adminForm').each(function() {
> do stuff;
>
> }
>
> This says "get all input, select, hidden elements in the context of
> #adminForm."
>
> -- Josh
>
> - Original Message -
> From: "mo2g" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Thursday, September 27, 2007 12:55 PM
> Subject: [jQuery] Can't parse input from one form of many on page
>
> > Sorry if this double posts...
>
> > I am a newbie with JQuery and have ported a form from Prototype.
>
> > I have two forms on a page:
>
> > 
> > 
> > more fields...
> > 
> > 
>
> > 
> > 
> > more fields...
> > 
> > 
>
> > I am using the following code on the page to parse the input from the
> > form:
>
> >   $('input, select, hidden').each(function(){
>
> > The problem is this code grabs the input from both forms. I just need
> > the input from the form "adminForm".
>
> > I tried:
>
> >  $('#adminForm :input, select, hidden').each(function(){
>
> > but it just kills 'input' while still collecting the 'select' and
> > 'hidden' type fields.
>
> > How do I tell JQuery that I want to limit it to the adminForm form?



[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread cmbtrx

lol looks just like mine.

I sense that a stupid typo is fast approaching the direction of this
conversation...

Nice little site that--pastie.


On Sep 27, 5:45 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> On 9/27/07, cmbtrx <[EMAIL PROTECTED]> wrote:
>
>
>
> > OK, forgive my tone here...I'm actually quite flabbergasted.
>
> > I ***FINALLY*** get around to trying out jquery.
>
> > Oh, I'm sure that quite obviously I'm doing something wrong, because
> > after following the first few paragraphs of the "How JQuery Works"
> > section (clicking a link launches an alert box...uh ok, no fine) it
> > does absolutely nothing.
>
> After following the first few paragraphs of
>
>  http://docs.jquery.com/How_jQuery_Works
>
> my page looks something like this:
>
>  http://pastie.caboo.se/101553
>
> This works for me. Perhaps you could compare what you have to mine and see
> if you can find a significant difference. Or if mine works, use it as a
> starting point. Good luck, and let us know how it turns out.
>
> - Richard



[jQuery] Re: idTabs Plugin working with class and not id

2007-09-27 Thread mockmock

Hi!

Thanks for your reply!

I understand your trick. But it doesn't seem to work and I don't know
why. I tried to do a document.write('.'+id.substr(1)) and it returns
me the right class.

But all my  and  remain
visible and nothing happens after a click.

Here's my code:






Content 1
Content 2


Text...
Text...



$("#textcontent").idTabs(function(id,list,set){
   $("a",set).removeClass("selected")
   .filter("[EMAIL PROTECTED]'"+id+"']",set).addClass("selected");
   for(i in list)
 $(list[i]).hide();
   $('.'+id.substr(1)).fadeIn(2000);
   return false;
 });



Any idea?

Thanks again!

On 22 sep, 18:39, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> Hiya,
>
> You bet, try this:
>
> HTML
> Tab
> 
> 
>
> JAVASCRIPT
> $("#textcontent").idTabs(function(id,list,set){
>$("a",set).removeClass("selected")
>.filter("[EMAIL PROTECTED]'"+id+"']",set).addClass("selected");
>for(i in list)
>  $(list[i]).hide();
>$('.'+id.substr(1)).fadeIn(2000);
>return false;
>  });
>
> The '.'+id.substr(1) converts the id into a class.
>
> ~Sean
>
> On 9/19/07, Clément <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I'm using the idTabs plugin.
>
> > I weould like to know if it is possible to have calls on the classes
> > of the elements (example: ".photo", ".text") and not on the elements
> > id's.
>
> > Here's the script I'm using:
>
> >   $("#textcontent").idTabs(function(id,list,set){
> > $("a",set).removeClass("selected")
> > .filter("[EMAIL PROTECTED]'"+id+"']",set).addClass("selected");
> > for(i in list)
> >   $(list[i]).hide();
> > $(id).fadeIn(2000);
> > return false;
> >   });
>
> > In fact, I would like to make appear several elements (img, div, etc),
> > by clicking on a link.
>
> > Can someone help me?
>
> > Thanks in advance!



[jQuery] Re: Can't parse input from one form of many on page

2007-09-27 Thread mo2g

I set up a quick function to parse the Parms array I get from this and
it doesn't appear to work.

Basically it is an empty set.

Here is the URL of the page I am working on:

http://www.glyfada.net/index.php?option=com_mtzcssearch&Itemid=46&template=2

under the advanced search form in the center of the page enter a
zipcode in the Your Address field (30022 works) and then select a
distance. I use javascript to parse the form and show a live result #.

The alert that pops up to show the values is empty. If I remove the
form reference, I get everything on the page.

On Sep 27, 4:42 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Try this:
>
> $('input,select,hidden', '#adminForm').each(function() {
> do stuff;
>
> }
>
> This says "get all input, select, hidden elements in the context of
> #adminForm."
>
> -- Josh
>
> - Original Message -
> From: "mo2g" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Thursday, September 27, 2007 12:55 PM
> Subject: [jQuery] Can't parse input from one form of many on page
>
> > Sorry if this double posts...
>
> > I am a newbie with JQuery and have ported a form from Prototype.
>
> > I have two forms on a page:
>
> > 
> > 
> > more fields...
> > 
> > 
>
> > 
> > 
> > more fields...
> > 
> > 
>
> > I am using the following code on the page to parse the input from the
> > form:
>
> >   $('input, select, hidden').each(function(){
>
> > The problem is this code grabs the input from both forms. I just need
> > the input from the form "adminForm".
>
> > I tried:
>
> >  $('#adminForm :input, select, hidden').each(function(){
>
> > but it just kills 'input' while still collecting the 'select' and
> > 'hidden' type fields.
>
> > How do I tell JQuery that I want to limit it to the adminForm form?



[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Chris W. Parker

On Thursday, September 27, 2007 8:44 AM cmbtrx said:

Oooh ooh me too!

> OK, forgive my tone here...I'm actually quite flabbergasted.

OK

But first, when writing to a mailing list with an issue that you want
resolved it's necessary to describe the issue. Some issues can be solved
by just reading the author's description. Others, like yours, need a lot
more detail. Specifically...

> Oh, I'm sure that quite obviously I'm doing something wrong, because
> after following the first few paragraphs of the "How JQuery Works"
> section (clicking a link launches an alert box...uh ok, no fine) it
> does absolutely nothing.

What browser and OS are you using?

Where exactly did you click that gave you the alert box?

What example are you following that is not working?

> Wow.

I agree. But for different reasons.

> So far the javascript skills required for testing this are sub-fetal
> so I can't imagine what black magic I might possibly have introduced
> into this 79Kb albatross.

"this 79Kb albatross"? What is "this"? Are you referring to one of your
own projects?

> No, OK, I won't condemn it yet, but can somebody enlighten me?

You're very gracious... *rollseyes*

> (I thought this would be easy.)

No one can say why you're having a difficult time (for the reasons I
listed above) but one thing is sure, jQuery *IS EASY*. But these issues
are often due to PEBKAC: a frustrating and illusive problem.


I think you'll come to find that the jQuery community is very helpful.
Just look at all the people who are eager to solve your problem!



Chris.


[jQuery] Re: Toggling a checkbox

2007-09-27 Thread voltron

YOU DA MAN Glen!

:-)

On Sep 27, 10:42 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> I whipped up a demo.
> Is this what you meant?
>
> http://www.commadot.com/jquery/checkboxToggle.php
>
> Glen
>
> On 9/27/07, voltron <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hmm, Thanks guys, but maybe  I did dot make myself to clear. I am able
> > to check the boxes, but I´m not able to toggle between both states.
> > When the user checks the box, an input field is to be disabled, and
> > when he unchecks it, the input box should be enabled, thats fwhat the
> > toggle function is for, but it causes my browser to freeze when I use
> > it like that. Any other ideas?
>
> > Thanks!
>
> > On Sep 27, 4:46 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> > > $(":checkbox").attr("checked","anyThingWillCheckIt")
> > > $(":checkbox").removeAttr("checked")
>
> > > Glen
>
> > > On 9/27/07, Erik Beeson <[EMAIL PROTECTED]> wrote:
>
> > > > To check or uncheck a checkbox, assign true or false to its 'checked'
> > > > property (untested): $('#myCheckbox')[0].checked = true; or
> > > > $('#myCheckbox').attr('checked', true);
>
> > > > But it looks like you're trying to enable/disable them, in which case
> > you
> > > > probably want $(...).attr('disabled', 'disabled'); and
> > > > $(...).removeAttr('disabled');
>
> > > > --Erik
>
> > > > On 9/27/07, voltron <[EMAIL PROTECTED]> wrote:
>
> > > > > How would one toggle a checkbox?
>
> > > > > This does not work:
>
> > > > > $("#postcode_all").toggle(function(){
> > > > > $("#intended_postcode-0").attr("disabled", "disabled");
> > > > > },function(){
> > > > > $("#intended_postcode-0").attr("enabled", "enabled");
> > > > > });
>
> > > > > Thanks



[jQuery] Re: Paste Monkey Beta Launched

2007-09-27 Thread Tane Piper

Hi Joan,

Well the fact that GeSHi supports more languages, that's why I used
it.  But also, the code is generated directly from the database, in
PHP, so there is no lag before it is marked up

On 9/27/07, Joan Piedra <[EMAIL PROTECTED]> wrote:
> Hey Tane,
> This looks interesting. Have you ever consider to use chili instead of
> geshi? What do you think would be better in this case, a server-load or
> client-load?
>
> Cheers,
>
>
>  On 9/26/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
> > Looking good Tane. The only changes I'd make are CSS related, but since
> it's still beta I'll cut ya some slack. =P Keep up the good work.
> >
> > ~Sean
> >
>
>
>
> --
> Joan Piedra  ||  Frontend web developer
> http://www.justaquit.com/  ||  http://www.joanpiedra.com/


-- 
Tane Piper
http://digitalspaghetti.me.uk

This email is: [ ] blogable [ x ] ask first [ ] private


[jQuery] Re: How do I select an Element with the ID="foo.bar:data" with jQuera Selectors?

2007-09-27 Thread Christian Bach
try: jQuery('#foo\\.bar\\:filter');

2007/9/27, ravenel <[EMAIL PROTECTED]>:
>
>
> Hello jQuery Coders!
>
> Since it is allowed to use ".", ":"  in the id-Tag (http://www.w3.org/
> TR/html4/types.html#h-6.2)
>
> I wonder how I select it while using  the jQuery Selector Syntax?
>
> jQuery('#foo.bar:filter') doesn't work since it means element with id
> foo and class bar and filter data?
>
>
> is this a bug a feature or a problem?
>
>


[jQuery] Great free PHP hosting!

2007-09-27 Thread Harlley Roberto
http://www.000webhost.com/?id=5687

-- 
==
   Acesse o meu blog!
   www.webtoo.com.br
==


[jQuery] Re: How do I select an Element with the ID="foo.bar:data" with jQuera Selectors?

2007-09-27 Thread Karl Rudd

To select an element with an id="#foo.bar:filter" in CSS you would use:

#foo\.bar\:filter { /* ... */ }

jQuery uses the same syntax (though make sure you're using a newer,
1.2+ version).

When using a "literal" string (that is "string") you will have to
escape the "\"s because of the way JavaScript works, so the end result
would be:

jQuery('#foo\\.bar\\:filter')

Karl Rudd

On 9/28/07, ravenel <[EMAIL PROTECTED]> wrote:
>
> Hello jQuery Coders!
>
> Since it is allowed to use ".", ":"  in the id-Tag (http://www.w3.org/
> TR/html4/types.html#h-6.2)
>
> I wonder how I select it while using  the jQuery Selector Syntax?
>
> jQuery('#foo.bar:filter') doesn't work since it means element with id
> foo and class bar and filter data?
>
>
> is this a bug a feature or a problem?
>
>


[jQuery] Re: jQuery.escapeHTML( str ) ?

2007-09-27 Thread Jörn Zaefferer


[EMAIL PROTECTED] schrieb:

Will it be? Function like htmlspecialchars() in PHP is useful when you
need to insert some value into  or  but you also
need non-escaped value too for using it in hashes and/or associative
arrays and then send to server side.
  

jQuery's text() method escapes html entities. Did you give that a try?

-- Jörn



[jQuery] Re: ANNOUNCEMENT: Chili 1.9 much faster

2007-09-27 Thread Brandon Aaron
Speaking of that ... I've got a plugin ... unreleased/undocumented at the
moment ... called viewable. It gives you a percentage of the element that is
viewable.

http://brandonaaron.net/jquery/plugins/viewable/test/test.html

--
Brandon Aaron

On 9/27/07, Guy Fraser <[EMAIL PROTECTED]> wrote:
>
>
> Frank Tudor wrote:
> > Code anticipation would score bonus points.
>
> While my tired brain was wondering what you meant by that, it came up
> with a completely unrelated idea - we could modify/extend the lazy image
> loader plugin [1] so that code blocks "below the fold" would not get
> syntax highlighted until the user starts scrolling down the page. I
> often end up with pages that have dozens of small code blocks with
> descriptive paragraphs in between them. This would make the initial page
> render more quickly and as the user scrolls down more code blocks get
> syntax highlighted automagically.
>
>
> [1] http://www.appelsiini.net/2007/9/lazy-load-images-jquery-plugin
>


[jQuery] Re: How do I select an Element with the ID="foo.bar:data" with jQuera Selectors?

2007-09-27 Thread Brandon Aaron
This FAQ should help you.
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F

--
Brandon Aaron

On 9/27/07, ravenel <[EMAIL PROTECTED]> wrote:
>
>
> Hello jQuery Coders!
>
> Since it is allowed to use ".", ":"  in the id-Tag (http://www.w3.org/
> TR/html4/types.html#h-6.2)
>
> I wonder how I select it while using  the jQuery Selector Syntax?
>
> jQuery('#foo.bar:filter') doesn't work since it means element with id
> foo and class bar and filter data?
>
>
> is this a bug a feature or a problem?
>
>


[jQuery] Re: Validation plugin - alphanumeric password with min length

2007-09-27 Thread Jörn Zaefferer


voltron schrieb:

Hi Jörn, I think it works now. Do the errors which I define in the
error_container override the default ones in the plugin? Maybe it
would be cool to make this a default validator for your plugin? I
think many others might want this functionality. Thanks for looking
into this problem.
  
Sure. I'll add it to additional-methods for now, if there are more 
requests I'll add it to the default methods.


-- Jörn


[jQuery] Re: Can't parse input from one form of many on page

2007-09-27 Thread Josh Nathanson


Try this:

$('input,select,hidden', '#adminForm').each(function() {
do stuff;
}

This says "get all input, select, hidden elements in the context of 
#adminForm."


-- Josh



- Original Message - 
From: "mo2g" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Thursday, September 27, 2007 12:55 PM
Subject: [jQuery] Can't parse input from one form of many on page




Sorry if this double posts...

I am a newbie with JQuery and have ported a form from Prototype.

I have two forms on a page:



more fields...





more fields...



I am using the following code on the page to parse the input from the
form:

  $('input, select, hidden').each(function(){

The problem is this code grabs the input from both forms. I just need
the input from the form "adminForm".

I tried:

 $('#adminForm :input, select, hidden').each(function(){

but it just kills 'input' while still collecting the 'select' and
'hidden' type fields.

How do I tell JQuery that I want to limit it to the adminForm form?





[jQuery] Re: How do I select an Element with the ID="foo.bar:data" with jQuera Selectors?

2007-09-27 Thread Karl Swedberg


On Sep 27, 2007, at 11:05 AM, ravenel wrote:


Hello jQuery Coders!

Since it is allowed to use ".", ":"  in the id-Tag (http://www.w3.org/
TR/html4/types.html#h-6.2)

I wonder how I select it while using  the jQuery Selector Syntax?

jQuery('#foo.bar:filter') doesn't work since it means element with id
foo and class bar and filter data?


is this a bug a feature or a problem?



I think this is what you're looking for:

http://docs.jquery.com/ 
Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_cha 
racters_in_its_ID.3F


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




[jQuery] Re: How do I select an Element with the ID="foo.bar:data" with jQuera Selectors?

2007-09-27 Thread Benjamin Sterling
I believe you have to do jQuery('#foo\.bar\:filter') but I am not 100%, but
do remember reading a post about it a while back.

On 9/27/07, ravenel <[EMAIL PROTECTED]> wrote:
>
>
> Hello jQuery Coders!
>
> Since it is allowed to use ".", ":"  in the id-Tag (http://www.w3.org/
> TR/html4/types.html#h-6.2)
>
> I wonder how I select it while using  the jQuery Selector Syntax?
>
> jQuery('#foo.bar:filter') doesn't work since it means element with id
> foo and class bar and filter data?
>
>
> is this a bug a feature or a problem?
>
>


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


[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Benjamin Sterling
lmao... I love those cave man commercials.

I can only imagine that you are referring to:
http://docs.jquery.com/How_jQuery_Works

correct?

If so, I have a few questions:

1.  Is there code we can look at?
2.  Are you doing:

$(document).ready(function(){
$("a").click(function(){
   alert("Thanks for visiting!");
   return false;
});
}
the dom has to be ready before you can bind any events to it.

3.  Did you include the jQuery framework?

Let us know.

On 9/27/07, cmbtrx <[EMAIL PROTECTED]> wrote:
>
>
> OK, forgive my tone here...I'm actually quite flabbergasted.
>
> I ***FINALLY*** get around to trying out jquery.
>
> Oh, I'm sure that quite obviously I'm doing something wrong, because
> after following the first few paragraphs of the "How JQuery Works"
> section (clicking a link launches an alert box...uh ok, no fine) it
> does absolutely nothing.
>
> Wow.
>
> So far the javascript skills required for testing this are sub-fetal
> so I can't imagine what black magic I might possibly have introduced
> into this 79Kb albatross.
>
> No, OK, I won't condemn it yet, but can somebody enlighten me?
>
> (I thought this would be easy.)
>
>


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


[jQuery] If anyone needs a file uploader...

2007-09-27 Thread Derek Gathright
Yesterday I replaced a Flex2 uploader I created (that just wasn't working
properly in IE) with SWFUpload and found it to be a joy to work with.  I
looked all over (even at some jQuery plugins), but nothing I found was
exactly what I needed (progress bar, multiple files, extendable with
javascript).  I don't think there is anything available out there to tie it
together with jQuery, but just figured I throw it out there cause it appears
to be the best solution for anyone looking to do a javascript based
uploader. =)

Main site - http://swfupload.mammon.se/
Demo - http://swfupload.praxion.co.za/

Check out the application uploader demo for some very cool ways to use it.


[jQuery] uhhh.......WAT?

2007-09-27 Thread cmbtrx

OK, forgive my tone here...I'm actually quite flabbergasted.

I ***FINALLY*** get around to trying out jquery.

Oh, I'm sure that quite obviously I'm doing something wrong, because
after following the first few paragraphs of the "How JQuery Works"
section (clicking a link launches an alert box...uh ok, no fine) it
does absolutely nothing.

Wow.

So far the javascript skills required for testing this are sub-fetal
so I can't imagine what black magic I might possibly have introduced
into this 79Kb albatross.

No, OK, I won't condemn it yet, but can somebody enlighten me?

(I thought this would be easy.)



[jQuery] ul list which make appear 2 elements in the same time

2007-09-27 Thread mockmock

Hi all,

I'd like to have an "ul list", containing "li links" which make appear
two elements in the same time.

Something like this:

show content1
show content2
show content3


blabla
blibli

blabla
blibli

So for example, by clicking on "show content 2", the two div's with
the "content2" class appears.

I've already tried the idTabs plugin, but it works with the id of the
element.

Can someone help me? Thanks a lot in advance!



[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Marshall Salinger


Did you add the code inside the ready event? Please post your code for 
review. I am sure anyone would be willing to help you.


-Marshall

cmbtrx wrote:

OK, forgive my tone here...I'm actually quite flabbergasted.

I ***FINALLY*** get around to trying out jquery.

Oh, I'm sure that quite obviously I'm doing something wrong, because
after following the first few paragraphs of the "How JQuery Works"
section (clicking a link launches an alert box...uh ok, no fine) it
does absolutely nothing.

Wow.

So far the javascript skills required for testing this are sub-fetal
so I can't imagine what black magic I might possibly have introduced
into this 79Kb albatross.

No, OK, I won't condemn it yet, but can somebody enlighten me?

(I thought this would be easy.)


  




[jQuery] Re: functions after $.get work strange

2007-09-27 Thread [EMAIL PROTECTED]

> To answer your specific question, setting
> a variable who's scope is outside the callback is as easy as defining the
> variable outside the callback:
>
> var foo;
> $.get(..., function() { foo = ...; });

Ahh, I know know where was my mistake.

I tried something like that:

function a() {
var ret;
$.get(..., function() { ret = ...; });
}

instead of:

var ret;
function a() {
$.get(..., function() { ret = ...; });
}

Thanks!
Michael



[jQuery] Safari 2.0 crashes while executing http://jquery.com/test/

2007-09-27 Thread ravenel

Is this a known problem?



[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread John Resig

Do you have a page online somewhere with what you're trying to do? The
most common mistake, when beginning, is to forget a
$(document).ready(function(){ ... }) around your code (causing it to
execute too early).

--John

On 9/27/07, cmbtrx <[EMAIL PROTECTED]> wrote:
>
> OK, forgive my tone here...I'm actually quite flabbergasted.
>
> I ***FINALLY*** get around to trying out jquery.
>
> Oh, I'm sure that quite obviously I'm doing something wrong, because
> after following the first few paragraphs of the "How JQuery Works"
> section (clicking a link launches an alert box...uh ok, no fine) it
> does absolutely nothing.
>
> Wow.
>
> So far the javascript skills required for testing this are sub-fetal
> so I can't imagine what black magic I might possibly have introduced
> into this 79Kb albatross.
>
> No, OK, I won't condemn it yet, but can somebody enlighten me?
>
> (I thought this would be easy.)
>
>


[jQuery] dynamically appended table-rows in loose hover effect in IE

2007-09-27 Thread ravenel

I am loading data dynamically with
jquery load function  e.g.:

.even{
   background-color: red;
}

.even:hover {
   background-color: blue;
}

jQuery("tbody").append(data);

that works perfect in FF, but in IE the hover css for the class="even"
is not interpreted anymore in IE for the dynamicly added rows.

any ideas or known bugs and solutions?



[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Glen Lipka
What are you trying to do?

I am not a programmer, but I can do all kinds of awesome things with jQuery.
I have a mess of simple demos and experiments here:
http://www.commadot.com/jquery
There are others around too.

Also, what exactly is 79k?

Glen

On 9/27/07, cmbtrx <[EMAIL PROTECTED]> wrote:
>
>
> OK, forgive my tone here...I'm actually quite flabbergasted.
>
> I ***FINALLY*** get around to trying out jquery.
>
> Oh, I'm sure that quite obviously I'm doing something wrong, because
> after following the first few paragraphs of the "How JQuery Works"
> section (clicking a link launches an alert box...uh ok, no fine) it
> does absolutely nothing.
>
> Wow.
>
> So far the javascript skills required for testing this are sub-fetal
> so I can't imagine what black magic I might possibly have introduced
> into this 79Kb albatross.
>
> No, OK, I won't condemn it yet, but can somebody enlighten me?
>
> (I thought this would be easy.)
>
>


[jQuery] Re: uhhh.......WAT?

2007-09-27 Thread Michael Geary

Uhhh... Can you post a link to your test page?

It's impossible to guess what might be wrong otherwise.

-Mike 

> From: cmbtrx
> 
> OK, forgive my tone here...I'm actually quite flabbergasted.
> 
> I ***FINALLY*** get around to trying out jquery.
> 
> Oh, I'm sure that quite obviously I'm doing something wrong, 
> because after following the first few paragraphs of the "How 
> JQuery Works"
> section (clicking a link launches an alert box...uh ok, no 
> fine) it does absolutely nothing.
> 
> Wow.
> 
> So far the javascript skills required for testing this are 
> sub-fetal so I can't imagine what black magic I might 
> possibly have introduced into this 79Kb albatross.
> 
> No, OK, I won't condemn it yet, but can somebody enlighten me?
> 
> (I thought this would be easy.)
> 



[jQuery] Re: ANNOUNCEMENT: Chili 1.9 much faster

2007-09-27 Thread Guy Fraser

Frank Tudor wrote:
> Code anticipation would score bonus points.

While my tired brain was wondering what you meant by that, it came up 
with a completely unrelated idea - we could modify/extend the lazy image 
loader plugin [1] so that code blocks "below the fold" would not get 
syntax highlighted until the user starts scrolling down the page. I 
often end up with pages that have dozens of small code blocks with 
descriptive paragraphs in between them. This would make the initial page 
render more quickly and as the user scrolls down more code blocks get 
syntax highlighted automagically.


[1] http://www.appelsiini.net/2007/9/lazy-load-images-jquery-plugin


[jQuery] Re: functions after $.get work strange

2007-09-27 Thread Michael Geary

You're still expecting things to happen in the wrong order. It's *inside the 
callback* that the data becomes available, and this is
long after isTracked() returns. Try this instead:

var r;

function isTracked(personcode, callback) {
$.get('trackstudent/istracked.php',{'personcode': personcode}, 
callback);
}

$(document).ready(function() {

isTracked('10591891',function(data) {
r=data;
alert(r);
});

});

If that doesn't quite make sense, sprinkle the code with console.log() 
statements, run it in Firefox with Firebug enabled, and watch
the console to see the order of execution.

-Mike

> -Original Message-
> From: jquery-en@googlegroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, September 27, 2007 7:01 AM
> To: jQuery (English)
> Subject: [jQuery] Re: functions after $.get work strange
> 
> 
> > function isTracked(personcode, callback) {
> >   $.get('trackstudent/istracked.php', {'personcode': personcode}, 
> > callback);
> >
> > }
> >
> > isTracked(code, function(tracked) {
> >   // do something with tracked, exactly as you would have 
> done above.
> >
> > });
> 
> I thought that I understand that but Im doing something wrong.
> (istracked.php has 'true' or 'false')
> ---
> var r;
> 
> function isTracked(personcode, callback) {
>   $.get('trackstudent/istracked.php',{'personcode': 
> personcode}, callback);
>   return r;
> }
> 
> $(document).ready(function() {
> 
> alert(isTracked('10591891',function(data) {
>   r=data;
> }));
> 
> });
> 
> istracked.php returns 'true'
> result of alert:undefined
> should be:   true
> 
> Callback is still running last .
> I have no idea for that :/
> 
> TIA
> 
> Michael
> 



[jQuery] Re: jCorner problem?

2007-09-27 Thread Guy Fraser

polyrhythmic wrote:
> I've seen that happen to me before when running .corner() on a floated
> element.  Corner tries to adapt properties from its parent from
> the .corner divs, so if you have some css like #container div { float:
> left; } the float will be applied to your .corner divs too, and bork
> your layout.  Corner works better with absolute or relative-ly
> positioned elements, consider wrapping the div you intend to .corner()
> in another div.
>   

It would be ideal if corner could detect if the div is floated and 
accommodate :)


[jQuery] Problem with jQuery.unique( array )

2007-09-27 Thread Sparticat


Whenever I try to use the $.unique() function it just returns the array
without removing the duplicates.

$.unique([0,1,1,2,2,3]);  returns [0,1,1,2,2,3] instead of [0,1,2,3] as
described at: http://docs.jquery.com/Utilities/jQuery.unique#array

Is this a bug or am I missing something?

I'm currently using jQuery 1.2
-- 
View this message in context: 
http://www.nabble.com/Problem-with-jQuery.unique%28-array-%29-tf4529331s15494.html#a12924415
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Conflict with the Accessible News Slider and the Dimensions plugin (as required by the ClueTip)?

2007-09-27 Thread Brandon Aaron
This is because the selector didn't match any elements before trying to call
a method within dimensions (maybe offset).

--
Brandon Aaron

On 9/27/07, HelloWorld <[EMAIL PROTECTED]> wrote:
>
>
> Hi. I'm experiencing a conflict w/ the Accessible News Slider and the
> Dimensions plugin (as required by the ClueTip plugin).
>
> No customizations made.
>
> a 'no object' error:
>
> [Exception... "'Dimensions: jQuery collection is empty' when calling
> method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
> (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
>
> Don't know how simple - or not - this is. Anyone else seen this?
> Didn't see it listed in this group or on jquery.com plugin issues.
>
> Thanks.
>
>


[jQuery] Re: Toggling a checkbox

2007-09-27 Thread Glen Lipka
I whipped up a demo.
Is this what you meant?

http://www.commadot.com/jquery/checkboxToggle.php

Glen

On 9/27/07, voltron <[EMAIL PROTECTED]> wrote:
>
>
> Hmm, Thanks guys, but maybe  I did dot make myself to clear. I am able
> to check the boxes, but I´m not able to toggle between both states.
> When the user checks the box, an input field is to be disabled, and
> when he unchecks it, the input box should be enabled, thats fwhat the
> toggle function is for, but it causes my browser to freeze when I use
> it like that. Any other ideas?
>
> Thanks!
>
> On Sep 27, 4:46 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> > $(":checkbox").attr("checked","anyThingWillCheckIt")
> > $(":checkbox").removeAttr("checked")
> >
> > Glen
> >
> > On 9/27/07, Erik Beeson <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > To check or uncheck a checkbox, assign true or false to its 'checked'
> > > property (untested): $('#myCheckbox')[0].checked = true; or
> > > $('#myCheckbox').attr('checked', true);
> >
> > > But it looks like you're trying to enable/disable them, in which case
> you
> > > probably want $(...).attr('disabled', 'disabled'); and
> > > $(...).removeAttr('disabled');
> >
> > > --Erik
> >
> > > On 9/27/07, voltron <[EMAIL PROTECTED]> wrote:
> >
> > > > How would one toggle a checkbox?
> >
> > > > This does not work:
> >
> > > > $("#postcode_all").toggle(function(){
> > > > $("#intended_postcode-0").attr("disabled", "disabled");
> > > > },function(){
> > > > $("#intended_postcode-0").attr("enabled", "enabled");
> > > > });
> >
> > > > Thanks
>
>


[jQuery] Re: functions after $.get work strange

2007-09-27 Thread [EMAIL PROTECTED]

First of all - Thank You very much - it is good lesson.

> To answer your specific question, setting
> a variable who's scope is outside the callback is as easy as defining the
> variable outside the callback:
>
> var foo;
> $.get(..., function() { foo = ...; });

I tried that before:

function test()
{
var ret;
$.get(..., function(data) {  ret= data; });
alert(ret);
}

result:  undefined


> To do what you want, you need to pass a callback to isTracked that will get
> called once the data is available. In your case, you could just pass the
> callback along to $.get. So your setup might look something like:
>
> function isTracked(personcode, callback) {
>   $.get('trackstudent/istracked.php', {'personcode': personcode}, callback);
>
> }
>
> isTracked(code, function(tracked) {
>   // do something with tracked, exactly as you would have done above.
>
> });

That works perfectly!
Now I can do it in my (poor) way, but in other way... (to be honest I
dont know how to do that)
---
function isTracked(personcode, callback)
{
var ret;
$.get('trackstudent/istracked.php',{'personcode': personcode},
callback);
return ret;
}
...

if (isTracked(personcode, function(data) {
 ret=data;
  })=='true')
{
... //is tracked
}
else
 // isnt tracked
-
isTracked does not return any value. So how can I get what "$.get"
gets from .php and return from isTracked function? (of course without
adding anything to html as I tried before or without using cookies)

Thanks

Michael



[jQuery] Easing Plugin brakes on all methods based on Math.exp with jQuery 1.2.X

2007-09-27 Thread ravenel

Hello I just tested the The Excellent Easing Plugin from
http://gsgd.co.uk/sandbox/jquery.easing.php with jQuery 1.2.1. and
all methods work fine except:

expoin, expoinout, expoout

These methods use Math.exp:

expoout: function(x, t, b, c, d) {
var flip = 1;
if (c < 0) {
flip *= -1;
c *= -1;
}
return flip * (-Math.exp(-Math.log(c)/d * (t-d)) + c + 
1) + b;
}

I cannot figure out the problem, does anybody has an idea?



[jQuery] Re: Paste Monkey Beta Launched

2007-09-27 Thread Joan Piedra
Hey Tane,
This looks interesting. Have you ever consider to use chili instead of
geshi? What do you think would be better in this case, a server-load or
client-load?

Cheers,

On 9/26/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
>
> Looking good Tane. The only changes I'd make are CSS related, but since
> it's still beta I'll cut ya some slack. =P Keep up the good work.
>
> ~Sean
>



-- 
Joan Piedra  ||  Frontend web developer
http://www.justaquit.com/  ||  http://www.joanpiedra.com/


[jQuery] jCarousel drupal example....

2007-09-27 Thread mike55

i have been to the jCarousel website...but it does not have any drupal
examples on how to use jCarousel.

Can someone offer up an example to use this with drupal ??? please?

thanks
mjh



[jQuery] Re: Enterprise Javascript?

2007-09-27 Thread Guy Fraser

Robert Koberg wrote:
> You don't need 1.6. The current version works in 1.4.
>
> You can get Rhino from mozilla (which is what is bundled in 1.6) at:
>
> http://www.mozilla.org/rhino/
>   

The JSR 223 stuff in general works better on 1.6 though - especially 
things like Quercus (PHP in Java), etc.


[jQuery] How do I select an Element with the ID="foo.bar:data" with jQuera Selectors?

2007-09-27 Thread ravenel

Hello jQuery Coders!

Since it is allowed to use ".", ":"  in the id-Tag (http://www.w3.org/
TR/html4/types.html#h-6.2)

I wonder how I select it while using  the jQuery Selector Syntax?

jQuery('#foo.bar:filter') doesn't work since it means element with id
foo and class bar and filter data?


is this a bug a feature or a problem?



[jQuery] Re: filter not working when expression contains spaces

2007-09-27 Thread Guy Fraser

duff wrote:
> But then again, if the filters only apply to the element, why does it
> filter nothing regardless of the filter if it contains spaces ?.
> Shouldn't the filter return nothing if the expression cannot be
> evaluated ?(fail safe rather than silently)
>   
+10

I concur - it should return nothing rather than everything, in the 
scenario where it can't evaluate. That way you a) instantly know 
something is wrong and b) don't end up with really odd things happening 
in places where you don't expect them.


[jQuery] Re: ANNOUNCEMENT: Chili 1.9 much faster

2007-09-27 Thread Frank Tudor
Thanks Ben... That would be awesome!

On 9/27/07, Benjamin Sterling <[EMAIL PROTECTED]> wrote:
>
> Franks,
> I put something for Dreamweaver a while ago, I think we were on 1.1.1 at
> that time, let me see if I can find those files and will hit you up off list
> if I find them.
>
> On 9/27/07, Frank Tudor <[EMAIL PROTECTED]> wrote:
> >
> > I like this idea, and pardon me if this has been asked before, but is
> > there a code higlighter for jQuery that can be used in dreamweaver?
> >
> > Code anticipation would score bonus points.
> >
> > Frank
> >
> > On 9/27/07, Steve Blades <[EMAIL PROTECTED]> wrote:
> > >
> > > Looks outstanding. Now, if it only had a syntax highlight library for
> > > ColdFusion;).
> > >
> > > On 9/27/07, Andrea Ercolino < [EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > Very simple. Look at the new example posted in
> > > > http://noteslog.com/post/chili-19-released-today/ : It's what you're
> > > > looking
> > > > for.
> > > >
> > > > But Chili 1.9 is very fast, it colorize 3000 lines in less than 1
> > > > second !!
> > > > Maybe there is no need for the extra button...
> > > >
> > > >
> > > > Guy Fraser-2 wrote:
> > > > >
> > > > >
> > > > > Andrea Ercolino wrote:
> > > > >> Chili is now much faster than before. Try it!
> > > > >>
> > > > >
> > > > > Is it possible to configure Chili so that if a script is bigger
> > > > than a
> > > > > certain length, instead of automatically highlighting it a link is
> > > > > displayed above it to manually trigger the highlighting?
> > > > >
> > > > >
> > > >
> > > > --
> > > > View this message in context:
> > > > http://www.nabble.com/ANNOUNCEMENT%3A-Chili-1.9-much-faster-tf4524829s15494.html#a12922338
> > > > Sent from the JQuery mailing list archive at Nabble.com.
> > > >
> > > >
> > >
> > >
> > > --
> > > Steve "Cutter" Blades
> > > Adobe Certified Professional
> > > Advanced Macromedia ColdFusion MX 7 Developer
> > > _
> > > http://blog.cutterscrossing.com
> > > ---
> > > The Past is a Memory
> > > The Future a Dream
> > > But Today is a Gift
> > > That's why they call it
> > > The Present
> >
> >
> >
>
>
> --
> Benjamin Sterling
> http://www.KenzoMedia.com
> http://www.KenzoHosting.com
> http://www.benjaminsterling.com


[jQuery] Re: functions after $.get work strange

2007-09-27 Thread [EMAIL PROTECTED]

> function isTracked(personcode, callback) {
>   $.get('trackstudent/istracked.php', {'personcode': personcode}, callback);
>
> }
>
> isTracked(code, function(tracked) {
>   // do something with tracked, exactly as you would have done above.
>
> });

I thought that I understand that but Im doing something wrong.
(istracked.php has 'true' or 'false')
---
var r;

function isTracked(personcode, callback)
{
$.get('trackstudent/istracked.php',{'personcode': personcode},
callback);
return r;
}

$(document).ready(function() {

alert(isTracked('10591891',function(data) {
r=data;
}));

});

istracked.php returns 'true'
result of alert:undefined
should be:   true

Callback is still running last .
I have no idea for that :/

TIA

Michael



[jQuery] Stuttering in auto-scroller

2007-09-27 Thread [EMAIL PROTECTED]

Hi I have made a scroller based in the jnewsscroll plugin, you can
view it at http://demo4.vantageglobal.com/view/skin/v10/ , the problem
is that it have a stuttering, the movement is not smooth, it's very
noticeable in Firefox and it's a little better at Explorer.
Do you know that this could be fixed?

Thanks.



[jQuery] Can't parse input from one form of many on page

2007-09-27 Thread mo2g

Sorry if this double posts...

I am a newbie with JQuery and have ported a form from Prototype.

I have two forms on a page:



more fields...





more fields...



I am using the following code on the page to parse the input from the
form:

   $('input, select, hidden').each(function(){

The problem is this code grabs the input from both forms. I just need
the input from the form "adminForm".

I tried:

  $('#adminForm :input, select, hidden').each(function(){

but it just kills 'input' while still collecting the 'select' and
'hidden' type fields.

How do I tell JQuery that I want to limit it to the adminForm form?



[jQuery] Re: jquery 1.2.1 and the easing (1.1.1) plugin (?!!)

2007-09-27 Thread ravenel

Yes, but just with the methods using Math.exp()... e.g. expoout

All the other methods are working porperly...

don't understand why it breaks only these

On 27 Sep., 16:58, GianCarlo Mingati <[EMAIL PROTECTED]>
wrote:
> hi guys.
> Has anybody experienced problems since the release of the new jquery
> 1.2 and it's use in conjunction with the plugin in subject?
> I found that the expoinout method and all the "inout" methods do not
> work anymore smootly.
> GC



[jQuery] Stuttering in auto-scroller

2007-09-27 Thread [EMAIL PROTECTED]

Hi I have made a scroller based in the jnewsscroll plugin, you can
view it at http://demo4.vantageglobal.com/view/skin/v10/ , the problem
is that it have a stuttering, the movement is not smooth, it's very
noticeable in Firefox and it's a little better at Explorer.
Do you know that this could be fixed?

Thanks.



[jQuery] Re: ANNOUNCEMENT: Chili 1.9 much faster

2007-09-27 Thread Pyrolupus

Hey! When're you going to update Chili Central[1] with the new link?
^_^

Pyro

[1] http://noteslog.com/chili/



[jQuery] Conflict with the Accessible News Slider and the Dimensions plugin (as required by the ClueTip)?

2007-09-27 Thread HelloWorld

Hi. I'm experiencing a conflict w/ the Accessible News Slider and the
Dimensions plugin (as required by the ClueTip plugin).

No customizations made.

a 'no object' error:

[Exception... "'Dimensions: jQuery collection is empty' when calling
method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

Don't know how simple - or not - this is. Anyone else seen this?
Didn't see it listed in this group or on jquery.com plugin issues.

Thanks.



[jQuery] Re: Reload Page?

2007-09-27 Thread bweaverusenet

Your DOM updates won't be sticky, but "to reload the page" you can
window.location.reload().

Of course, you seem to be headed in a cleaner direction: just changing
the text elements in the DOM directly instead of reloading the page.

On Sep 27, 11:23 am, Danjojo <[EMAIL PROTECTED]> wrote:
> Is it possible to reload the page right after I set the cookie?
> Cause I have to update all of the text in a different language..
>
> // Flag image change on menu select, set the cookie with the spoken
> language choice
> // and reload the page in that language
>
> $("#languages").bind('change', function() {
> var country = $(this).val();
> if(country) {
> // This next line uses chainable methods starting at the
> second .attr
> $('#countryFlag').attr("src", "images/" + country +
> ".gif").attr("alt", country + " Flag");
> $.cookie('language', country, {expires: 7}); // set cookie
> }
>
> });
>
> A reload might be pointless though.. since I want to use Xpath plugin
> to replace all the text into another language, that can all take place
> on the page with the DOM replace?
>
> Thank you.



[jQuery] Re: Reload Page?

2007-09-27 Thread Joan Piedra
On 9/27/07, Danjojo <[EMAIL PROTECTED]> wrote:
>
>
> $.cookie('language', country, {expires: 7}); // set cookie


if you just want to reload the page, you could use window.reload();

$.cookie('language', country, {expires: 7}); // set cookie
window.reload();

I believe if you try to replace all the page texts via js and the page is
pretty big, I think it would take its time to process, and maybe crash your
browser.

-- 
Joan Piedra  ||  Frontend web developer
http://www.justaquit.com/  ||  http://www.joanpiedra.com/


[jQuery] Stuttering in auto-scroller

2007-09-27 Thread [EMAIL PROTECTED]

Hi I have made a scroller based in the jnewsscroll plugin, you can
view it at http://demo4.vantageglobal.com/view/skin/v10/ , the problem
is that it have a stuttering, the movement is not smooth, it's very
noticeable in Firefox and it's a little better at Explorer.
Do you know that this could be fixed?

Thanks.



[jQuery] Re: Attr calls on jQuery object with more than one element?

2007-09-27 Thread Loren Pipes
Map is really nice for this.

var attributes = $('.selected').map(function() { return $(this).attr('rel');
});

VP


[jQuery] script within ajax html response

2007-09-27 Thread MHM

Hi,

I am working on a website using jquery for ajax with various other
jquery plugins. In my app, when making ajax queries for forms, i
return back the complete form as html since it carries information
about validation which is done on the server-side.

Taking 2 plugin into consideration, one the tabs plugin from the UI
suite, which loads pages onto tabbed navigation via ajax call and
second a password strength plugin.

I cannot get the script for the password strength to work (along side
other javascript.)

Upon inspecting the DOM using firebug on firefox, it appears that the
script tags are left out all together when writing the response text
onto the page via the $("#thecontent").html(), which is supposed to
replace the current contents.

Is this a security feature, if not how do i resolve this issue, if so
then is it possible to disable it?

Thanks

Regards



[jQuery] Re: functions after $.get work strange

2007-09-27 Thread Guy Fraser

Erik Beeson wrote:
> $.get is asynchronous, meaning the call to $.get returns immediately, 
> even before the callback has happened. To answer your specific 
> question, setting a variable who's scope is outside the callback is as 
> easy as defining the variable outside the callback:

Erik - your explanation was so clear and concise and packed with other 
very useful info, it should go on the jQuery wiki as a tutorial IMHO!

Guy


[jQuery] great new site

2007-09-27 Thread günni

http://spielwelt6.knightfight.de/?ac=vid&vid=121044096



[jQuery] Re: ANNOUNCEMENT: Chili 1.9 much faster

2007-09-27 Thread Benjamin Sterling
Franks,
I put something for Dreamweaver a while ago, I think we were on 1.1.1 at
that time, let me see if I can find those files and will hit you up off list
if I find them.

On 9/27/07, Frank Tudor <[EMAIL PROTECTED]> wrote:
>
> I like this idea, and pardon me if this has been asked before, but is
> there a code higlighter for jQuery that can be used in dreamweaver?
>
> Code anticipation would score bonus points.
>
> Frank
>
> On 9/27/07, Steve Blades <[EMAIL PROTECTED]> wrote:
> >
> > Looks outstanding. Now, if it only had a syntax highlight library for
> > ColdFusion;).
> >
> > On 9/27/07, Andrea Ercolino < [EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > Very simple. Look at the new example posted in
> > > http://noteslog.com/post/chili-19-released-today/ : It's what you're
> > > looking
> > > for.
> > >
> > > But Chili 1.9 is very fast, it colorize 3000 lines in less than 1
> > > second !!
> > > Maybe there is no need for the extra button...
> > >
> > >
> > > Guy Fraser-2 wrote:
> > > >
> > > >
> > > > Andrea Ercolino wrote:
> > > >> Chili is now much faster than before. Try it!
> > > >>
> > > >
> > > > Is it possible to configure Chili so that if a script is bigger than
> > > a
> > > > certain length, instead of automatically highlighting it a link is
> > > > displayed above it to manually trigger the highlighting?
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > > http://www.nabble.com/ANNOUNCEMENT%3A-Chili-1.9-much-faster-tf4524829s15494.html#a12922338
> > > Sent from the JQuery mailing list archive at Nabble.com.
> > >
> > >
> >
> >
> > --
> > Steve "Cutter" Blades
> > Adobe Certified Professional
> > Advanced Macromedia ColdFusion MX 7 Developer
> > _
> > http://blog.cutterscrossing.com
> > ---
> > The Past is a Memory
> > The Future a Dream
> > But Today is a Gift
> > That's why they call it
> > The Present
>
>
>


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


[jQuery] Re: Toggling a checkbox

2007-09-27 Thread voltron

Hmm, Thanks guys, but maybe  I did dot make myself to clear. I am able
to check the boxes, but I´m not able to toggle between both states.
When the user checks the box, an input field is to be disabled, and
when he unchecks it, the input box should be enabled, thats fwhat the
toggle function is for, but it causes my browser to freeze when I use
it like that. Any other ideas?

Thanks!

On Sep 27, 4:46 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> $(":checkbox").attr("checked","anyThingWillCheckIt")
> $(":checkbox").removeAttr("checked")
>
> Glen
>
> On 9/27/07, Erik Beeson <[EMAIL PROTECTED]> wrote:
>
>
>
> > To check or uncheck a checkbox, assign true or false to its 'checked'
> > property (untested): $('#myCheckbox')[0].checked = true; or
> > $('#myCheckbox').attr('checked', true);
>
> > But it looks like you're trying to enable/disable them, in which case you
> > probably want $(...).attr('disabled', 'disabled'); and
> > $(...).removeAttr('disabled');
>
> > --Erik
>
> > On 9/27/07, voltron <[EMAIL PROTECTED]> wrote:
>
> > > How would one toggle a checkbox?
>
> > > This does not work:
>
> > > $("#postcode_all").toggle(function(){
> > > $("#intended_postcode-0").attr("disabled", "disabled");
> > > },function(){
> > > $("#intended_postcode-0").attr("enabled", "enabled");
> > > });
>
> > > Thanks



[jQuery] Re: Attr calls on jQuery object with more than one element?

2007-09-27 Thread Andy Matthews
Ahhh...
 
Easy enough. Turns out I don't need that functionality after all, but that's
good to keep in mind. Thanks.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Benjamin Sterling
Sent: Thursday, September 27, 2007 11:26 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Attr calls on jQuery object with more than one
element?


That is true, that is the correct behaviour, there was specific talk about
what you are expecting a bit ago and I can't remember the end discussion, it
may have even been on the dev list.  I will see if I can come across it. 

Ultimately, you can do:

var $selected = Array();
$('.selected').each(function(){

$selected.push($(this).attr('rel')); 

});



On 9/27/07, Andy Matthews <[EMAIL PROTECTED]
 > wrote: 

If I wanted to get the rel values for all elements which match a jQuery
call, how would I do that?
 
I thought that this:
 
var $selected = $('.selected').attr('rel');
alert($selected);
 
would give me this: 9/1/2007,9/30/2007
 
But it only returns the first value. Is this correct behaviour? I basically
need to get the rel attribute of all elements which have a specific class
for use further down the codebase.
 


 
Andy Matthews
Senior ColdFusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 




-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com 
<>

[jQuery] Re: When will the API be updated for 1.2.1?

2007-09-27 Thread Brandon Aaron
That looks a lot more promising! Does anyone have experience implementing
this extension that would like to help?

--
Brandon Aaron

On 9/27/07, Sam Collett <[EMAIL PROTECTED]> wrote:
>
>
> You use MediaWiki don't you? If so can't you convert the Wiki markup
> to Xml and go from there? e.g.
> http://www.mediawiki.org/wiki/Extension:Wiki2xml
>
> Much better than screen scraping.
>
> On Sep 27, 4:24 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> > The documentation is going through some growing pains. Currently the
> only
> > source of documentation for 1.2.x is on the wiki. I've been thinking
> about
> > how we can take those docs and create an XML file like we had before ...
> > currently the only idea I have is to screen scrape which if you look at
> the
> > actual markup of the Wiki is a pain and doesn't scale well for inclusion
> of
> > plugins, etc. I've made a little progress (still have a long way to go)
> with
> > using Hpricot to at least get the core docs into XML.
> >
> > --
> > Brandon Aaron
> >
> > On 9/27/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > >  I use this:
> > >http://jquery.com/api/
> >
> > > all the time because it's the simplest, easiest, reference for jQuery
> > > methods and behaviours. But it still lists it's version as 1.1.2. Are
> > > there plans to update this reference?
> >
> > > Alternately, I'd argue that there needs to be ONE single point of
> entry
> > > (on the jQuery site at least) for a straight up reference. I'm not
> talking
> > > about the fluffy examples found in the wiki area, but just a terse
> > > explanation of the method, it's parameters, and how to use it.
> >
> > > * 
> >
> > > Andy Matthews
> > > *Senior ColdFusion Developer
> >
> > > Office:  877.707.5467 x747
> > > Direct:  615.627.9747
> > > Fax:  615.467.6249
> > > [EMAIL PROTECTED]
> > >www.dealerskins.com
> >
> >
> >
> >  dealerskinslogo.bmp
> > 6KDownload
>
>


[jQuery] Re: ANNOUNCEMENT: Chili 1.9 much faster

2007-09-27 Thread Frank Tudor
I like this idea, and pardon me if this has been asked before, but is there
a code higlighter for jQuery that can be used in dreamweaver?

Code anticipation would score bonus points.

Frank

On 9/27/07, Steve Blades <[EMAIL PROTECTED]> wrote:
>
> Looks outstanding. Now, if it only had a syntax highlight library for
> ColdFusion;).
>
> On 9/27/07, Andrea Ercolino < [EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Very simple. Look at the new example posted in
> > http://noteslog.com/post/chili-19-released-today/ : It's what you're
> > looking
> > for.
> >
> > But Chili 1.9 is very fast, it colorize 3000 lines in less than 1 second
> > !!
> > Maybe there is no need for the extra button...
> >
> >
> > Guy Fraser-2 wrote:
> > >
> > >
> > > Andrea Ercolino wrote:
> > >> Chili is now much faster than before. Try it!
> > >>
> > >
> > > Is it possible to configure Chili so that if a script is bigger than a
> >
> > > certain length, instead of automatically highlighting it a link is
> > > displayed above it to manually trigger the highlighting?
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/ANNOUNCEMENT%3A-Chili-1.9-much-faster-tf4524829s15494.html#a12922338
> > Sent from the JQuery mailing list archive at Nabble.com.
> >
> >
>
>
> --
> Steve "Cutter" Blades
> Adobe Certified Professional
> Advanced Macromedia ColdFusion MX 7 Developer
> _
> http://blog.cutterscrossing.com
> ---
> The Past is a Memory
> The Future a Dream
> But Today is a Gift
> That's why they call it
> The Present


[jQuery] Re: Alternative syntax?

2007-09-27 Thread Michael Geary

You have to use functions in that code, because you are using two callbacks, 
and that's how you do callbacks in JavaScript, with
functions that get called later.

The first callback is the outer function that gets called when the document is 
ready.

The second callback is the inner function that gets called when you click an A 
tag.

Is it the nested anonymous functions that are throwing you off? You can 
certainly substitute named functions if you prefer. This
code does the same thing:

   $(document).ready( ready );
   
   function ready() {
  alert( 'Ready' );
  $('a').click( clicked );
   }
   
   function clicked() {
  alert( 'Clicked' );
   }

But I agree with Erik: Even if you choose to use named functions in your own 
code, it would be a good idea to get comfortable with
anonymous functions. You will see a LOT of them in jQuery code, and you don't 
want to feel dizzy every time.

It's no different from setTimeout. You can code:

   setTimeout( function() {
  alert( 'Hello' );
   }, 1000 );

or the equivalent:

   setTimeout( hello, 1000 );

   function hello() {
  alert( 'Hello' );
   }

One other point: Do you have an editor that does brace/bracket/parenthesis 
matching and syntax checking (not just syntax coloring)?
If not, I highly recommend the free Komodo Edit:

http://www.activestate.com/Products/komodo_edit/

Even if you have another favorite editor, it's worth loading your code into 
Komodo in addition, just to get the syntax checking.

-Mike

> From: A32
> 
> I find the following example very dirty syntax:
> 
> $(document).ready(function(){
>   alert("Document is ready")
> 
>   $("a").click(function(){
>   alert("Clicked");
>   });
> });
> 
> With all those ) and } I don't know if I'm coming or going.. Is there
> an alternate syntax I can use? Do I *have* to use the "function()" all
> the time or is there a different way? I've been away from JavaScript
> for a long time but never seen anything like that :-)
> 
> If there's no way around it, does anybody know of a javascript
> preprocessor that I could use a cleaner syntax while developing?



[jQuery] Re: When will the API be updated for 1.2.1?

2007-09-27 Thread Sam Collett

You use MediaWiki don't you? If so can't you convert the Wiki markup
to Xml and go from there? e.g. http://www.mediawiki.org/wiki/Extension:Wiki2xml

Much better than screen scraping.

On Sep 27, 4:24 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> The documentation is going through some growing pains. Currently the only
> source of documentation for 1.2.x is on the wiki. I've been thinking about
> how we can take those docs and create an XML file like we had before ...
> currently the only idea I have is to screen scrape which if you look at the
> actual markup of the Wiki is a pain and doesn't scale well for inclusion of
> plugins, etc. I've made a little progress (still have a long way to go) with
> using Hpricot to at least get the core docs into XML.
>
> --
> Brandon Aaron
>
> On 9/27/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
>
>
> >  I use this:
> >http://jquery.com/api/
>
> > all the time because it's the simplest, easiest, reference for jQuery
> > methods and behaviours. But it still lists it's version as 1.1.2. Are
> > there plans to update this reference?
>
> > Alternately, I'd argue that there needs to be ONE single point of entry
> > (on the jQuery site at least) for a straight up reference. I'm not talking
> > about the fluffy examples found in the wiki area, but just a terse
> > explanation of the method, it's parameters, and how to use it.
>
> > * 
>
> > Andy Matthews
> > *Senior ColdFusion Developer
>
> > Office:  877.707.5467 x747
> > Direct:  615.627.9747
> > Fax:  615.467.6249
> > [EMAIL PROTECTED]
> >www.dealerskins.com
>
>
>
>  dealerskinslogo.bmp
> 6KDownload



[jQuery] Re: Attr calls on jQuery object with more than one element?

2007-09-27 Thread Benjamin Sterling
That is true, that is the correct behaviour, there was specific talk about
what you are expecting a bit ago and I can't remember the end discussion, it
may have even been on the dev list.  I will see if I can come across it.

Ultimately, you can do:

var $selected = Array();
$('.selected').each(function(){
$selected.push($(this).attr('rel'));
});


On 9/27/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
>  If I wanted to get the rel values for all elements which match a jQuery
> call, how would I do that?
>
> I thought that this:
>
> var $selected = $('.selected').attr('rel');
> alert($selected);
>
> would give me this: 9/1/2007,9/30/2007
>
> But it only returns the first value. Is this correct behaviour? I
> basically need to get the rel attribute of all elements which have a
> specific class for use further down the codebase.
>
> * 
>
> Andy Matthews
> *Senior ColdFusion Developer
>
> Office:  877.707.5467 x747
> Direct:  615.627.9747
> Fax:  615.467.6249
> [EMAIL PROTECTED]
> www.dealerskins.com
>
>



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com
<>

[jQuery] Re: When will the API be updated for 1.2.1?

2007-09-27 Thread Andy Matthews
Okay...
 
Don't want to be demanding...just looking for the simplest, most
straight-forward docs. Thanks for all your hard work Brandon...I know most
(if not all) of you guys are doing this in your spare time.
 
It's appreciated.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brandon Aaron
Sent: Thursday, September 27, 2007 10:24 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: When will the API be updated for 1.2.1?


The documentation is going through some growing pains. Currently the only
source of documentation for 1.2.x is on the wiki. I've been thinking about
how we can take those docs and create an XML file like we had before ...
currently the only idea I have is to screen scrape which if you look at the
actual markup of the Wiki is a pain and doesn't scale well for inclusion of
plugins, etc. I've made a little progress (still have a long way to go) with
using Hpricot to at least get the core docs into XML. 

--
Brandon Aaron


On 9/27/07, Andy Matthews <[EMAIL PROTECTED]> wrote: 

I use this:
http://jquery.com/api/
 
all the time because it's the simplest, easiest, reference for jQuery
methods and behaviours. But it still lists it's version as 1.1.2. Are there
plans to update this reference?
 
Alternately, I'd argue that there needs to be ONE single point of entry (on
the jQuery site at least) for a straight up reference. I'm not talking about
the fluffy examples found in the wiki area, but just a terse explanation of
the method, it's parameters, and how to use it.
 


 
Andy Matthews
Senior ColdFusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 


<>

[jQuery] Re: jCorner problem?

2007-09-27 Thread polyrhythmic

I've seen that happen to me before when running .corner() on a floated
element.  Corner tries to adapt properties from its parent from
the .corner divs, so if you have some css like #container div { float:
left; } the float will be applied to your .corner divs too, and bork
your layout.  Corner works better with absolute or relative-ly
positioned elements, consider wrapping the div you intend to .corner()
in another div.

Charles
doublerebel.com

On Sep 26, 8:40 am, Mark <[EMAIL PROTECTED]> wrote:
> On Aug 21, 6:42 pm, Stephan Beal <[EMAIL PROTECTED]> wrote:
>
> > On Aug 21, 9:58 pm, Mark <[EMAIL PROTECTED]> wrote:
>
> > >  This is the result I am expecting 
> > > --http://www.augustine.com/images/test/expected.jpg
> > > .  This is what I get --http://www.augustine.com/images/test/actual.jpg
> > > .  I am using standard corner syntax, $(this).corner(); .. this
> > > 'actual' result only occurs in Internet Explorer when the page is
> > > refreshed with the cursor ON the window, if you move it away from the
> > > window you get the 'expected.jpg' result, thoughts? workarounds?
>
> > Can you tell us what browser/version you're using, and what jQuery 
> > andjCornerversions? Also, if you can provide a link to a page
> > demonstrating the problem, that would be really helpful.
>
> > :)
>
> Pages of examples 
> -www.augustine.com/vacation/index.phpwww.augustine.com/history/books.php



[jQuery] jquery 1.2.1 and the easing (1.1.1) plugin (?!!)

2007-09-27 Thread GianCarlo Mingati

hi guys.
Has anybody experienced problems since the release of the new jquery
1.2 and it's use in conjunction with the plugin in subject?
I found that the expoinout method and all the "inout" methods do not
work anymore smootly.
GC



[jQuery] Attr calls on jQuery object with more than one element?

2007-09-27 Thread Andy Matthews
If I wanted to get the rel values for all elements which match a jQuery
call, how would I do that?
 
I thought that this:
 
var $selected = $('.selected').attr('rel');
alert($selected);
 
would give me this: 9/1/2007,9/30/2007
 
But it only returns the first value. Is this correct behaviour? I basically
need to get the rel attribute of all elements which have a specific class
for use further down the codebase.
 

 
Andy Matthews
Senior ColdFusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 
<>

[jQuery] Re: Aaron Gustafson has a great ALA-Article on (Content-)Image Alignment and Consistency

2007-09-27 Thread Remy Sharp

> Is there a reason you didn't replace this.getElementsByTagName?

On the first .getElementsByTagName - there's no particular reason to
justify using jQuery.

However, the second one should really read:

$('p', this).each(...

There really only there because I did a two minute conversion from
Prototype to jQuery.



[jQuery] Re: an "Undo" plugin, or something as such. :-)

2007-09-27 Thread Sean O


Here's a great article I read recently on implementing undo (enhanced from
original post, based on reader inputs):
http://humanized.com/weblog/2007/09/21/undo-made-easy-with-ajax-part-15/

Demo:
http://humanized.com/weblog/images/resources/undo/todo_sync.html

Source (using jQuery, natch):
http://humanized.com/weblog/images/resources/undo/source_sync.php

This even accounts for handling multiple windows of the same script
w/different event queues.



SEAN O
http://www.sean-o.com




Steve Finkelstein-4 wrote:
> 
> 
> Hi all,
> 
> I was curious if there is anyone currently working on an 'Undo' type
> plugin for the jQuery platform. Essentially, similar functionality to
> what gmail offers is desired by many. If not in the works, I wouldn't
> mind giving it a shot myself.
> 
> Thanks for any insight.
> 
> - sf
> 
> 

-- 
View this message in context: 
http://www.nabble.com/an-%22Undo%22-plugin%2C-or-something-as-such.-%3A-%29-tf4511283s15494.html#a12923678
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: ANNOUNCEMENT: Chili 1.9 much faster

2007-09-27 Thread Steve Blades
Looks outstanding. Now, if it only had a syntax highlight library for
ColdFusion;).

On 9/27/07, Andrea Ercolino <[EMAIL PROTECTED]> wrote:
>
>
>
> Very simple. Look at the new example posted in
> http://noteslog.com/post/chili-19-released-today/ : It's what you're
> looking
> for.
>
> But Chili 1.9 is very fast, it colorize 3000 lines in less than 1 second
> !!
> Maybe there is no need for the extra button...
>
>
> Guy Fraser-2 wrote:
> >
> >
> > Andrea Ercolino wrote:
> >> Chili is now much faster than before. Try it!
> >>
> >
> > Is it possible to configure Chili so that if a script is bigger than a
> > certain length, instead of automatically highlighting it a link is
> > displayed above it to manually trigger the highlighting?
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/ANNOUNCEMENT%3A-Chili-1.9-much-faster-tf4524829s15494.html#a12922338
> Sent from the JQuery mailing list archive at Nabble.com.
>
>


-- 
Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com
---
The Past is a Memory
The Future a Dream
But Today is a Gift
That's why they call it
The Present


[jQuery] Re: When will the API be updated for 1.2.1?

2007-09-27 Thread Brandon Aaron
The documentation is going through some growing pains. Currently the only
source of documentation for 1.2.x is on the wiki. I've been thinking about
how we can take those docs and create an XML file like we had before ...
currently the only idea I have is to screen scrape which if you look at the
actual markup of the Wiki is a pain and doesn't scale well for inclusion of
plugins, etc. I've made a little progress (still have a long way to go) with
using Hpricot to at least get the core docs into XML.

--
Brandon Aaron

On 9/27/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
>  I use this:
> http://jquery.com/api/
>
> all the time because it's the simplest, easiest, reference for jQuery
> methods and behaviours. But it still lists it's version as 1.1.2. Are
> there plans to update this reference?
>
> Alternately, I'd argue that there needs to be ONE single point of entry
> (on the jQuery site at least) for a straight up reference. I'm not talking
> about the fluffy examples found in the wiki area, but just a terse
> explanation of the method, it's parameters, and how to use it.
>
> * 
>
> Andy Matthews
> *Senior ColdFusion Developer
>
> Office:  877.707.5467 x747
> Direct:  615.627.9747
> Fax:  615.467.6249
> [EMAIL PROTECTED]
> www.dealerskins.com
>
>
<>

[jQuery] Reload Page?

2007-09-27 Thread Danjojo

Is it possible to reload the page right after I set the cookie?
Cause I have to update all of the text in a different language..



// Flag image change on menu select, set the cookie with the spoken
language choice
// and reload the page in that language

$("#languages").bind('change', function() {
var country = $(this).val();
if(country) {
// This next line uses chainable methods starting at the
second .attr
$('#countryFlag').attr("src", "images/" + country +
".gif").attr("alt", country + " Flag");
$.cookie('language', country, {expires: 7}); // set cookie
}
});


A reload might be pointless though.. since I want to use Xpath plugin
to replace all the text into another language, that can all take place
on the page with the DOM replace?

Thank you.



[jQuery] Re: Site Using jQuery - Network Solutions

2007-09-27 Thread seedy


funny, I just had a co-worker Ive been introducing to jQuery yesterday say:
"[jQuery is] worth including even if only for the document.ready function"


Glen Lipka wrote:
> 
> Network Solutions just revamped their whole account manager.
> Guess what library they depend on?  It rhymes with Mayberry.
> 
> Looking at the code, it looks like they have a million places they SHOULD
> be
> using jQuery, but they don't use it anywhere I can see except 1 single
> line:
> 
> $(document).ready(function(){initMenu();});
> 
> That's all?  They have lines like this everywhere:
> 
> document.getElementById(myElementID).className = useClass;
> 
> Oh Well, it's a step in the right direction I suppose.
> 
> Glen
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Site-Using-jQuery---Network-Solutions-tf4526470s15494.html#a12923393
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] When will the API be updated for 1.2.1?

2007-09-27 Thread Andy Matthews
I use this:
http://jquery.com/api/
 
all the time because it's the simplest, easiest, reference for jQuery
methods and behaviours. But it still lists it's version as 1.1.2. Are there
plans to update this reference?
 
Alternately, I'd argue that there needs to be ONE single point of entry (on
the jQuery site at least) for a straight up reference. I'm not talking about
the fluffy examples found in the wiki area, but just a terse explanation of
the method, it's parameters, and how to use it.
 

 
Andy Matthews
Senior ColdFusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 
<>

[jQuery] Re: Toggling a checkbox

2007-09-27 Thread Glen Lipka
$(":checkbox").attr("checked","anyThingWillCheckIt")
$(":checkbox").removeAttr("checked")

Glen


On 9/27/07, Erik Beeson <[EMAIL PROTECTED]> wrote:
>
> To check or uncheck a checkbox, assign true or false to its 'checked'
> property (untested): $('#myCheckbox')[0].checked = true; or
> $('#myCheckbox').attr('checked', true);
>
> But it looks like you're trying to enable/disable them, in which case you
> probably want $(...).attr('disabled', 'disabled'); and
> $(...).removeAttr('disabled');
>
> --Erik
>
>
> On 9/27/07, voltron <[EMAIL PROTECTED]> wrote:
> >
> >
> > How would one toggle a checkbox?
> >
> > This does not work:
> >
> > $("#postcode_all").toggle(function(){
> > $("#intended_postcode-0").attr("disabled", "disabled");
> > },function(){
> > $("#intended_postcode-0").attr("enabled", "enabled");
> > });
> >
> > Thanks
> >
> >
>


[jQuery] Re: About jQuery.yav date validation

2007-09-27 Thread SeViR

weide escribió:
> I Search the web and found code like down:
> 
>  > 2. Can one validate date formats form other countries like Germany?
>
> This is a YAV config setting, by example Spain date format is
> dd-MM-, so in the second map param
> of the plugin I can set the YAV settings (see YAV reference):
> $("#myform").yav({
> onError:function(){
>$("#errorContainer").append($(".error"));  //Append all the
> error
> messages
>$(".error").not($("#errorContainer .error")).remove();  //
> Remove
> all the old errors but not in the errorContainer
> }
> },
>
> //Yav preferences in a second map object param
> {
> DATE_FORMAT: 'dd-MM-'
>
> });
> 
>
> But I have a problem.I set the DATE_FORMAT=-MM-dd
> so "2007-09-26" is ok,but 2007-9-26 is not OK.
>
> set -M-d,it seems not work
>
>
>   
Sorry but YAV original documentation is not very clear. The date codes
only are:
: for the year
MM: for the months
dd: for the days

You can use, alternatelly a regular expression
"^([0]?[1-9]|[1|2][0-9]|[3][0|1])[./-]?([0]?[1-9]|[1][0-2])[./-]?([0-9]{4}|[0-9]{2})$"

with the rule "regexp", example:



This regexp valid 09-05-2007, 9/4/2007, 12/03/08

If you need to validate dates in year-month-day this regular expression
is that you need.
^([0-9]{4}|[0-9]{2})?([0]?[1-9]|[1|2][0-9]|[3][0|1])[./-]?([0]?[1-9]|[1][0-2])[./-]$

-- 
Best Regards,
 José Francisco Rives Lirola 

 SeViR CW ・ Computer Design
 http://www.sevir.org
  
 Murcia - Spain



  1   2   >