[jQuery] Re: A jQuery success story

2007-07-20 Thread Andy Matthews

Sniff, sniff...I think I'm going to cry.

8)

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Price
Sent: Friday, July 20, 2007 9:33 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] A jQuery success story


Hi all,
Nothing like a good success story to warm the spirits before the weekend (as
if the fact the working week is over didn't do that enough!)

I first discovered jQuery a few months ago, when looking for an alternative
to YUI - which is a great library and well documented, but a little large
and awkward for my tastes.

I ferget what stage jQ was at but it's entirely possible it hadn't reached
version 1.0. Already I could see it's potential and power - CSS and XPath
selectors, chainable functions, and only 20k for the packed version. I began
to use it in small personal projects, eventually working my way up to a
level of confidence in it's ability and my understanding of it that I began
to use it on client's websites here. I can't claim to be a JavaScript expert
but with jQuery, I didn't have to be.

Over the last few months I have used jQuery to handle AJAX work such as
adding products to a shopping cart in the background, and combined it with
plugins like tabs, validation, accordion, modal windows and just about
everything in the interface library. Websites I work on bounce, fade, slide,
pop up confirmations much nicer than your average alert() and confirm() and
generally wow our clients with the effects I've been able to pull off. And -
most important of all - the sites work perfectly with JavaScript turned off.
Soon, I hope to be able to show you a booking system I've been working on
which blew our client's socks off. 
And an e-commerce site which did the same.

There's always been a problem though - I'm the only one in the office truly
sold on jQuery. A colleague of mine recently saw some code I'd done and
decided it looked simple enough to try at home. Over a weekend he'd
redesigned his football website to have drag and drop player positioning,
AJAX star ratings for players, and rounded-off corners on his DIVs - and
this with no prior jQuery knowledge other than what he'd seen me produce.
The problem still existed that if a JavaScript fix to one of my works was
required I was generally the only one who could do it.

No more! In this morning's annual review I told my bosses how much I loved
jQuery and how it had made keeping up with my ever increasing workload so
much easier. JavaScript now took minutes, not hours, and went further and
was more compatible than it would've ever been without jQuery running under
the hood. Convinced by my arguments and eulogising, I've now been given the
job of teaching all of my colleagues the art of jQuery in the hope that we
as a company can standardise on it for all present and future projects!

We're only a small company but I'm really pleased to be able to take my
enthusiasm for jQuery forward and have it power all of our websites - there
really isn't a better library or community for us to be relying on. Thank
you to John, or anyone else who works directly with the project and every
single person who's ever written a plug-in I've used or answered a question
I've asked. Our clients love you - but they don't know it. :)

Regards,
Michael Price




[jQuery] Re: Safari not resizing this object...

2007-07-20 Thread Andy Matthews

Sigh...

I was hoping I'd never have to install Safari on my computer. It would taint
me for all time.

But in the interest of making sure my software works in Apple's craptastic
product, I will submit to Steve Jobs.

Thank you for your help Dan. You're well written, informed, and always very
helpful.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dan G. Switzer, II
Sent: Friday, July 20, 2007 9:42 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Safari not resizing this object...


Andy,

>That doesn't seem to work either. I'm baffled. Not having Safari 
>available to me, it's really difficult to test. Can you check it now?

Not sure if this is good news to you or bad news, but I just tested that
link in Safari for Windows and it exhibits the same behavior you described
on the Mac (only the original height/width is shown.)

So, you should be able to download and install the Safari for Windows beta
to help you troubleshoot and resolve the issue. 

At least you can get your hands on Safari now!

>Also, we built this tool with plain ole Flash, so unfortunately I can't 
>answer a Flex question.

No problem!

-Dan




[jQuery] Re: Click to call a fuction?

2007-07-20 Thread Andy Matthews
Easy to do what you want:
 

 
$('#myImage').click(function(){
alert('testing');
});

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mitchell Waite
Sent: Friday, July 20, 2007 9:21 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Click to call a fuction?



Is there a way to call a jQuery function when someone clicks on an image
without making that image a hyperlink.

 

If that is the only way is there something you can put in the href to
eliminate the border that hyperlinks make.

 

Thanks

 

Mitch

 

PS I posted this as a question from Goofy last night and no one answered it.
Perhaps now that my status has been so graciously elevated and I am planning
a jQuery for Dummies book, someone might help me. Here is the previous
question

 

Why won't this work. It's so simple. I just want to call a function using
the on lick event. I want it to move a div called Panel.

 

I set up the function

 

function advmode() (

 
$("#Panel").SlideInRight(1000);

};

 

Then inside a table cell with an image for a button I have this simple link

 



 

I must be missing something really basic because this does not come close to
working. But this does:

 



 

$('#PanelButtonOpen2').click(function() {

$("#Panel").SlideOutRight(1000);

});

 

Thanks for any aid I am feeling very silly tonight.

 

Mitch

 



[jQuery] Re: Click to call a fuction?

2007-07-20 Thread Andy Matthews
Not a dumb question, and you're right. There's a LOAD of stuff that's really
core that isn't anywhere in the docs. It took me quite a while to figure
some of it out.
 
You can pass any arguments you want to this function. I personally find it
easier though to just get at what I need inside the function.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mitchell Waite
Sent: Friday, July 20, 2007 11:32 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Click to call a fuction?



Andy I know that was a dumb question but I really appreciate your help.
There is this entire body of knowledge that jQuery assumes that is really
not covered in any of the docs.

Can I pass parameters to the function with this ID approach?

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Friday, July 20, 2007 8:24 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Click to call a fuction?

 

Easy to do what you want:

 



 

$('#myImage').click(function(){

alert('testing');

});

 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mitchell Waite
Sent: Friday, July 20, 2007 9:21 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Click to call a fuction?

Is there a way to call a jQuery function when someone clicks on an image
without making that image a hyperlink.

 

If that is the only way is there something you can put in the href to
eliminate the border that hyperlinks make.

 

Thanks

 

Mitch

 

PS I posted this as a question from Goofy last night and no one answered it.
Perhaps now that my status has been so graciously elevated and I am planning
a jQuery for Dummies book, someone might help me. Here is the previous
question

 

Why won't this work. It's so simple. I just want to call a function using
the on lick event. I want it to move a div called Panel.

 

I set up the function

 

function advmode() (

 
$("#Panel").SlideInRight(1000);

};

 

Then inside a table cell with an image for a button I have this simple link

 



 

I must be missing something really basic because this does not come close to
working. But this does:

 



 

$('#PanelButtonOpen2').click(function() {

$("#Panel").SlideOutRight(1000);

});

 

Thanks for any aid I am feeling very silly tonight.

 

Mitch

 



[jQuery] Re: Click to call a fuction?

2007-07-20 Thread Andy Matthews

If you have multiple images to which you'd like to apply the click
functionality, then just change the jQuery code:



$('.someClass').click(function(){
alert('testing');
});

Same effect, except now every image with that class has that behaviour.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Goofy
Sent: Friday, July 20, 2007 12:31 PM
To: jQuery (English)
Subject: [jQuery] Re: Click to call a fuction?


What happens if you already have some 3rd party class on the image like
this:



If I add an ID the click never gets fired



My other question is this: the ID has to be unique for this approach to
work, right? You can't call the same function but have to make a new one.
That seems inefficient as I would be repeating the same function for every
click, only difference would be there IDs.



On Jul 20, 8:23 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Easy to do what you want:
>
> 
>
> $('#myImage').click(function(){
> alert('testing');
>
> });
>
>   _
>
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] 
> On Behalf Of Mitchell Waite
> Sent: Friday, July 20, 2007 9:21 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Click to call a fuction?
>
> Is there a way to call a jQuery function when someone clicks on an 
> image without making that image a hyperlink.
>
> If that is the only way is there something you can put in the href to 
> eliminate the border that hyperlinks make.
>
> Thanks
>
> Mitch
>
> PS I posted this as a question from Goofy last night and no one answered
it.
> Perhaps now that my status has been so graciously elevated and I am 
> planning a jQuery for Dummies book, someone might help me. Here is the 
> previous question
>
> Why won't this work. It's so simple. I just want to call a function 
> using the on lick event. I want it to move a div called Panel.
>
> I set up the function
>
> function advmode() (
>
> $("#Panel").SlideInRight(1000);
>
> };
>
> Then inside a table cell with an image for a button I have this simple 
> link
>
>  onclick="advmode()"> width="250" height="25" />
>
> I must be missing something really basic because this does not come 
> close to working. But this does:
>
>  id="PanelButtonOpen2"> width="250" height="25" />
>
> 
> $('#PanelButtonOpen2').click(function() {
>
> $("#Panel").SlideOutRight(1000);
>
> });
>
> Thanks for any aid I am feeling very silly tonight.
>
> Mitch




[jQuery] Re: Click to call a fuction?

2007-07-20 Thread Andy Matthews

You're probably right that your glossy and iradius50 "classes" are
interfering with jQuery code.

Have you tried this:
$('.glossy').click(function(){
alert('testing');
}

Concerning the xPath options that the previous poster mentioned. Let's
pretend we have a navbar (id=navigation) with multiple buttons inside it,
like so:







Now each of those buttons has a number of ways that you can access it:

$('img') // assuming that you want all images to have the click behaviour
$('.glossy') //only images with the glossy class applied to it
$('#navigation img') //all images contained within the div with an id of
navigation

This last one might be the most useful to you, assuming that these buttons
have a parent container with a unique identifier.
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mitchell Waite
Sent: Friday, July 20, 2007 1:41 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Click to call a fuction?


How generous of you to go into this detail and give me so many options.
Sadly I tried all of these techniques and none of them worked.

1. The mixing of the ID and class in my first example still didn't work.

2. The idea of adding the additional class xyz to the existing class didn't
work. It may be because

class="glossy iradius50"

"glossy" is a cool plugin that modifies button images so they have curved
edges and look like glass and "iradius50" is a parameter for glossy. Glossy
is just is. 

3. Using an .xyz class in the div did not work either. I am not sure why.
Perhaps the two classes are interfering with each other.

I need to read more about selectors.

It may also be my project has too many bells and whistles that it's not a
true test of your ideas.

-
Essentially, you need some way with CSS (or possibly XPath) selectors to
distinguish the elements that need your new behavior.  Create a selector for
those elements and create a JQuery object from them using the "$()" 
function.  Then it's easy to send a behavior to the click method of this
JQuery object.
--

I have read this 10 times and I am still not sure what you are saying. 

Mitch

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Sauyet
Sent: Friday, July 20, 2007 11:01 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Click to call a fuction?


Goofy wrote:
> What happens if you already have some 3rd party class on the image 
> like this:
> 
> 
> 
> If I add an ID the click never gets fired
> 
>  class="glossy iradius50" alt="" />

It should.  This

 $('#PanelOpenGlossy').click(function(){
 alert('testing');
 }

should work.

> My other question is this: the ID has to be unique for this approach 
> to work, right? You can't call the same function but have to make a 
> new one. That seems inefficient as I would be repeating the same 
> function for every click, only difference would be there IDs.

If you can add an additional class, e.g. class="glossy iradius50 xyz", to
all the relevant images, then you can simply change the selector above:

 $('.xyz').click(function(){
 alert('testing');
 }

Notice the change from "#" to "."; this is the CSS way of switching from ids
to classes.

If you can't add this class, you'll need to find some other way of
distinguishing them from images that shouldn't have this functionality. 
  For instance if this is all the images inside any div with class
"clickable", then you might use:

 $("div.clickable img").click(function() {
 alert('testing');
 }

Or if you need only those images inside the div with id "main" that don't
have the class "ignoreMe", you might try

 $("#main img").not(".ignoreMe").click(function() {
 alert('testing');
 }

Essentially, you need some way with CSS (or possibly XPath) selectors to
distinguish the elements that need your new behavior.  Create a selector for
those elements and create a JQuery object from them using the "$()" 
function.  Then it's easy to send a behavior to the click method of this
JQuery object.

Good luck,

   -- Scott






[jQuery] Re: Server Time of the day Clock functions

2007-07-20 Thread Andy Matthews

That would probably be best done on the server side. When the page loads,
check the time and provide an alternate CSS file.

Unless of course you'd like the page to change after it has already loaded.
Then yes, jQuery could be used to do that. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, July 20, 2007 4:04 PM
To: jQuery (English)
Subject: [jQuery] Server Time of the day Clock functions


Can jquery be used to load a different site design (skin if you like)
according to the hosting server clock time.
The inspiration for the idea is:
http://www.taprootcreative.com/
Which loads different site backgrounds and background sounds.
Not quite sure how they have their version working.
Too see both versions whether than waiting until the time changes via the
Tallahassee, Florida server clock, check here:
http://web.archive.org/web/*/www.taprootcreative.com
Click on anything after Feb 27, 2007 both versions are archived.

Of course I always think jquery can do about anything, this is a sort of
time travel right... ;)




[jQuery] Re: Can jQuery get attributes of the actual style sheet?

2007-07-23 Thread Andy Matthews
Actually IE does support that class, but only on A tags.
 
Just to be fair.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Penner
Sent: Monday, July 23, 2007 4:28 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Can jQuery get attributes of the actual style sheet?


IE does not support the CSS class :active but FireFox does.  I use this to
change the background color on a div to give feedback similar to a button
click.

For IE users I attach the mousedown and mouseup events to a function that
simply does the same thing.  However, if I ever change the color in my CSS
class I have to remember to change the jQuery function to match. 

Can I have jQuery find this background color attribute in the css class in
the style sheet?  If so, I could just change it once in the CSS style sheet
and jQuery would use the latest value.

I haven't seen any examples on obtaining values from a style sheet so I
thought I'd ask if it was even possible. 

Thanks,
Matt Penner



[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Andy Matthews

Span is an inline element and cannot have a width applied to it, unless you
display it as a block, which would sort of defeat the purpose of having it
inline. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nmiddleweek
Sent: Friday, November 07, 2008 9:46 AM
To: jQuery (English)
Subject: [jQuery] span tag is width:80px but is only showing the width of
contents?


Hello,

I've got a SPAN tag which is set to 80px...

A


The contents of the SPAN is a single character and when rendered on screen,
the green SPAN is showing as only approx 15 pixels in width.

How can I force the width to be 80px?


Thanks,
Nick




[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Andy Matthews

That's a LOT of markup.

You could actually use an input field if you just want to set a background
color an some text. It might look like this:



 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Hector Virgen
Sent: Friday, November 07, 2008 10:30 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: span tag is width:80px but is only showing the width
of contents?

Wrap the input in a div with and set the div's position to relative.

Then, add the span as as a div, set the width, and position it absolutely.
Its absolute position will be relative to the container div, not the page.



test 


-Hector



On Fri, Nov 7, 2008 at 8:04 AM, nmiddleweek <[EMAIL PROTECTED]>
wrote:



Yes that works...

What I'm trying to do is display a SPAN atg at the end of an Input
text field of a fixed size. If I set the display to block, it is
forcing itself to be on the next line.

Have you got any idea on how I can do this?


Cheers,
Nick



On Nov 7, 3:48 pm, mbraybrook <[EMAIL PROTECTED]> wrote:
> try:
> A span>
>
> Does that work?
>
> M
>
> On Nov 7, 3:45 pm, nmiddleweek <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I've got a SPAN tag which is set to 80px...
>
> > A
>
> > The contents of the SPAN is a single character and when rendered
on
> > screen, the green SPAN is showing as only approx 15 pixels in
width.
>
> > How can I force the width to be 80px?
>
> > Thanks,
> > Nick






[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Andy Matthews

Actually that will NOT fix it all. That makes the span into a block level
element which will force it to the next line.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Liam Potter
Sent: Friday, November 07, 2008 11:08 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: span tag is width:80px but is only showing the width
of contents?


the most simple way to do this, is to simply apply display:block on the
span.
A

that will fix it all.

Andy Matthews wrote:
> That's a LOT of markup.
>
> You could actually use an input field if you just want to set a 
> background color an some text. It might look like this:
>
>   type="text" name="name" value="some text" style="width:
> 80px;background: #ff; border: 0px;height: 20px;" />
>  
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] 
> On Behalf Of Hector Virgen
> Sent: Friday, November 07, 2008 10:30 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: span tag is width:80px but is only showing the 
> width of contents?
>
> Wrap the input in a div with and set the div's position to relative.
>
> Then, add the span as as a div, set the width, and position it absolutely.
> Its absolute position will be relative to the container div, not the page.
>
> 
> 
> test 
>
>
> -Hector
>
>
>
> On Fri, Nov 7, 2008 at 8:04 AM, nmiddleweek 
> <[EMAIL PROTECTED]>
> wrote:
>
>
>
>   Yes that works...
>   
>   What I'm trying to do is display a SPAN atg at the end of an Input
>   text field of a fixed size. If I set the display to block, it is
>   forcing itself to be on the next line.
>   
>   Have you got any idea on how I can do this?
>   
>   
>   Cheers,
>   Nick
>   
>
>
>   On Nov 7, 3:48 pm, mbraybrook <[EMAIL PROTECTED]> wrote:
>   > try:
>   > A   > span>
>   >
>   > Does that work?
>   >
>   > M
>   >
>   > On Nov 7, 3:45 pm, nmiddleweek <[EMAIL PROTECTED]> wrote:
>   >
>   > > Hello,
>   >
>   > > I've got a SPAN tag which is set to 80px...
>   >
>   > > A
>   >
>   > > The contents of the SPAN is a single character and when rendered

> on
>   > > screen, the green SPAN is showing as only approx 15 pixels in 
> width.
>   >
>   > > How can I force the width to be 80px?
>   >
>   > > Thanks,
>   > > Nick
>
>
>
>
>   




[jQuery] Re: animated robot cartoon with jquery

2008-11-07 Thread Andy Matthews

Anthony...

Is the robot supposed to do anything other than drive across the screen? I'm
looking for buttons which might cause him to do things, but not seeing them.
Is this part of what you're working on, and it's just not in place?

This is really well done by the way. I might show this to my daughter once
it's done.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of anthony.calzadilla
Sent: Friday, November 07, 2008 11:58 AM
To: jQuery (English)
Subject: [jQuery] Re: animated robot cartoon with jquery


Hi,
I changed the 'bounceHim' function a bit so that the different pieces of the
robot look like they are separated and bouncing individually:

function bounceHim(){
$("#sec-content,#branding").animate({top:"-=5px"},
150).animate({top:"+=5px"},150);

$("#content").animate({top:"-=8px"},150).animate({top:"+=8px"},150);
setTimeout("bounceHim()",300);
}

http://robot.anthonycalzadilla.com/

Once again thanks for your insight. I really am a complete novice at
programming in general. I'm really scrutinizing your code so as to learn
from it.

-Anthony


On Nov 7, 8:34 am, CodingCyborg <[EMAIL PROTECTED]> wrote:
> I just noticed, after looking over the code again, that since you have 
> all three pieces of the robot that are bouncing bounce at the same 
> time the line of code can be condensed into one. As well as the two 
> that bounce together at the beginning.
> This:
>
>         
> $("#content").animate({top:"-="+num+"px"},150).animate({top:"+="+num
> +"px"},150);
>         
> $("#branding").animate({top:"-="+num+"px"},150).animate({top:"+="+num
> +"px"},150);
>
> Becomes this:
>
>         $("#content,#branding").animate({top:"-="+num+"px"},
> 150).animate({top:"+="+num+"px"},150);
>
> And in the next function this:
>
>         
> $("#sec-content").animate({top:"-=5px"},150).animate({top:"+=5px"},
> 150);
>         
> $("#content").animate({top:"-=5px"},150).animate({top:"+=5px"},150);
>         
> $("#branding").animate({top:"-=5px"},150).animate({top:"+=5px"},150);
>
> Becomes this:
>
>         $("#sec-content,#content,#branding").animate({top:"-=5px"},
> 150).animate({top:"+=5px"},150);
>
> Of course, if you wished to have each part bounce a different amount 
> or at different rates you would need to set up different "timeouts"
> with different functions if they couldn't be set with the current 300 
> ms function. But if you wanted something to go at half speed or a 
> whole number multiple speed you could just changed how much code was 
> in the function and the numbers associated with it. (If any of that 
> makes sense.)
>
> But that saves more code, and again, makes the file a bit (Quite 
> seriously only  a few bits :P) smaller.
>
> On Nov 7, 12:44 am, "anthony.calzadilla"
>
> <[EMAIL PROTECTED]> wrote:
> > Wow! Thank you CodingCyborg! Thank You! I'm going to study and learn 
> > from your code example and implement it into mine.
>
> > -Anthony
>
> > On Nov 7, 12:24 am, CodingCyborg <[EMAIL PROTECTED]> wrote:
>
> > > I made a few more modifications such that the robot doesn't keep 
> > > bouncing and the sky keep moving when the ground has stopped. 
> > > Though I did the cheap way, in the sense that I just made it a 
> > > short clip rather than a full length repeat.
>
> > >http://codingcyborg.com/jQueryFun/Robot/robot.html
>
> > > That has the same basic directory set up, but with the modified 
> > > script.js file for viewing.
>
> > > On Nov 6, 11:07 pm, CodingCyborg <[EMAIL PROTECTED]> wrote:
>
> > > > This is Beautiful! To save yourself from the copy/paste to 
> > > > create the repeated bounce, and to make the file smaller, you 
> > > > can simply replace the three lines that were enormously long with
this:
>
> > > > startHim();
>
> > > > And then add this at the bottom of the js file:
>
> > > > var num = 1;
> > > > function startHim(){
> > > >         num++;
> > > >         
> > > > $("#sec-content").animate({top:"-=5px"},150).animate({top:"+=5px
> > > > "},
> > > > 150);
> > > >         
> > > > $("#content").animate({top:"-="+num+"px"},150).animate({top:"+="
> > > > +num
> > > > +"px"},150);
> > > >         
> > > > $("#branding").animate({top:"-="+num+"px"},150).animate({top:"+=
> > > > "+num
> > > > +"px"},150);
> > > >         if(num<4){
> > > >                 setTimeout("startHim()",300);
> > > >         } else {
> > > >                 setTimeout("bounceHim()",300);
> > > >         }
>
> > > > }
>
> > > > function bounceHim(){
> > > >         
> > > > $("#sec-content").animate({top:"-=5px"},150).animate({top:"+=5px
> > > > "},
> > > > 150);
> > > >         
> > > > $("#content").animate({top:"-=5px"},150).animate({top:"+=5px"},1
> > > > 50);
> > > >         
> > > > $("#branding").animate({top:"-=5px"},150).animate({top:"+=5px"},
> > > > 150);
> > > >         setTimeout("bounceHim()",300);
>
> > > > }
>
> > > > This allows for more control of the looped animation and easier 
> > > > to edit the "bounciness" of th

[jQuery] Re: animated robot cartoon with jquery

2008-11-07 Thread Andy Matthews

He's only saying that so he can get out of responsibility.

:) 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Friday, November 07, 2008 12:04 PM
To: jQuery (English)
Subject: [jQuery] Re: animated robot cartoon with jquery


> Unfortunately, I'm new to jQuery and Javascript, too, so I'm of no use 
> to you on the code.

Say what?  Rick, you've been contributing to the mailing list for over two
years.  I think the honeymoon phase is over for you!  :-)




[jQuery] Re: get form id from button click

2008-11-07 Thread Andy Matthews

After you've clicked the submit button for a form:

Var myID = $(this).attr('id'); 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of lance123
Sent: Friday, November 07, 2008 3:09 PM
To: jQuery (English)
Subject: [jQuery] get form id from button click


Hi To All,

How do I get the form id from a button click.

I have multiple forms with dynamic id's and want to get the id to pass it
back to an ajax form function ie

$("#"+form_id)

any help much appreciated.

Thanks,

Lance




[jQuery] Re: [ANNOUNCEMENT] jquery.timepickr.js: first official release

2008-11-11 Thread Andy Matthews

I think it looks great. Only suggestion I have is to get the selection
portion of the plugin hidden until needed. Say, slide it down when the time
field is hovered over? It just takes up too much room right now.



andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeffrey Kretz
Sent: Tuesday, November 11, 2008 9:35 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [ANNOUNCEMENT] jquery.timepickr.js: first official
release


I think it's a great idea --it's a zillion times friendlier than an alert
validator in ensuring properly formatted data.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Liam Potter
Sent: Tuesday, November 11, 2008 7:16 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [ANNOUNCEMENT] jquery.timepickr.js: first official
release


Nice plugin but, how often do you need to input the time into a form? 
and then, is it really that hard to input the time into a form?

Alexandre Plennevaux wrote:
> impressive, congratz !
>
> On Tue, Nov 11, 2008 at 3:34 PM, h3 <[EMAIL PROTECTED]> wrote:
>   
>> Hi everyone,
>>
>> Yesterday I released the first public release of my jquery.timepickr
>> plugin.
>>
>> I've posted it on the jQuery plugin page:
>> http://plugins.jquery.com/project/jquery-timepickr
>>
>> Home page:
>> http://haineault.com/media/jquery/ui-timepickr/page/
>> 





[jQuery] Re: has anyone come across a plugin like this ?

2008-11-11 Thread Andy Matthews

I'd be interested in this as a plugin as well.

On Nov 11, 4:21 pm, heysatan <[EMAIL PROTECTED]> wrote:
> That's a start.
>
> On Nov 10, 4:13 pm, Microbe <[EMAIL PROTECTED]> wrote:
>
> > Demand # 1
>
> > :o)
>
> > On Nov 11, 8:57 am, heysatan <[EMAIL PROTECTED]> wrote:
>
> > > Hi Sean,
>
> > > I built this breadcrumb animation.  Due to time limitations at the end
> > > of the project I wasn't able to make it into a plugin (I built a lot
> > > of other plugins for this project), but I'd like to when I get a
> > > chance.
>
> > > I really solved a problem for us because our category and page titles
> > > are so long (scientists are long winded).  Before we would show only a
> > > couple of steps in the HTML to get around this.  This method was more
> > > SEO friendly, more usable, and I thought, kind of cool.
>
> > > If there is a demand for it I'll work on porting it to a plugin, but
> > > probably not for the next 2 weeks or so.
>
> > > Jason
> > > Lead UI Developer - CompareNetworks
>
> > > On Nov 10, 1:21 am, CliffordSean <[EMAIL PROTECTED]> wrote:
>
> > > > see the breadcrumb on here 
> > > > :http://www.biocompare.com/ProductDetails/386912/1/Mutation-Generation...
> > > > has anyone come across a plugin like this ?
>
> > > > tnx
> > > > sean
> > > > --
> > > > View this message in 
> > > > context:http://www.nabble.com/has-anyone-come-across-a-plugin-like-this---tp2...
> > > > Sent from the jQuery General Discussion mailing list archive at 
> > > > Nabble.com.


[jQuery] Effect like Kwicks plugin

2008-11-17 Thread Andy Matthews
I'm looking to achieve an effect similar to that of the Kwicks plugin
<http://www.jeremymartin.name/projects.php?project=kwicks> . However, I
don't want to use this for navigation, I want to use it for the main body of
my site. Currently it looks like the Kwicks plugin can only work on list
items, but I'd like something which can be applied to div tags. One
<http://www.jeremymartin.name/examples/kwicks.php?example=7>  of the
examples shows the use of divs inside the list item tags, but I don't think
that's valid xHTML so I'd rather not use that method.

 

Does anyone know if there's a similar plugin that can be applied to div
tags, or does anyone have plain code they might share which can do this?
I've already got something that "works" but doesn't look all that good:

 

http://commadelimited.com/code/maternitymealplanner/

 

The problems I'm having with my version are:

 

1)  Far right div gets pushed to bottom as animation plays out

2)  Animation is a little jerky as the various elements position
themselves 

3)  Occasionally, the cursor will position itself just right and the
animation will queue up and then go on for like an extra 5 seconds after the
mouse is moved off of it.

 

 

Thanks peeps

Andy Matthews



[jQuery] Re: Effect like Kwicks plugin

2008-11-17 Thread Andy Matthews

Here's a version I've got using the kwicks plugin and divs nested inside the
LI tags:

http://commadelimited.com/code/maternitymealplanner/kwicks-1.html

It's working quite well, but I'm still not convinced that nesting divs
inside list items is a good idea.



andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Monday, November 17, 2008 8:53 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Effect like Kwicks plugin

I'm looking to achieve an effect similar to that of the Kwicks plugin
<http://www.jeremymartin.name/projects.php?project=kwicks> . However, I
don't want to use this for navigation, I want to use it for the main body of
my site. Currently it looks like the Kwicks plugin can only work on list
items, but I'd like something which can be applied to div tags. One of the
examples <http://www.jeremymartin.name/examples/kwicks.php?example=7>  shows
the use of divs inside the list item tags, but I don't think that's valid
xHTML so I'd rather not use that method.

 

Does anyone know if there's a similar plugin that can be applied to div
tags, or does anyone have plain code they might share which can do this?
I've already got something that "works" but doesn't look all that good:

 

http://commadelimited.com/code/maternitymealplanner/

 

The problems I'm having with my version are:

 

1)  Far right div gets pushed to bottom as animation plays out

2)  Animation is a little jerky as the various elements position
themselves 

3)  Occasionally, the cursor will position itself just right and the
animation will queue up and then go on for like an extra 5 seconds after the
mouse is moved off of it.

 

 

Thanks peeps

Andy Matthews





[jQuery] Re: Effect like Kwicks plugin

2008-11-17 Thread Andy Matthews

Anyone have any input on this?

I'd also like to determine if I can use percentages for the widths of
the items.

On Nov 17, 9:28 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Here's a version I've got using the kwicks plugin and divs nested inside the
> LI tags:
>
> http://commadelimited.com/code/maternitymealplanner/kwicks-1.html
>
> It's working quite well, but I'm still not convinced that nesting divs
> inside list items is a good idea.
>
> andy
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Andy Matthews
> Sent: Monday, November 17, 2008 8:53 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Effect like Kwicks plugin
>
> I'm looking to achieve an effect similar to that of the Kwicks plugin
> <http://www.jeremymartin.name/projects.php?project=kwicks> . However, I
> don't want to use this for navigation, I want to use it for the main body of
> my site. Currently it looks like the Kwicks plugin can only work on list
> items, but I'd like something which can be applied to div tags. One of the
> examples <http://www.jeremymartin.name/examples/kwicks.php?example=7>  shows
> the use of divs inside the list item tags, but I don't think that's valid
> xHTML so I'd rather not use that method.
>
> Does anyone know if there's a similar plugin that can be applied to div
> tags, or does anyone have plain code they might share which can do this?
> I've already got something that "works" but doesn't look all that good:
>
> http://commadelimited.com/code/maternitymealplanner/
>
> The problems I'm having with my version are:
>
> 1)      Far right div gets pushed to bottom as animation plays out
>
> 2)      Animation is a little jerky as the various elements position
> themselves
>
> 3)      Occasionally, the cursor will position itself just right and the
> animation will queue up and then go on for like an extra 5 seconds after the
> mouse is moved off of it.
>
> Thanks peeps
>
> Andy Matthews


[jQuery] Re: Effect like Kwicks plugin

2008-11-17 Thread Andy Matthews

Hrm...

I looked at the src, but didn't see that. I'll check it out and see what
happens. Thanks for pointing that our Karl.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Karl Swedberg
Sent: Monday, November 17, 2008 2:33 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Effect like Kwicks plugin

Hi Andy,

I don't see any reason why you couldn't use the Kwiks for jQuery plugin with
something other than list items. Just remove the 'li' from the .children()
method in line 28:

var kwicks = container.children('li');

becomes

var kwicks = container.children();



Untested.


--Karl


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




On Nov 17, 2008, at 3:04 PM, Andy Matthews wrote:



Anyone have any input on this?

I'd also like to determine if I can use percentages for the widths
of
the items.
    
On Nov 17, 9:28 am, "Andy Matthews" <[EMAIL PROTECTED]>
wrote:


Here's a version I've got using the kwicks plugin and divs
nested inside the


LI tags:




http://commadelimited.com/code/maternitymealplanner/kwicks-1.html



It's working quite well, but I'm still not convinced that
nesting divs


inside list items is a good idea.



andy



-Original Message-


From: jquery-en@googlegroups.com
[mailto:[EMAIL PROTECTED] On



Behalf Of Andy Matthews


Sent: Monday, November 17, 2008 8:53 AM


To: jquery-en@googlegroups.com


Subject: [jQuery] Effect like Kwicks plugin



I'm looking to achieve an effect similar to that of the
Kwicks plugin


<http://www.jeremymartin.name/projects.php?project=kwicks> .
However, I


don't want to use this for navigation, I want to use it for
the main body of


my site. Currently it looks like the Kwicks plugin can only
work on list


items, but I'd like something which can be applied to div
tags. One of the


examples
<http://www.jeremymartin.name/examples/kwicks.php?example=7>  shows


the use of divs inside the list item tags, but I don't think
that's valid


xHTML so I'd rather not use that method.



Does anyone know if there's a similar plugin that can be
applied to div


tags, or does anyone have plain code they might share which
can do this?


I've already got something that "works" but doesn't look all
that good:



http://commadelimited.com/code/maternitymealplanner/



The problems I'm having with my version are:



1)  Far right div gets pushed to bottom as animation
plays out



2)  Animation is a little jerky as the various elements
position


themselves



3)  Occasionally, the cursor will position itself just
right and the


animation will queue up and then go on for like an extra 5
seconds after the
    

mouse is moved off of it.



Thanks peeps



Andy Matthews







[jQuery] Re: getJSON and twitter

2008-11-18 Thread Andy Matthews

I've noticed this too. It'll work great for a few page reloads, and then
pow, error.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ralph Whitbeck
Sent: Monday, November 17, 2008 11:57 PM
To: jQuery (English)
Subject: [jQuery] getJSON and twitter


I wrote a blog post awhile ago on how to pull in Twitters API via JSON
and consume it with jQuery.

http://damnralph.com/2007/11/20/PullingTwitterUpdatesWithJSONAndJQuery.aspx

As you can see in the comments some people are having problems with
the code I posted.  The problem seems to be when you reload the page.
jQuery seems to add a second callback method thus making the JSON data
from twitter invalid and breaking the javascript on the page.

Here is a page that only has the example code:
http://www.damnralph.com/content/binary/twitter-json-jquery.html

Can someone look at this and tell me 1. am I doing something wrong? 2.
Is this a bug with getJSON and should I post a bug report? 3. Is this
just a bug with the Twitter API and should I post a bug report?

Thanks




[jQuery] Re: newbies question

2008-11-19 Thread Andy Matthews

Assuming there's only a handful of characters that might be at the beginning
of the test1 string, you could use a regular expression, like so:

var test1 = 'a8';
if (test1.match(/^[abcd]8/)) alert('true');

Run those two lines and you should get an alert box saying 'true'. Change
the a to a z, and you'll get nothing.


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alfredo Alessandrini
Sent: Wednesday, November 19, 2008 9:49 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] newbies question


Hi,


Can I simplify this if statement?


 if (test1 == 'a8' || test1 == 'b8' || test1 == 'c8' || test1 == 'd8'
..


I must select some values, the first is a letter and the second is a
number (always the number 8: a8, b8, c8, d8, ecc..)


Thaks in advance,

Alfredo




[jQuery] Re: help with hover function

2008-11-19 Thread Andy Matthews

The hover method is your best bet. It might look like this based on your
example:

$("li > a").hover(function(){
alert('mouse over');
},function(){
alert('mouse out');
});




-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JamesLov
Sent: Wednesday, November 19, 2008 3:09 PM
To: jQuery (English)
Subject: [jQuery] help with hover function


Hi,

I have been using jquery for several projects and I am very happy with
how easy it is to use.  I need some help with (I think) chaining
functions, or using callbacks because I'm not sure I quite understand
how to tell jquery to go like this:

mouseEnter -> do this -> stop -> do this

Specifically I have a page that I am building that is setup with
thumbnails of images.  Please take a look here:

http://jameslovinsky.com/couture/index.php

When you mouseOver the thumbnail the main image and caption should
fadeIn.  When you mouseOver the next function I want the visible span
to fadeOut, then the new span to fadeIn.  Currently its set so that
each span will fadeOut when the mouse leaves the thumbnail.  This is
how the HTML is setup (pseudocode):




   


Its setup this way so it will degrade gracefully as IE6 doesn't
allow :hover on anything other than a elements.  Anyway, the jquery I
tried to make this work the way I described above is (I tried
mouseOver and hover functions as well):

$("li > a")
.bind("mouseenter",
function(){
$("span").fadeOut(1000);
$(this).find("span").css("visibility", "visible").fadeIn
(1000);
$(".center").children("img").hide
();
}
);

But then when you mouseOver the thumbnail the image will fade in and
out in a loop until you move the mouse off.

Can anyone suggest a way to either select and fade out any span that
is not a descendant of $(this) li > a for the first part of the
function, or a way to chain the functions so that the effect is

select any visible spans -> fade them out -> stop -> select descendant
span of $(this) -> fade it in

Thank you in advance for any help you can give me.

James Lovinsky




[jQuery] Re: treeview pluging issues - .find(">.hitarea")

2008-11-20 Thread Andy Matthews

Without seeing the rest of the code, the > .hitarea is a CSS selector for
direct descendants. There's generally something on the left of the angle
bracket such as :

body > .hitarea

Which would apply ONLY to those objects with a class of hitarea directly
inside the body tag.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of alextait
Sent: Thursday, November 20, 2008 9:00 AM
To: jQuery (English)
Subject: [jQuery] treeview pluging issues - .find(">.hitarea")


I am fairly new to jquery and I am trying to create a product/category
browser/tree using the treeview plugin and ajax.

My first simple issue is this peice of code i am trying to understand.

.find(">.hitarea")

what is happening here ? I understand the find functino but not sure
about the chevron usage ?

the overall problem is this.

On viewing my list. if i click on one of the initial categories the
second sub categories show up fine. I can then contract this sub list
if i wish. If i leave this open and click on one of the sub categories
for some reason i cannot then contract it again.

I have looked into the treeview plugin code and found that the
"toggler" method which would normaly just contract the list branch
fires twice causing it to hide again.

If anyone has any idea on thie general problem that would be great.

thanks for any help in advance




[jQuery] Re: How can i do Image rollover with simple gamma change?

2008-11-24 Thread Andy Matthews

Yes...

You can use the animate method to fade in/out any element by applying
opacity.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of expat101
Sent: Monday, November 24, 2008 3:04 PM
To: jQuery (English)
Subject: [jQuery] How can i do Image rollover with simple gamma change?


I would like to have an image rollover with just basic gamma change to
highlight an image...can this be done with basic jquery?




[jQuery] Re: Callback on $.Post not firing

2008-11-24 Thread Andy Matthews

Is it maybe generating an error? Try converting to a .ajax call so that
you've got access to the error method handlers.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rage9
Sent: Monday, November 24, 2008 3:43 PM
To: jQuery (English)
Subject: [jQuery] Callback on $.Post not firing


This is driving me loopy.  Simple post, trying to get a result back
from the server.  Heck even copied it from the documentation and the
callback just will not fire, but the post works fine:

var answer = confirm("Delete Selected?");
if (answer){
$.post("test.php", { name: "test" }, function(data){
alert("popped off!");
 alert(data.name); // John
 console.log(data.time); //  2pm
}, "json");
}

PHP:

"John","time"=>"2pm"));

?>

I also tried with XML with no luck either.  Firebug doesn't seem to
show a response, but I know the post variables are passed just fine,
because I wrote a logger [not included] to tell me what the variables
where being passed.  No dice on the return info.  Tried this with both
firefox and opera and in neither the call-backe worked.

Ideas?




[jQuery] ANN: Books-a-million.com using jQuery

2008-11-24 Thread Andy Matthews

I used to work for the web company who developed the original BAM
site, and now a friend of mine is project manager for them. They just
released a new version of their website and it uses jQuery:

http://www.booksamillion.com/

>From the source, it looks like they're really only making use of an
accordion plugin, but hey...another notch in the belt of jQuery.


[jQuery] Re: Has jQuery development halted?

2008-11-26 Thread Andy Matthews

Have you reviewed the roadmaps for 1.2 and 1.3?

http://docs.jquery.com/JQuery_1.2_Roadmap

http://docs.jquery.com/JQuery_1.3_Roadmap


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bob den Otter
Sent: Wednesday, November 26, 2008 8:54 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Has jQuery development halted?


Hi all,

There hasn't been a jQuery update in what seems like ages, and jQuery UI 
1.6 will be released 'in the next few days' since somewhere in 
september.  I know John has been really busy with a lot of great things, 
but it seems to me like the development of jquery has seriously lagged 
the last few months.

As a small example: there isn't even a way to detect chrome in the 
official jquery builds yet, and chrome has been out for several months now.

I'm afraid that the lack of updates will eventually have a negative 
impact on the great Query community, causing people to leave for other 
js frameworks. I sincerely hope not, but i _am_ worried about it.

Best, Bob.




[jQuery] Re: quote standards

2008-11-28 Thread Andy Matthews

Yes. I am. Plus single quoting is slightly faster due to it's "lower case"
nature. No need to hold down the shift key. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of seasoup
Sent: Friday, November 28, 2008 2:47 PM
To: jQuery (English)
Subject: [jQuery] quote standards


I've started using a single quote inside of all $() when quotes are needed
because it makes creating DOM elements much simpler. $('') or $(' and for consistency
doing $('#anId').   Anyone else doing the same thing?

Josh Powell




[jQuery] Re: Adding IMG attributes

2008-12-01 Thread Andy Matthews

The best way (IMO) to know if they're working is to view this site in
Firefox with the Web Developers Toolbar. Under the View Source button on the
toolbar is an option for "view generated source". This will show you the
results of the page after any JavaScript has been executed. It'll display
new attributes, changed attributes, new DOM nodes, etc.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of enchance
Sent: Friday, November 28, 2008 7:52 PM
To: jQuery (English)
Subject: [jQuery] Adding IMG attributes


I'm trying to add several attributes to all my img tags but I'm not sure if
they're both working. Could you verify if these are correct?

$(document).ready(function(){
//add the width and height for each image $('img').each(function(){
   $(this).attr('width', $(this).width());
   $(this).attr('height', $(this).height()); });

//copy alt to title
$('img').attr('title', function(){
   $(this).attr('alt');
});
});

Am I doing the right thing?




[jQuery] Re: Double right-click, anyone?

2008-12-01 Thread Andy Matthews

I don't think there's a default "double right click" event handler, but this
wouldn't be that hard to write.

Psuedo code
---
$('#someElement').rightclick(function(){
totalClicks = 0;
if (totalClicks == 2) {
// do some stuff
totalClicks = 0;
} else {
totalClicks++;
}
});
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of TheBlueSky
Sent: Saturday, November 29, 2008 6:21 AM
To: jQuery (English)
Subject: [jQuery] Double right-click, anyone?


Hi everyone,
Does anyone has code, implementation, plug-in or whatever to detect double
right-click? I'm searching and trying for couple of days now without any
result.
Appreciate any help.




[jQuery] Re: Image rollover using jQuery

2008-12-01 Thread Andy Matthews

That's a terrible way of doing a swap image. That's adding a load of crap
into the actual HTML, most likely creating invalid xHTML and if that's the
author's solution then you might as well just use Dreamweaver as it will do
that for you. A better solution is to use seasoup's method, or one similar
to it:

$('img').hover(function() {
  $(this).attr('src',path + '' + $('this).attr('id') + '_over.gif'; },
function() {
  $(this).attr('src',path + '' + $('this).attr('id') + '_off.gif'; }); 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of howa
Sent: Sunday, November 30, 2008 10:46 PM
To: jQuery (English)
Subject: [jQuery] Re: Image rollover using jQuery


Maybe this:

http://code.google.com/p/jquery-swapimage/



On Nov 30, 5:14 pm, Ray M <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Are there any existing jQuery plugin which can provide similar image 
> rollover functions such as the one provided by Dreamweaver?
>
> Thanks.
>
> Ray




[jQuery] Re: Ajax to return more values

2008-12-01 Thread Andy Matthews

If you're using a 3rd party JSON library, then you'd just pass in whatever
language construct you've got and let the library encode for you.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of me-and-jQuery
Sent: Monday, December 01, 2008 11:04 AM
To: jQuery (English)
Subject: [jQuery] Ajax to return more values


Ho-ho-ho.

I wonder what is the best practice if I want to get 2 or three values back
to function with ajax. The last value would be lots of html code and first
two kind of state values (number or short string). I don't like jSON a lot,
since you need to return one-line response and you must be careful with a
shape (" and }). Second option is having a regex to fetch first two values
and all remaining is a third value.

And what do you think is the best solution here?


Happy December,
me-and-jQuery




[jQuery] Fixed div, content scrolls under it

2008-12-02 Thread Andy Matthews
I'm looking at the possibility of having navigation at the top of the page,
pinned to the top. I'd like for the content to scroll UNDER the container.
I've seen it before, but forgot to bookmark it to see how it was done.

Does anyone have a plugin for this, or know how it's accomplished and can
point me to an example?


andy


[jQuery] Re: Fixed div, content scrolls under it

2008-12-03 Thread Andy Matthews
No, not like that.
 
I'm looking to essentially simulate a frameset, where the navigation stays
on top while all content scrolls underneath it. It might be a pure CSS
solution and that's fine. I assumed it would require JavaScript of some
sort.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of aquaone
Sent: Tuesday, December 02, 2008 6:23 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Fixed div, content scrolls under it


do you mean something other than:
...
...

Sounds like a CSS question, not a jQuery one...

stephen




On Tue, Dec 2, 2008 at 14:38, Andy Matthews <[EMAIL PROTECTED]>
wrote:


I'm looking at the possibility of having navigation at the top of the page,
pinned to the top. I'd like for the content to scroll UNDER the container.
I've seen it before, but forgot to bookmark it to see how it was done.

Does anyone have a plugin for this, or know how it's accomplished and can
point me to an example? 


andy 




[jQuery] Re: getting clicked element

2008-12-03 Thread Andy Matthews

Your problem is that you're using the DOM "this" instead of the jQuery
$(this).

Read more about that here:
http://remysharp.com/2007/04/12/jquerys-this-demystified/


Andy matthews
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of revivedk
Sent: Wednesday, December 03, 2008 5:12 AM
To: jQuery (English)
Cc: [EMAIL PROTECTED]
Subject: [jQuery] getting clicked element


Hi.
how would I register what element is clicked on the site?

I need to be able to register what element is clicked, on the entire DOM.

   $(document).click(function () {
var oBj = this;
  //alert($(oBj).text());
});

this doesn't work, as it returns the entire DOM. and I only need the element
that is being clicked on.

how would I do this?




[jQuery] Re: How to access href-property

2008-12-05 Thread Andy Matthews

Matthias...

Attr('href') will give you whatever is contained in the href property. If
you want the "http://otherpage.com"; then that needs to be contained in the
href property. Using the 'domain' property of the document object will give
you the first part:






andy


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matthias Coy
Sent: Friday, December 05, 2008 10:10 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] How to access href-property


Hi there,

how do I access the "href"-property of an anchor-element? I know there is a

$("#idOfAnAnchor").attr("href");

but this only gives me the attribute and not the property. I need the
property, because inside of this property is the full URL. See example:

Home // on otherpage.com http://somepage.com/index.php";>Home

$("#idOfAnAnchor1").attr("href"); // gives '/index.php', needed is
'http://otherpage.com/index.php'
$("#idOfAnAnchor2").attr("href"); // gives 'http://somepage.com/index.php'

I could use:

var aLink = document.getElementById("#idOfAnAnchor1");
var aHrefProperty = aLink.href;

but where is the jQuery fun in this :) ?

Regards
Matthias




[jQuery] Re: How to access href-property

2008-12-05 Thread Andy Matthews

Here's a reference URL by the way:

http://www.hscripts.com/tutorials/javascript/document-object.php

On Dec 5, 10:21 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Matthias...
>
> Attr('href') will give you whatever is contained in the href property. If
> you want the "http://otherpage.com"; then that needs to be contained in the
> href property. Using the 'domain' property of the document object will give
> you the first part:
>
>         
>         <!--
>                 alert(document.domain);
>         //-->
>         
>
> andy
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Matthias Coy
> Sent: Friday, December 05, 2008 10:10 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] How to access href-property
>
> Hi there,
>
> how do I access the "href"-property of an anchor-element? I know there is a
>
> $("#idOfAnAnchor").attr("href");
>
> but this only gives me the attribute and not the property. I need the
> property, because inside of this property is the full URL. See example:
>
> Home // on otherpage.com  id="idOfAnAnchor2" href="http://somepage.com/index.php";>Home
>
> $("#idOfAnAnchor1").attr("href"); // gives '/index.php', needed is
> 'http://otherpage.com/index.php'
> $("#idOfAnAnchor2").attr("href"); // gives 'http://somepage.com/index.php'
>
> I could use:
>
> var aLink = document.getElementById("#idOfAnAnchor1");
> var aHrefProperty = aLink.href;
>
> but where is the jQuery fun in this :) ?
>
> Regards
>         Matthias


[jQuery] Re: How to access href-property

2008-12-05 Thread Andy Matthews

As an FYI, while I personally prefer relative URLs for simplicity and
code reuse, full URLs in the HREF attribute provide slightly better
SEO due to the replication of the domain name.

On Dec 5, 10:23 am, Andy Matthews <[EMAIL PROTECTED]> wrote:
> Here's a reference URL by the way:
>
> http://www.hscripts.com/tutorials/javascript/document-object.php
>
> On Dec 5, 10:21 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
>
> > Matthias...
>
> > Attr('href') will give you whatever is contained in the href property. If
> > you want the "http://otherpage.com"; then that needs to be contained in the
> > href property. Using the 'domain' property of the document object will give
> > you the first part:
>
> >         
> >         <!--
> >                 alert(document.domain);
> >         //-->
> >         
>
> > andy
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> > Behalf Of Matthias Coy
> > Sent: Friday, December 05, 2008 10:10 AM
> > To: jquery-en@googlegroups.com
> > Subject: [jQuery] How to access href-property
>
> > Hi there,
>
> > how do I access the "href"-property of an anchor-element? I know there is a
>
> > $("#idOfAnAnchor").attr("href");
>
> > but this only gives me the attribute and not the property. I need the
> > property, because inside of this property is the full URL. See example:
>
> > Home // on otherpage.com  > id="idOfAnAnchor2" href="http://somepage.com/index.php";>Home
>
> > $("#idOfAnAnchor1").attr("href"); // gives '/index.php', needed is
> > 'http://otherpage.com/index.php'
> > $("#idOfAnAnchor2").attr("href"); // gives 'http://somepage.com/index.php'
>
> > I could use:
>
> > var aLink = document.getElementById("#idOfAnAnchor1");
> > var aHrefProperty = aLink.href;
>
> > but where is the jQuery fun in this :) ?
>
> > Regards
> >         Matthias


[jQuery] Re: How to access href-property

2008-12-05 Thread Andy Matthews

The crawler fully 'understands' both methods, but bear in mind that in
addition to rendering the source code, the crawler also treats the rendered
code as text. References to domains can provide a modest increase in
performance. While I don't know the exact amount, I'm guessing it's not more
than a few percent.

This information comes from our in-house SEO department who are all Google,
and Yahoo certified in SEO/SEM.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Geary
Sent: Friday, December 05, 2008 11:38 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to access href-property


Is that really true? A crawler has to convert all relative URLs to their
full form in order to get to those pages. So it has the exact same full URL
on hand whether the HTML has a full or relative URL.

I don't have any hard evidence one way or the other, it just seems
surprising that a search engine would treat full and relative URLs any
differently, given that it has the full URL in all cases anyway.

-Mike

> From: Andy Matthews
> 
> As an FYI, while I personally prefer relative URLs for simplicity and 
> code reuse, full URLs in the HREF attribute provide slightly better 
> SEO due to the replication of the domain name.




[jQuery] Re: Using "window.location.hash" for URLs without plugin

2008-12-05 Thread Andy Matthews
location.hash is a property, so you'd just get it's value then compare that.
Something like this might work:
 
// get the hash
var page = location.hash;
// show the correct page
$('#' + page).show();
 
 
 
andy matthews
 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Hempton-Smith
Sent: Friday, December 05, 2008 11:48 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Using "window.location.hash" for URLs without plugin


Hi, 

I'm trying to use URL's such as 'mysite.com/#contact' that will show a
certain div.
I have my function written and working to show the div, currently being used
as "$("#a.contact").click(showContact);"


How would I use something like "window.location.hash" to fire off the
function "showContact" for example, if the URL was /#contact?


This would need to provide for about 3 pages, Home, About, Portfolio and
Contact.
I know there's a plugin for enabling use of the back button etc, but I'd
rather something simple without having to load plugins.



Many thanks,
Alex


[jQuery] Re: multiple width kwicks

2008-12-05 Thread Andy Matthews

I'm pretty sure that the whole point is that the kwicks are evenly
distributed. You can't have multiple widths.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jesusbet
Sent: Friday, December 05, 2008 1:17 PM
To: jQuery (English)
Subject: [jQuery] multiple width kwicks


Hi.

I'm implementing this effect for a project:
http://www.jeremymartin.name/projects.php?project=kwicks

The problem is that I'm trying to apply the same effect but using different
width buttons, I mean, the first button is 88px width, the second 100px, the
third 75px and so on...

I tryed defining the widths in the CSS but didn't work, the effect cuts in
700px even if I defined a 960px container, got this CSS:
* defaults for all examples */
.kwicks {
list-style: none;
position: relative;
margin: 0;
padding: 0;
width: 690px;
}
.kwicks li{
display: block;
overflow: hidden;
padding: 0;
/*  cursor: pointer; */
float: left;
width: 130px; /*  */
height: 50px;
margin-right: 0px;
}

.kwicks li a {
display: block;
height: 50px;
}
#it1 {
background: url(../img/nav/home.jpg) no-repeat; } #it1.active {
background-color: #86e6bb;
}
#it2 {
background: url(../img/nav/about.jpg) no-repeat; } #it2.active {
background: url(../img/nav/about_selected.jpg) no-repeat; }
#it3 {
background: url(../img/nav/procedures.jpg) no-repeat; } #it3.active
{
background-color: #f5979b;
}
#it4 {
background: url(../img/nav/treatments.jpg) no-repeat; } #it4.active
{
background-color: #efaffa;
}
#it5 {
background: url(../img/nav/facilities.jpg) no-repeat; } #it5.active
{
background-color: #86e6bb;
}
#it6 {
background: url(../img/nav/packages.jpg) no-repeat; } #it6.active {
background-color: #8d9cdc;
}
#it7 {
background: url(../img/nav/photogallery.jpg) no-repeat; }
#it7.active {
background-color: #f5979b;
}
#it8 {
 background: url(../img/nav/testimonials.jpg) no-repeat; }
#it8.active {
background-color: #efaffa;
}

and the js I'm using is in the example 2:
http://www.jeremymartin.name/examples/kwicks.php?example=2

As I said, I tried adding the width: 100px; property to each #it (, ,  and so on) but didn't
work.

Is there a way to do that effect in different width buttons or I have to
change my design and make all buttons the same width?

Thank you very much!




[jQuery] Making a UL simulate an option box?

2008-12-08 Thread Andy Matthews
Anyone know of a way to collapse a UL containing n number of LI tags into
something that appears to be an option box?


Andy Matthews


[jQuery] Re: Making a UL simulate an option box?

2008-12-08 Thread Andy Matthews
I've got something that's sort of what I need here:
 
http://www.commadelimited.com/code/scrollingUL/
 
But it's not perfect. Anyone have anything better?
 
 
 
andy matthews

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Monday, December 08, 2008 2:18 PM
To: [jQuery]
Subject: [jQuery] Making a UL simulate an option box?



Anyone know of a way to collapse a UL containing n number of LI tags into
something that appears to be an option box? 


Andy Matthews 



[jQuery] Re: Making a UL simulate an option box?

2008-12-08 Thread Andy Matthews

The primary reason I'm approaching it this way is to be able to use a
semantic list of information indexable by search engines, yet have it only
take up the height of one element, just like a select box would. The
clientele are people looking for automobiles so I'm not all that concerned
with blind people, and as it's going to live just above a Google Maps
implementation, I'm also not that concerned with people who have low-end
technology.

The contents might be 1 or 2, to 10 or 15 (all defined by clients).


Andy Matthews


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Methvin
Sent: Monday, December 08, 2008 4:34 PM
To: jQuery (English)
Subject: [jQuery] Re: Making a UL simulate an option box?


Do you need this to be accessible? For example, how will this be used by
someone with a screen reader, or with no mouse?




[jQuery] Re: Making a UL simulate an option box?

2008-12-09 Thread Andy Matthews

Dave...

First of all, thank you for checking out my code. Second, you just answered
a question that I've had since I started using jQuery, namely why does the
animation queue up endlessly, or keep going after my mouse moves out.

I assume that all you have to do is to add in the .stop() method to
accomplish that?


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Methvin
Sent: Monday, December 08, 2008 7:00 PM
To: jQuery (English)
Subject: [jQuery] Re: Making a UL simulate an option box?


I noticed that the page didn't work right with IE and also didn't stop the
animation if you did mouseover/out quickly. This version works a bit better:

var $cont = $('#scrollMe');
var parentHeight = $cont.height();
var childHeight = $cont.find('li:first').height();
$cont.height(childHeight);
$cont.hover(function(){
$cont.stop().animate({
height: parentHeight
},'slow');
},function(){
$cont.stop().animate({
height: childHeight
},'slow');
});




[jQuery] Re: pleeease heeelp me nowwwwww

2008-12-10 Thread Andy Matthews

For future reference, you'll get a lot more sympathy, and more help, if you
use a more descriptive subject line. Glad you got help with your problem.


andy
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, December 10, 2008 8:10 AM
To: jQuery (English)
Subject: [jQuery] Re: pleeease heeelp me noww


wos! something that Chandan said, was helpful !!
some one had written a code and in his code define a function with $ it was
the problem

o... thanks guys :)



On Dec 10, 12:21 pm, "Chandan Luthra" <[EMAIL PROTECTED]>
wrote:
> the jquery library must be conflicting with some other library try 
> *jquery(funtion(){});* instead of $(document).ready
>
> On Wed, Dec 10, 2008 at 2:47 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > hi
>
> > i have written jquery for a site;
> > after a while for sth that i don't know it don't work anymore and 
> > direbug give an error like this:
>
> > $("div#peik") is null
> >     $("div#peik").hide();
>
> > and when i try to write
>
> >  $(document).ready()
>
> > in firebug, it return :
>
> > TypeError: $(document) is null
>
> > whyyy is that?
> > pleeeas answer as soon as posible
> > thanks
>
> --
> With Regards,
> Chandan.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery (English)" group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Need Open/Shut Function

2008-12-10 Thread Andy Matthews
jQuery has built in show() / hide() methods. The syntax would look something
like this:
 
$('#someElement').show();
$('#someElement').hide();
 
Where someElement was a container with an ID.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Blomstrom
Sent: Wednesday, December 10, 2008 12:11 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Need Open/Shut Function



I've been looking for JQuery examples pages and started browsing through
plugins, but I haven't found what I'm looking for yet, so I wondered if
anyone here could make some recommendations.

If you visit my web page at http://www.geosymbols.org/World/Arizona/, you'll
see a "Microsoft-Free" box in the top right corner of the page. Hovering
over it with your mouse causes a small display to appear.


At the end of the article is a little Links/Books image with similar
behavior (though there's currently no content to display).

What JQuery function, plugin or whatever should I use to duplicate those
functions? I'd like to be able to style it so that it looks pretty much as
it does now.

Also, on my World home page at http://www.geosymbols.org/World I have links
to a series of JavaScript pop-up boxes with links to various nations. It's a
pretty simple, straightforward JavaScsript. I just wondered if there are any
JQuery functions that would somehow enhance those popups.

So far I'm using a JQuery table sorter plugin and "zebra stripes" widget. My
code looks like this:




 $(document).ready(function() 
  { 
  $("#myTable").tablesorter({ widgets: [\'zebra\']} ); 
  }
 );




Thanks.



[jQuery] Re: Need Open/Shut Function

2008-12-10 Thread Andy Matthews
As a side note, I personally find your "ms free" note a little distasteful.
I'm no MS fanboy, but it seem a little self-serving to post that note. 
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Blomstrom
Sent: Wednesday, December 10, 2008 12:11 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Need Open/Shut Function



I've been looking for JQuery examples pages and started browsing through
plugins, but I haven't found what I'm looking for yet, so I wondered if
anyone here could make some recommendations.

If you visit my web page at http://www.geosymbols.org/World/Arizona/, you'll
see a "Microsoft-Free" box in the top right corner of the page. Hovering
over it with your mouse causes a small display to appear.


At the end of the article is a little Links/Books image with similar
behavior (though there's currently no content to display).

What JQuery function, plugin or whatever should I use to duplicate those
functions? I'd like to be able to style it so that it looks pretty much as
it does now.

Also, on my World home page at http://www.geosymbols.org/World I have links
to a series of JavaScript pop-up boxes with links to various nations. It's a
pretty simple, straightforward JavaScsript. I just wondered if there are any
JQuery functions that would somehow enhance those popups.

So far I'm using a JQuery table sorter plugin and "zebra stripes" widget. My
code looks like this:




 $(document).ready(function() 
  { 
  $("#myTable").tablesorter({ widgets: [\'zebra\']} ); 
  }
 );




Thanks.



[jQuery] Re: Need Open/Shut Function

2008-12-10 Thread Andy Matthews
You are completely entitled to your opinion, more power to you.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Blomstrom
Sent: Wednesday, December 10, 2008 12:29 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Need Open/Shut Function



That's the best example I have, as there's currently no content in my Links
open/shut script.

As a former teacher, I found some of the things Microsoft did to my students
distasteful. I decided to speak out, and I never apologize for speaking the
truth.



On Wed, Dec 10, 2008 at 10:23 AM, Andy Matthews <[EMAIL PROTECTED]>
wrote:


As a side note, I personally find your "ms free" note a little distasteful.
I'm no MS fanboy, but it seem a little self-serving to post that note. 
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Blomstrom
Sent: Wednesday, December 10, 2008 12:11 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Need Open/Shut Function



I've been looking for JQuery examples pages and started browsing through
plugins, but I haven't found what I'm looking for yet, so I wondered if
anyone here could make some recommendations.

If you visit my web page at http://www.geosymbols.org/World/Arizona/, you'll
see a "Microsoft-Free" box in the top right corner of the page. Hovering
over it with your mouse causes a small display to appear.


At the end of the article is a little Links/Books image with similar
behavior (though there's currently no content to display).

What JQuery function, plugin or whatever should I use to duplicate those
functions? I'd like to be able to style it so that it looks pretty much as
it does now.

Also, on my World home page at http://www.geosymbols.org/World I have links
to a series of JavaScript pop-up boxes with links to various nations. It's a
pretty simple, straightforward JavaScsript. I just wondered if there are any
JQuery functions that would somehow enhance those popups.

So far I'm using a JQuery table sorter plugin and "zebra stripes" widget. My
code looks like this:




 $(document).ready(function() 
  { 
  $("#myTable").tablesorter({ widgets: [\'zebra\']} ); 
  }
 );




Thanks.




-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org



[jQuery] Re: Need Open/Shut Function

2008-12-10 Thread Andy Matthews
Just FYI, you can condense Hector's code into this:
 
$(\'#MSFree\').hover(function(){
// do something on mouse over
$(\'#menu2\').show();
},function(){
// do something on mouse out
$(\'#menu2\').hide();
});
 
It's a little more compact, and easier to read.
 
 
andy matthews

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Blomstrom
Sent: Wednesday, December 10, 2008 12:57 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Need Open/Shut Function



So should the code in my head section  look something like this?:




 $(document).ready(function() 
  { 
  $("#myTable").tablesorter({ widgets: [\'zebra\']} );



$(\'#MSFree\').mouseover(function()
{
  $(\'#menu2\').show();
});

$(\'#MSFree\').mouseout(function()
{
  $(\'#menu2\').hide();
});



  }
 );



...or do I need to place the code you gave me in the body somehow?

On Wed, Dec 10, 2008 at 10:51 AM, Hector Virgen <[EMAIL PROTECTED]> wrote:



The .show() and .hide() functions are on-demand functions -- they'll happen
immediately when the code is called. What you need to do is observe the
user's actions and show/hide the div based on what they are doing.

For that, you can use .mouseover() and .mouseout with callback functions.
The callback functions will be called when certain events happen, and that
is where you place the .hide() and .how() code:

// Untested...
$('#MSFree').mouseover(function()
{
$('#menu2').show();
});

$('#MSFree').mouseout(function()
{
$('#menu2').hide();
});

-Hector 



On Wed, Dec 10, 2008 at 10:35 AM, David Blomstrom
<[EMAIL PROTECTED]> wrote:


Here's a condensed version of my code...

  VMicrosoft-Free

This website was designed

So I would convert your code to this?:
$('#MSFree').show();
$('#MSFree').hide();
Would I just add that to the JQuery code in my head section, and the script
would then open whenever someone mouses over it?
Thanks.
On Wed, Dec 10, 2008 at 10:20 AM, Andy Matthews <[EMAIL PROTECTED]>
wrote:


jQuery has built in show() / hide() methods. The syntax would look something
like this:
 
$('#someElement').show();
$('#someElement').hide();
 
Where someElement was a container with an ID.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Blomstrom
Sent: Wednesday, December 10, 2008 12:11 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Need Open/Shut Function



I've been looking for JQuery examples pages and started browsing through
plugins, but I haven't found what I'm looking for yet, so I wondered if
anyone here could make some recommendations.

If you visit my web page at http://www.geosymbols.org/World/Arizona/, you'll
see a "Microsoft-Free" box in the top right corner of the page. Hovering
over it with your mouse causes a small display to appear.


At the end of the article is a little Links/Books image with similar
behavior (though there's currently no content to display).

What JQuery function, plugin or whatever should I use to duplicate those
functions? I'd like to be able to style it so that it looks pretty much as
it does now.

Also, on my World home page at http://www.geosymbols.org/World I have links
to a series of JavaScript pop-up boxes with links to various nations. It's a
pretty simple, straightforward JavaScsript. I just wondered if there are any
JQuery functions that would somehow enhance those popups.

So far I'm using a JQuery table sorter plugin and "zebra stripes" widget. My
code looks like this:




 $(document).ready(function() 
  { 
  $("#myTable").tablesorter({ widgets: [\'zebra\']} ); 
  }
 );




Thanks.




-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org






-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org




[jQuery] Re: Need Open/Shut Function

2008-12-10 Thread Andy Matthews
If you're going to have the "same" code in more than one place, you might
consider creating a function for that. Something like this maybe:
 
function mouseExpand(source,target) {
$('#' + source).hover(function(){
$('#' + target).show();
},function(){
$('#' + target).hide();
});
}
 
and you'd call it like this:
 
mouseExpand('MSFree','menu2');
 
 
 
andy
 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Blomstrom
Sent: Wednesday, December 10, 2008 2:04 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Need Open/Shut Function



Yes, it does work.

I just have a couple follow up questions. When I first load the page, the
element that's supposed to be hidden is displayed. Is there a way to modify
it so that it doesn't display until someone mouses over the yellow "MS-Free"
thingy?

I put a working example online at http://www.geobop.org/Test.php


Also, suppose I wanted to add a similar function, named Stuff, for example.
Would I just add a separate script, as below?:

$(\'#MSFree\').hover(function(){
  // do something on mouse over
  $(\'#menu2\').show();
},function(){
  // do something on mouse out
  $(\'#menu2\').hide();
});


$(\'#Stuff\').hover(function(){
  // do something on mouse over
  $(\'#menu3\').show();
},function(){
  // do something on mouse out
  $(\'#menu3\').hide();
});

Thanks.

On Wed, Dec 10, 2008 at 11:39 AM, David Blomstrom
<[EMAIL PROTECTED]> wrote:


No, it isn't working. I deleted the JavaScript that previously controlled
it, then I looked for any CSS styles that might have been interfering with
it.

I looked at the page with the Firebug console, and it doesn't report any
errors. I know I'm conneced to my JQuery scripts because some JQuery table
sorting functions on the same page are working.


I'll go back and take a fresh look at it in a moment.

Thanks.


On Wed, Dec 10, 2008 at 11:14 AM, Hector Virgen <[EMAIL PROTECTED]> wrote:


That looks good, did it work?

-Hector 



On Wed, Dec 10, 2008 at 10:57 AM, David Blomstrom
<[EMAIL PROTECTED]> wrote:


So should the code in my head section  look something like this?:




 $(document).ready(function() 
  { 
  $("#myTable").tablesorter({ widgets: [\'zebra\']} );




$(\'#MSFree\').mouseover(function() 

{
  $(\'#menu2\').show();
});

$(\'#MSFree\').mouseout(function()
{
  $(\'#menu2\').hide();
});



  }

 );



...or do I need to place the code you gave me in the body somehow?

On Wed, Dec 10, 2008 at 10:51 AM, Hector Virgen <[EMAIL PROTECTED]> wrote:


The .show() and .hide() functions are on-demand functions -- they'll happen
immediately when the code is called. What you need to do is observe the
user's actions and show/hide the div based on what they are doing.

For that, you can use .mouseover() and .mouseout with callback functions.
The callback functions will be called when certain events happen, and that
is where you place the .hide() and .how() code:

// Untested...
$('#MSFree').mouseover(function()
{
$('#menu2').show();
});

$('#MSFree').mouseout(function()
{
$('#menu2').hide();
});

-Hector 



On Wed, Dec 10, 2008 at 10:35 AM, David Blomstrom
<[EMAIL PROTECTED]> wrote:


Here's a condensed version of my code...

  VMicrosoft-Free

This website was designed

So I would convert your code to this?:
$('#MSFree').show();
$('#MSFree').hide();
Would I just add that to the JQuery code in my head section, and the script
would then open whenever someone mouses over it?
Thanks.
On Wed, Dec 10, 2008 at 10:20 AM, Andy Matthews <[EMAIL PROTECTED]>
wrote:


jQuery has built in show() / hide() methods. The syntax would look something
like this:
 
$('#someElement').show();
$('#someElement').hide();
 
Where someElement was a container with an ID.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Blomstrom
Sent: Wednesday, December 10, 2008 12:11 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Need Open/Shut Function



I've been looking for JQuery examples pages and started browsing through
plugins, but I haven't found what I'm looking for yet, so I wondered if
anyone here could make some recommendations.

If you visit my web page at http://www.geosymbols.org/World/Arizona/, you'll
see a "Microsoft-Free" box in the top right corner of the page. Hovering
over it with your mouse causes a small display to appear.


At the end of the article is a little Links/Books image with similar
behavior (though there's currently no content to display).

What JQuery function, plugin or whatever should I use to duplicate those

[jQuery] Re: JQuery is really a nice tool

2008-12-12 Thread Andy Matthews

No jQuery on that page. It's just using a collection of dHTML scripts found
online. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Sid
Sent: Friday, December 12, 2008 12:31 PM
To: jQuery (English)
Subject: [jQuery] JQuery is really a nice tool


Just look at this URL http://googlelance.com

You see the login and button click on it then you find that

a pop up appears in middle of your page for login

that is done with Jquery




[jQuery] Re: [OT] Client side web application with jQuery

2008-12-17 Thread Andy Matthews

You could use this base64 library to check an encrypted password:

http://www.webtoolkit.info/javascript-base64.html

Any login done solely with client side code is going to be inherently
insecure. If that's part of your requirement, then you'll just have to work
around it.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Leandro Ardissone
Sent: Tuesday, December 16, 2008 5:00 PM
To: jQuery (English)
Subject: [jQuery] [OT] Client side web application with jQuery


Hi,

I'm need to implement a website (intranet) that runs everything on the
client side communicating to the server via RESTful requests. I'm using
jQuery but my big issue at the moment is how to manage the login.

I'm not sure which is the best method to login the user securely from
javascript. We're using REST for the site requests and HTTP Auth for the
authentication at the moment, but I don't want to use that ugly browser
login.

I want to manage everything from the client side using javascript. But since
javascript is viewable by the users I think that probably could be
dangerous.

What are your suggestions? Is there a jQuery plugin for http-Auth? Or maybe
I should use other method?


Thanks,
Leandro




[jQuery] Re: HowTo: Trigger error callback in ajax request

2008-12-17 Thread Andy Matthews

I think the problem is that you're expecting a different sort of error than
what the AJAX call is expecting. That method only looks for an error in what
it's trying to do. The server process is solely separated from the JS
process.

You could check for a string of "error" on success, then pass that over to
an error method.


andy
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rob Wilkerson
Sent: Wednesday, December 17, 2008 8:26 AM
To: jQuery (English)
Subject: [jQuery] HowTo: Trigger error callback in ajax request


I have an ajax request being sent to a PHP script. If that script captures
an error, I'd like it to echo that error and return whatever it needs to
return to trigger the error callback in my ajax call. I can't seem to find
what that is.  Is it a non-200 status code?  Simply throwing an error (throw
new Exception()) just triggers the success callback with the error text (not
unexpectedly, of course).

I'm using the jQuery form plugin and using the .ajaxSubmit() method, but I
suspect the answer would be the same for a core .ajax() call.
My simplified case looks like this:

$(document).ready ( function() {
$( '#CommercialVendorAddForm' ).submit (
function() {
$(this).block();

$(this).ajaxSubmit ({
beforeSubmit: function() {
alert ( 'validating' );
},
success: function ( responseText,
responseCode ) {
alert ( 'success' );
alert ( responseText );
},
error: function() {
alert ( 'An error has occured. Your
application could not be submitted.' );
},
complete: function() {
$( '#CommercialVendorAddForm'
).unblock();
}
});

return false;
}
);
});

I can't believe that there's not a way to force the error callback to
receive the response if the server page returns an error, but what is that
way?

Thanks.

Rob




[jQuery] Re: HowTo: Trigger error callback in ajax request

2008-12-17 Thread Andy Matthews

Have you tried 'throw' yet?

http://www.w3schools.com/js/js_throw.asp 


andy


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rob Wilkerson
Sent: Wednesday, December 17, 2008 8:26 AM
To: jQuery (English)
Subject: [jQuery] HowTo: Trigger error callback in ajax request


I have an ajax request being sent to a PHP script. If that script captures
an error, I'd like it to echo that error and return whatever it needs to
return to trigger the error callback in my ajax call. I can't seem to find
what that is.  Is it a non-200 status code?  Simply throwing an error (throw
new Exception()) just triggers the success callback with the error text (not
unexpectedly, of course).

I'm using the jQuery form plugin and using the .ajaxSubmit() method, but I
suspect the answer would be the same for a core .ajax() call.
My simplified case looks like this:

$(document).ready ( function() {
$( '#CommercialVendorAddForm' ).submit (
function() {
$(this).block();

$(this).ajaxSubmit ({
beforeSubmit: function() {
alert ( 'validating' );
},
success: function ( responseText,
responseCode ) {
alert ( 'success' );
alert ( responseText );
},
error: function() {
alert ( 'An error has occured. Your
application could not be submitted.' );
},
complete: function() {
$( '#CommercialVendorAddForm'
).unblock();
}
});

return false;
}
);
});

I can't believe that there's not a way to force the error callback to
receive the response if the server page returns an error, but what is that
way?

Thanks.

Rob




[jQuery] Re: Serious bug in JQuery

2008-12-22 Thread Andy Matthews

Care to share some code? Have you done your debugging to determine what line
of your code is causing the error from jQuery? Have you posted this bug to
the jquery bug mailing list?


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of kayode81un...@gmail.com
Sent: Monday, December 22, 2008 4:18 PM
To: jQuery (English)
Subject: [jQuery] Serious bug in JQuery


I have a page that when loaded, it gets a javascript error.  It occurs in
jquery-1.2.6.js on line 662 on this line:
 var id = elem[ expando ];
It says elem is undefined.  This occurs in IE and FF.  This only occurs on
this specific page.  It is an aspx page.  Thanks




[jQuery] Re: How to set the HTML background

2009-01-02 Thread Andy Matthews

That's because you can't set the background color of the HTML tag. It
doesn't have that attribute. Even if you could do that, one would override
the other.

What you probably want to do is to set the bg of the body tag, then set the
bg of a container INSIDE the body like so:



 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of BlueStunt
Sent: Friday, January 02, 2009 9:29 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] How to set the HTML background



I want to be able to change the background of the page,

I can successfully do

$(document.body).css("background", "yellow");

but I have two separate css backgrounds, one sets the body tag and one sets
the html tag.

So how do I set the html tags background

I've tried

$(document.html).css("background", "yellow");

but it won't work :/
--
View this message in context:
http://www.nabble.com/How-to-set-the-HTML-background-tp21252706s27240p212527
06.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: JQUERY .POST PROBLEM

2009-01-02 Thread Andy Matthews

I'm a fan of this approach:

console.log('[' + data.length + ']')


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Michael Geary
Sent: Friday, January 02, 2009 4:23 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: JQUERY .POST PROBLEM


The 'if' statement in JavaScript is reliable.

If your "if( data == 'no' )" is taking the "else" path, the most likely
reason is that the data variable is indeed not equal to "no".

Even though the console.log showed a value of "no", are you sure there isn't
a newline at the end? What does "console.log(data.length)" show?

You can also use the Fiddler2 debugging proxy, or the Net tab in Firebug, to
see the actual length of the body of the response from the PHP script.

My suspicion is that there's an extra newline at the end of your PHP script.
Your PHP script actually looks like this, doesn't it?



Depending on the version of PHP, a single newline after the ?> may not add a
newline to the output, but if there are two newlines after the ?> you'll
definitely get an extra newline in the output - and it wouldn't necessarily
be obvious from looking at the PHP code in a text editor.

Remember that anything before the opening  is
rendered directly as part of the HTML output.

Because of this, best practice in a pure PHP script is to *omit* the closing
?>. The language does not require it, and omitting the closing ?> insures
that you won't get any spurious newlines in your output.

If this isn't it, post a link to a test page that demonstrates the problem.

-Mike

> From: wattsup
> 
> I am having some problems with a jquery script that I am writing. The 
> problem is after I receive the data from the php file jquery seems to 
> skip the if statement.  I am logging to console and it is showing yes/ 
> no depends on email address. I am enclosing my scripts in case someone 
> can help me.
> 
> 
>  charset="utf-8">
>  charset="utf-8">
>  charset="utf-8">
>  type="text/ javascript">
> 
> $(document).ready(function(){
>   $("#email").blur(function(){
>   var post_string = $(this).val();
> 
>   $("#msgbox").removeClass().addClass('messagebox').text
> ('Checking...').fadeIn(1000);
>   $.post("php/email.php",{ email_check: 
> post_string} ,function(data){
>   console.log(data); // show data
> value in console
>if(data=='no') {  // email not avaiable
> <- Skipping this area
>   
> $("#msgbox").fadeTo(200,0.1,function(){
>   
> $(this).html('email address already exists').addClass
> ('messageboxerror').fadeTo(900,1)
>   });
>   } else { // email avaiable
> <-- Always gos here no matter what
>   
> $("#msgbox").fadeTo(200,0.1,function(){
>   
> $(this).html('email available to register').addClass 
> ('messageboxok').fadeTo(900,1);
>   });
>   } // end if
>   }); // end post
>   }); // end email blur
> }); // end doc ready
> 
> 
> 
> 
> PHP FILE
> 
> if(isset($_POST['email_check'])) {
>   $email = $_POST['email_check'];
> 
>   require_once('config.inc.php');
>   require(MYSQL);
> 
>   $result = @mysql_query("SELECT * FROM members WHERE (user_email = 
> '$email')");
>   $row_num = mysql_num_rows($result);
> 
>   if( $row_num > 0){
>   // "unavailable to register";
>   $valid = "no";
>   }else{
>   // "available to register";
>   $valid = "yes";
>   };
> 
>   echo $valid;
>   mysql_close();
> }
> 
> 
> I have been working on this all day and can not figure out why the 
> data is skipping the if statement. if you have any ideals please let 
> me know.
> 





[jQuery] Re: $.click stops working after 2 clicks

2009-01-05 Thread Andy Matthews

How about copying and pasting the code in question.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of revivedk
Sent: Monday, January 05, 2009 11:06 AM
To: jQuery (English)
Subject: [jQuery] Re: $.click stops working after 2 clicks


Unfortunately, no.
On 5 Jan., 17:57, Liam Potter  wrote:
> can we see a live example?
>
> revivedk wrote:
> > Hi.
> > I'm having a problem, where
>
> >    $(".showEvents").click(function(e) {
> >            var CalendarID = $($(e.target).parent()).parent();
> >            if ( $('#data_'+CalendarID.attr('id').substr(4)).length > 
> > 0 ) {
> >                    $(e.target).attr({src : "images/down.png"});
> >                    
> > $('#data_'+CalendarID.attr('id').substr(4)).hide();
> >            } else {
> >                    CalendarID.after(' > id="data_'+CalendarID.attr('id').substr
> > (4)+'">Test');
> >                    $(e.target).attr({src : "images/up.png"});
> >            }
> >    });
>
> > will stop working after I have clicked the #showEvents 2 times.
>
> >    




[jQuery] Re: Absolute Image location

2009-01-05 Thread Andy Matthews

I use a Mac Mini as my development server. It runs Apache and my other
servers needed to develop sites locally. When I set up a new site I do the
following:

1) Create a new virtual host for that site, with the URL of
local..com
2) On my workstation (PC) I create a host file entry pointing to my
development server:
local..com192.138.0.5

What this allows me to do is to use absolute pathing:
/images/someimage.gif

And have it be pointing to the correct location.

Just throwing it out. The same thing can obviously be accomplished if you're
running Apache on your local machine.


Andy matthews

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MarkAtHarvest
Sent: Monday, January 05, 2009 8:53 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Absolute Image location



awesome, /mytrail/images/down.gif  works, only problem now I need to solve
is if I flatten this war file and install it on the domain itself(i.e at
http://localhost instead of http://localhost/mytrial) , then I need to
change the javascript to /images/down.gif

Thank you Richard, Brian, for solving my problem. 


richard.aday wrote:
> 
> 
> From what you wrote the way the link is being handled looks correct.
> Why don't you try: /mytrail/images/down.gif .
> 
> On Jan 3, 6:54 pm, MarkAtHarvest  wrote:
>> Brian,
>>
>> Here is the html code on myhttp://localhost:8080/mytrial/admin.gsp, 
>> on my grails application.
>> Just added this to find the absolute location for the images if I use 
>> 
>>            images/down.gif  image
>>       
>>
>> this goes to link,http://localhost:8080/mytrial/images/down.gif, and 
>> it does not find it.
>>
>> and if I change this to
>>
>>         
>>            /images/down.gif  image
>>       
>> this goes to linkhttp://localhost:8080/images/down.gif, its going to 
>> root intead of going tohttp://localhost:8080/mytrial/images/down.gif
>>
>> Thank you
>>
>>
>>
>> brian-263 wrote:
>>
>> > On Sat, Jan 3, 2009 at 8:57 PM, MarkAtHarvest
>> 
>> > wrote:
>>
>> >> Brian,
>>
>> >> I am a newbie on CSS , let me try to change it and update you back 
>> >> on
>> how
>> >> it
>> >> goes, thanks it seems this should work.
>> >> BTW, changing to /images/down.gif, does not work at all, my images
>> folder
>> >> is
>> >> at the root itself. Under the webapps folder of my java application.
>>
>> >> Even if I try to create a href link to /images/down.gif, it goes
>> directly
>> >> to
>> >>http://images/down.gifinstead of going to 
>> >>http://localhost:8080/images/down.gif.
>>
>> > Then you've likely got something wrong with your application. 
>> > Though it's obviously not a jQuery problem, how are you creating 
>> > these img tags?
>>
>> --
>> View this message in
>>
context:http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21272
4...
>> Sent from the jQuery General Discussion mailing list archive at 
>> Nabble.com.
> 
> 

--
View this message in context:
http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21292345.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Test if a variable is a jQuery object?

2009-01-05 Thread Andy Matthews
How can I test to see if something is a jQuery object, or a normal
JavaScript object?


andy


[jQuery] Re: Test if a variable is a jQuery object?

2009-01-05 Thread Andy Matthews

I am, but I'm using a function containing some jQuery code in conjunction
with a few existing Dreamweaver methods.

My code passes in a pure jQ object, whereas the jQuery code passes in a
string. Inside the method I was going to text for which was which then take
some additional action for the string. I ended up just testing for string.

function expandDiv(myVar) {
// if the MM_jumpMenu method is calling, it passes in a string
if (typeof myVar == 'string') {
// do stuff
} else {
var $obj = $(myVar);
}
$('.hidden').hide('fast');
$obj.show('fast');
}

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MorningZ
Sent: Monday, January 05, 2009 2:57 PM
To: jQuery (English)
Subject: [jQuery] Re: Test if a variable is a jQuery object?


I'm trying to grasp the concept of need for this check

What's a situation where you would wonder what it is?   Are you not in
control of your own code or something?




On Jan 5, 3:53 pm, "Andy Matthews"  wrote:
> How can I test to see if something is a jQuery object, or a normal 
> JavaScript object?
>
> andy




[jQuery] Re: Absolute Image location

2009-01-06 Thread Andy Matthews

My pleasure.

One thing that you can do is to set an application level variable containing
the full absolute path to your site. For you, locally, that var would be:

/mytrial/images/

Online the path would be different:

/images/

So your links might look like this:




andy


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MarkAtHarvest
Sent: Tuesday, January 06, 2009 1:41 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Absolute Image location



Thanks Andy,
I am developing the application on Grails with Jetty server, which
automatically gives me the url of http://localhost:8080/mytrial, , but I got
your point, that is a very good workaround.

In apache, we can do that directly. Let me throw this open on grails forum
to see how Jetty can be tweaked to so that I can make "mytrial" as my main
website for real testing.

Thank you for the solution,I will get back with what I found for Jetty
Server on Grails


Andy Matthews-4 wrote:
> 
> 
> I use a Mac Mini as my development server. It runs Apache and my other 
> servers needed to develop sites locally. When I set up a new site I do 
> the
> following:
> 
> 1) Create a new virtual host for that site, with the URL of 
> local..com
> 2) On my workstation (PC) I create a host file entry pointing to my 
> development server:
>   local..com192.138.0.5
> 
> What this allows me to do is to use absolute pathing:
> /images/someimage.gif
> 
> And have it be pointing to the correct location.
> 
> Just throwing it out. The same thing can obviously be accomplished if 
> you're running Apache on your local machine.
> 
> 
> Andy matthews
> 
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
> On Behalf Of MarkAtHarvest
> Sent: Monday, January 05, 2009 8:53 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Absolute Image location
> 
> 
> 
> awesome, /mytrail/images/down.gif  works, only problem now I need to 
> solve is if I flatten this war file and install it on the domain 
> itself(i.e at http://localhost instead of http://localhost/mytrial) , 
> then I need to change the javascript to /images/down.gif
> 
> Thank you Richard, Brian, for solving my problem. 
> 
> 
> richard.aday wrote:
>> 
>> 
>> From what you wrote the way the link is being handled looks correct.
>> Why don't you try: /mytrail/images/down.gif .
>> 
>> On Jan 3, 6:54 pm, MarkAtHarvest  wrote:
>>> Brian,
>>>
>>> Here is the html code on myhttp://localhost:8080/mytrial/admin.gsp,
>>> on my grails application.
>>> Just added this to find the absolute location for the images if I 
>>> use 
>>>            images/down.gif  image
>>>       
>>>
>>> this goes to link,http://localhost:8080/mytrial/images/down.gif, and 
>>> it does not find it.
>>>
>>> and if I change this to
>>>
>>>         
>>>            /images/down.gif  image
>>>       
>>> this goes to linkhttp://localhost:8080/images/down.gif, its going to 
>>> root intead of going tohttp://localhost:8080/mytrial/images/down.gif
>>>
>>> Thank you
>>>
>>>
>>>
>>> brian-263 wrote:
>>>
>>> > On Sat, Jan 3, 2009 at 8:57 PM, MarkAtHarvest
>>> 
>>> > wrote:
>>>
>>> >> Brian,
>>>
>>> >> I am a newbie on CSS , let me try to change it and update you 
>>> >> back on
>>> how
>>> >> it
>>> >> goes, thanks it seems this should work.
>>> >> BTW, changing to /images/down.gif, does not work at all, my 
>>> >> images
>>> folder
>>> >> is
>>> >> at the root itself. Under the webapps folder of my java application.
>>>
>>> >> Even if I try to create a href link to /images/down.gif, it goes
>>> directly
>>> >> to
>>> >>http://images/down.gifinstead of going to 
>>> >>http://localhost:8080/images/down.gif.
>>>
>>> > Then you've likely got something wrong with your application. 
>>> > Though it's obviously not a jQuery problem, how are you creating 
>>> > these img tags?
>>>
>>> --
>>> View this message in
>>>
> context:http://www.nabble.com/Absolute-Image-location-tp21258855s27240
> p21272
> 4...
>>> Sent from the jQuery General Discussion mailing list archive at 
>>> Nabble.com.
>> 
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/Absolute-Image-location-tp21258855s27240p2129234
> 5.html Sent from the jQuery General Discussion mailing list archive at 
> Nabble.com.
> 
> 
> 
> 

--
View this message in context:
http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21317518.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: Tutorials or examples of jQuery and ColdFusion?

2009-01-08 Thread Andy Matthews

I've used CF and jQuery a lot. Did you have something specific in mind? I'd
be happy to share some code with you. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Thursday, January 08, 2009 11:45 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Tutorials or examples of jQuery and ColdFusion?


Hi, all...

I think I saw it mentioned that someone had written some examples of using
jQuery on the front-end and ColdFusion on the backend for ajax work.

Most of the stuff I find on the 'Net with jQuery and PHP.

Perhaps the examples were written in conjunction with a plug-in?

I'd appreciate any clues.

Thanks,

Rick




[jQuery] Re: teaching jquery instead of javascript ?

2009-01-08 Thread Andy Matthews

I'd look at teaching jQuery as a 2nd level course. Once you've covered at
least the basics of JavaScript, then you can get into jQuery. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Klaus Hartl
Sent: Thursday, January 08, 2009 3:38 PM
To: jQuery (English)
Subject: [jQuery] Re: teaching jquery instead of javascript ?


jQuery is JavaScript, and at some point you need to know JavaScript.

I would never hire anyone who claims to know jQuery but not JavaScript.

my 0.02$

--Klaus

On 8 Jan., 22:23, pixeline  wrote:
> Hello mates,
>
> I will start to teach web usability to freshly graduated youngsters in 
> a graphic design school  _ web dept, web dept.
> The Board recently proposed me to also take over javascript. Now i 
> intend to them i'm not literate enough in javascript to actually teach 
> it. But i proposed instead to teach jquery, with the main argument
> being: it's a 3-year programme, it's not with 2 hours a week that most 
> kids will get professionnal level javascript skills. Teaching jquery 
> on the other hand, may give these junior designers a useful knowledge 
> and discover scripting from a starting point that they understand _ 
> not the (with all due respect:) ) geek's "code is poetry" point of 
> view, but from the "in your face" designer point of view.
>
> I would like to know what you guys think of my argument: is teaching 
> the usage of a specific javascript framework relevant to the business 
> world? Would you hire a freshman that cannot program pure javascript 
> but can pretty much achieve the same result, in less time, with 
> jquery?
>
> Looking forward to reading your thoughts !
>
> Cheers,
>
> Alexandre




[jQuery] Re: Detect If a INPUT value was changed

2009-01-15 Thread Andy Matthews

There is a "change" event handler.

 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of gjhames
Sent: Thursday, January 15, 2009 10:57 AM
To: jQuery (English)
Subject: [jQuery] Detect If a INPUT value was changed


How to detect if the user just changed the value of an input? or select?
Is not just detect the keypress or change event. It must know if the user
change the value of the input.




[jQuery] Re: the new whitehouse.gov - jQuery powered

2009-01-20 Thread Andy Matthews

Technically only the last 6 years and 3 months.

;) 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Tuesday, January 20, 2009 2:32 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: the new whitehouse.gov - jQuery powered


I don't appreciate the humorless disrespect, guys.

I don't know where you're from, but if you're in the US, the one thing you
can say is that "POTUS43" kept our butts safe for the last 8 years.  We'll
have to see if the new liberal in the White House has the same guts.

Now, I'll drop this, if you will.

Rick

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
> On Behalf Of rolfsf
> Sent: Tuesday, January 20, 2009 3:06 PM
> To: jQuery (English)
> Subject: [jQuery] Re: the new whitehouse.gov - jQuery powered
> 
> 
> 
> $('#POTUS43').hide(fast);
> 
> 
> On Jan 20, 11:36 am, brian  wrote:
> > $(nation).ready(function()
> > {
> >    $('.POTUS').not('#a_jackass').change();
> >
> > });
> > On Tue, Jan 20, 2009 at 2:21 PM, rolfsf  wrote:
> >
> > > I just noticed that team Obama pushed a new website live today - 
> > > powered with jQuery!
> >
> > >http://www.whitehouse.gov




[jQuery] Re: Book-like UI for jQuery?

2009-01-22 Thread Andy Matthews
Something like this might work for you:
 
http://www.sitepoint.com/examples/jquery/animate4.php
 
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Richard D. Worth
Sent: Thursday, January 22, 2009 12:38 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Book-like UI for jQuery?


This isn't exactly what you describe, but gets you maybe half-way:

http://www.webresourcesdepot.com/attractive-jquery-page-curl-plugin/

- Richard


On Thu, Jan 22, 2009 at 12:45 PM, ChimericDream  wrote:



I've seen a number of sites using a book-like navigation for catalogs
and such.  Essentially, you can grab a page by it's edge and "flip"
the page, just like you would a real book.  Does anything like this
exist for jQuery?  I tried searching the plugins, I looked at the UI
library, and couldn't find anything on Google.

Thanks in advance.

Bill Parrott





[jQuery] Re: showing animated gif when redirecting to new a page

2009-01-26 Thread Andy Matthews

You could set an amimated GIF as a background image for the page. Then, as
page content loads in, it'll overlap the animation and you wouldn't see it
any more. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of misskittyt
Sent: Monday, January 26, 2009 10:41 AM
To: jQuery (English)
Subject: [jQuery] Re: showing animated gif when redirecting to new a page


bump

On Jan 22, 1:07 am, misskittyt  wrote:
> Hi all,
> I'm having trouble showing an animated gif (to indicate that the page 
> is loading) when redirecting to a new page.  There are several tabs a 
> user can choose, each taking them to a different page in the site.  I 
> think this almost works, but I don't like how the screen goes entirely 
> blank.  I've tried using fadeTo but the gif will show up as being 
> unanimated.  The same seems to be true if I don't use use the fadeOut 
> and only use the fadeIn.
>
> How can I just show the animated gif as a user is redirected to the 
> new page?
>
> Thank you!
> M-
>
> $(document).ready(function()
> {
>   $(".tab").click(function()
>   {
>     $("body").fadeOut("fast");
>     $("body").fadeIn("slow").append(" />Processing...please
>
> wait.");
>   });
>
>
>
> });- Hide quoted text -
>
> - Show quoted text-




[jQuery] Re: OT: CF-Talk Down?

2009-01-28 Thread Andy Matthews

Neither have I... 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Wednesday, January 28, 2009 2:46 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] OT: CF-Talk Down?


Hi, guys...

Pardon the OT, but I'm trying to find out if the CF-Talk list, which several
of the jQuery list users are on, is down.

I haven't gotten anything since yesterday afternoon and I noticed that the
last message on houseoffusion.com was from 5pm yesterday.

News?

Rick




[jQuery] Re: how to get action attribute from form

2009-02-03 Thread Andy Matthews

That's exactly how you'd do it.

One thing I use for debugging is to throw an alert like so:

alert($("form[name=myForm]").length);

To make sure that your original query is returning a result.



andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bob
Sent: Tuesday, February 03, 2009 3:54 PM
To: jQuery (English)
Subject: [jQuery] how to get action attribute from form


Hi,

How do I get action attribute from the following form if I know id and name
values.




I tried those and it did not work:

$("form[name=myForm]").attr('action');
$("#myForm").attr('action');




[jQuery] Re: slideUp/Down jumpy in Firefox 3 but not in IE7?

2009-02-04 Thread Andy Matthews

The jQuery team freely admits that they optimize for IE more so than the
other browsers. So it's distinctly possible that this is true. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Sam H
Sent: Wednesday, February 04, 2009 11:28 AM
To: jQuery (English)
Subject: [jQuery] slideUp/Down jumpy in Firefox 3 but not in IE7?


I don't remember if it was like this in jQuery 1.2, but I have 1.3.1 and I
can clearly see that slideDown/Up is much smoother in IE7 than in Firefox 3.

Is it just me?




[jQuery] Re: jqURL plugin throwing JS errors

2009-02-06 Thread Andy Matthews
Forgot to mention that I'm using jquery-1.2.3 for this project.


andy

> _ 
> From: jquery-en@googlegroups.com
> [mailto:jquery...@googlegroups.com]  On Behalf Of Andy Matthews
> Sent: Friday, February 06, 2009 11:50 AM
> To:   jquery-en@googlegroups.com
> Subject:  [jQuery] jqURL plugin throwing JS errors
> 
> Is there anyone using the jqURL plugin who has noticed errors on page
> load? All of a sudden I've noticed the following error:
> 
> Permission denied to get property XULElement.accessibleType, line 139
> 'width=' + args.w + ',height=' + arg...eft=' + args.l +
> ',scrollbars,resizable'
> 
> The implementation:
> // open the media library in a new window
> $.jqURL.loc(
>   
> dspPhotoAdministration.cfm?category=4&process=admin&couponSelect=true",{
>   w:750,
>   h:750,
>   target:'imageSelect'
> });
> 
> It's tied to the click event on an IMG tag, and event still works...I'm
> just getting tired of seeing the error.
> 
> 
> Andy Matthews
> Senior Web Developer
>  << OLE Object: Picture (Metafile) >> 
> www.dealerskins.com
> 
> P Please consider the environment before printing this e-mail.
> 
> Total customer satisfaction is my number 1 priority! If you are not
> completely satisfied with
> the service I have provided, please let me know right away so I can
> correct the problem,
> or notify my manager Aaron West at aw...@dealerskins.com.
> 
<>

[jQuery] Re: jqURL plugin throwing JS errors

2009-02-06 Thread Andy Matthews
Unfortunately it's in an administration area. I could provide some code for
you though if that would help.


andy

> _ 
> From: jquery-en@googlegroups.com
> [mailto:jquery...@googlegroups.com]  On Behalf Of Josh Nathanson
> Sent: Friday, February 06, 2009 12:10 PM
> To:   jquery-en@googlegroups.com
> Subject:  [jQuery] Re: jqURL plugin throwing JS errors
> 
> Andy - that's my plugin - do you have a link I could look at?
> 
> -- Josh
> 
> 
> 
> _
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Andy Matthews
> Sent: Friday, February 06, 2009 9:50 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] jqURL plugin throwing JS errors
> 
> 
> Is there anyone using the jqURL plugin who has noticed errors on page
> load? All of a sudden I've noticed the following error:
> 
> Permission denied to get property XULElement.accessibleType, line 139
> 'width=' + args.w + ',height=' + arg...eft=' + args.l +
> ',scrollbars,resizable'
> 
> The implementation:
> // open the media library in a new window
> $.jqURL.loc(
>   
> dspPhotoAdministration.cfm?category=4&process=admin&couponSelect=true",{
>   w:750,
>   h:750,
>   target:'imageSelect'
> });
> 
> It's tied to the click event on an IMG tag, and event still works...I'm
> just getting tired of seeing the error.
> 
> 
> Andy Matthews
> Senior Web Developer
>  << OLE Object: Picture (Metafile) >> 
> www.dealerskins.com
> 
> P Please consider the environment before printing this e-mail.
> 
> Total customer satisfaction is my number 1 priority! If you are not
> completely satisfied with
> the service I have provided, please let me know right away so I can
> correct the problem,
> or notify my manager Aaron West at aw...@dealerskins.com.
> 
<>

[jQuery] Re: jqURL plugin throwing JS errors

2009-02-06 Thread Andy Matthews
Yep...

That looks like exactly what's happening. Okay...nice to know it's nothing
big. It doesn't prevent the window from opening which is the important
thing.

Thanks for finding that.

> _ 
> From: jquery-en@googlegroups.com
> [mailto:jquery...@googlegroups.com]  On Behalf Of Josh Nathanson
> Sent: Friday, February 06, 2009 1:21 PM
> To:   jquery-en@googlegroups.com
> Subject:  [jQuery] Re: jqURL plugin throwing JS errors
> 
> Hey Andy - looks like this might be a Firebug bug - read down to the
> bottom of this link:
> 
> http://code.google.com/p/fbug/issues/detail?id=581
> 
> -- Josh
> 
> 
> 
> _
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Andy Matthews
> Sent: Friday, February 06, 2009 11:01 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: jqURL plugin throwing JS errors
> 
> 
> Unfortunately it's in an administration area. I could provide some code
> for you though if that would help.
> 
> 
> andy
> 
> _ 
> From: jquery-en@googlegroups.com
> [mailto:jquery...@googlegroups.com]  On Behalf Of Josh Nathanson
> Sent: Friday, February 06, 2009 12:10 PM
> To:   jquery-en@googlegroups.com
> Subject:  [jQuery] Re: jqURL plugin throwing JS errors
> 
> Andy - that's my plugin - do you have a link I could look at?
> 
> -- Josh
> 
> 
> 
> _
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Andy Matthews
> Sent: Friday, February 06, 2009 9:50 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] jqURL plugin throwing JS errors
> 
> 
> Is there anyone using the jqURL plugin who has noticed errors on page
> load? All of a sudden I've noticed the following error:
> 
> Permission denied to get property XULElement.accessibleType, line 139
> 'width=' + args.w + ',height=' + arg...eft=' + args.l +
> ',scrollbars,resizable'
> 
> The implementation:
> // open the media library in a new window
> $.jqURL.loc(
>   
> dspPhotoAdministration.cfm?category=4&process=admin&couponSelect=true",{
>   w:750,
>   h:750,
>   target:'imageSelect'
> });
> 
> It's tied to the click event on an IMG tag, and event still works...I'm
> just getting tired of seeing the error.
> 
> 
> Andy Matthews
> Senior Web Developer
>  << OLE Object: Picture (Metafile) >> 
> www.dealerskins.com
> 
> P Please consider the environment before printing this e-mail.
> 
> Total customer satisfaction is my number 1 priority! If you are not
> completely satisfied with
> the service I have provided, please let me know right away so I can
> correct the problem,
> or notify my manager Aaron West at aw...@dealerskins.com.
> 
<>

[jQuery] Re: how to change the iframe src

2009-02-06 Thread Andy Matthews

It might be easier to just use the location method.

.location.href = 'newlink.html'; 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of cindy
Sent: Friday, February 06, 2009 3:35 PM
To: jQuery (English)
Subject: [jQuery] how to change the iframe src


Hi,

what I want to do is to change iframe src, when click the tab. The click
function is called, but the iframe src is not changed at all. Do you know
what is wrong?

Cindy



http://www.w3.org/1999/xhtml";>


RAP Console

   var refreshTime=3; var
summaryTab=1; var connectTab=2; var diagTab=3; var isSummaryInit= true; var
isConnectInit=false; var isDiagInit=false; var mode="protype"; var
currentTab=summaryTab;


function clickTab( tabName)
{
if(tabName==currentTab) return;
if(tabName==summaryTab)
{

$('summaryframe'+'iframe').attr("src","http://www.google.com";);
  setFocus('summaryframe');
}
else if(tabName==connectTab)
{

$('connectframe'+'iframe').attr("src","http://www.yahoo.com";);
 setFocus('connectframe');
}
else if(tabName==diagTab)
{
$('diagframe'+'iframe').attr("src","http://www.yelp.com";);
setFocus('diagframe');
}
currentTab=tabName;
};

$(document).ready(init);
function init()
{
$('#Summary').bind('click',function(){clickTab(summaryTab)});
$('#Connectivity').bind('click',function(){clickTab(connectTab)});
$('#Diag').bind('click',function(){clickTab(diagTab)});
};










Summary
Connectivity
Diagnostics



Connection Status:
 Last updated: 10:31:14 AM
Refresh
 Generate & save support file













 




[jQuery] Re: Is jquery suitable for this...

2009-03-02 Thread Andy Matthews

If you're concerned about the size of jQuery, then why not reference the
file as cached on Google's servers? 

http://code.google.com/apis/ajaxlibs/

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of jojobar
Sent: Monday, March 02, 2009 2:43 PM
To: jQuery (English)
Subject: [jQuery] Is jquery suitable for this...


Hi!

I am exploring different options to write a new program and would like to
get some ideas from the group is this way of doing things makes sense...

I have a main page and an iframe inside that page. We want to keep the
iframe code very small (because this is a ssl page and javascript wont
cache), so my idea is to load the jquery_ver.js on the main page but use all
jquery functions from inside the pages in the iframe.

This is because the top page will be loaded only once (with menus
etc.) and will not have impact on performance with lots of javascripts.

Is this possible. I am still learning jquery and tried a few things but it
won't work.

Thanks
jb




[jQuery] Re: ANNOUNCE: jQuery ListMenu plugin 1.0 from iHwy

2009-03-02 Thread Andy Matthews
Hot damn...
 
Just saw this plugin, and this is fantastically done! Kudos to you and your
team.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Monday, March 02, 2009 3:36 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: ANNOUNCE: jQuery ListMenu plugin 1.0 from iHwy


Thanks, glad you like it. 3000 is a heap: the main bottleneck I found is
IE's slow javascript capabilities. I spent a lot of time tuning it to work
with IE, but the other browsers just totally smoke it. I haven't tried 3000
nodes, though. Let me know how it goes. Even if the speed is OK, though,
that's like ~100+ items per submenu, which would make for a pretty 'tall'
menu, I suspect (part of which might go off the bottom of the view port,
depending on number of cols, font sizes and height of each list item).

You might want to check out the listnav plugin, which keeps the list on the
page, rather than putting it into a menu, too. I'll be announcing a new rev
of that shortly, but it's up:

http://www.ihwy.com/labs/jquery-listnav-plugin.aspx

Thanks,
Jack

brian wrote: 

Very nice. I just recently put together letter-based navigation for an

app, though each "letter request" uses ajax to fetch the appropriate

results. The complete set, though, is something over 3000 items and

growing.  All the same, I think I'll write a quick script to dump

everything to listmenu and see what the performance is like.



Nice work!



On Mon, Mar 2, 2009 at 4:05 PM, Jack Killpatrick  
 wrote:

  

Hi All,



Today we released the iHwy listmenu plugin, which allows you to convert a

basic 'list' of HTML elements (UL, OL or any set of child elements) into a

snazzy dropdown menu with letter-based navigation (ie: A | B | C | etc).



The plugin is very easy to use. In most cases all you will have to do is

create the list of elements and then use one line of jQuery code to convert

the list into the navigation menu. When a user hovers over a navigation

letter in the menu a submenu appears containing all of the items from the

list that start with that letter.



The items in the submenu are arranged in nicely balanced columns. If the

list was an ordered (OL) list, numbering starts at 1 for each letter and is

maintained across the columns (top to bottom, left to right) for that

letter. There are options to control the number of columns and the 'gutter'

space between them, among other things.



The HTML generated by the plugin is designed with CSS styling in mind and a

starter css file is included to help implement the plugin.



We tuned this plugin for speed and tested it in FF 3.x (Win/Mac), IE

6/7/8rc, Opera (latest), Safari (Mac 3.2.1, Win 4beta) and Google Chrome

(Win) using jQuery 1.3.2 and 1.2.6 (1.3.2 is faster, probably because of

sizzle).



This is great plugin for big product lists, address books, contact lists,

etc. It makes a hard to navigate plain old list into something really

compact and very easy to visually skim that's only visible when you need it.



Full info:



  http://www.ihwy.com/Labs/jquery-listmenu-plugin.aspx



Demos:



  http://www.ihwy.com/Labs/demos/current/jquery-listmenu-plugin.aspx



This project grew out of the jquery listnav plugin that we released in late

2008. We'll be releasing a new rev of that today, too.



Let me know if you have any questions. Enjoy the plugin!



Thanks,

Jack





twitter: http://www.twitter.com/ihwy_jack











  




[jQuery] Re: How to turn a bulleted list into a pseudo select box

2009-03-10 Thread Andy Matthews

No one has input on this? I know I've seen it done somewhere, I just
can't remember where.

On Mar 10, 11:30 am, "Andy Matthews" 
wrote:
> I have a bulleted list that I'd like to convert into a pseudo select box.
> The result would be appear to be a select box, but would merely expand the
> list container and display the list within.
>
> Does anyone have something like this?
>
> Andy Matthews
> Senior Web Developer
>
> www.dealerskins.com
>
> P Please consider the environment before printing this e-mail.
>
> Total customer satisfaction is my number 1 priority! If you are not
> completely satisfied with
> the service I have provided, please let me know right away so I can correct
> the problem,
> or notify my manager Aaron West at aw...@dealerskins.com.
>
>  winmail.dat
> 97KViewDownload


[jQuery] Re: How to turn a bulleted list into a pseudo select box

2009-03-10 Thread Andy Matthews
Howzabout I show you what I'm thinking of. This is what I came up with. It
does pretty much everything I wanted:
 
http://commadelimited.com/uploads/hover/
 
It's not perfect, but it's meant to fill a gap in our software. Currently we
only have Flash navigation on our dealer sites. A crawler would never be
able to index our navigation. Now that we're using the newest version of
SWFObject, which allows for alternate content in the Flash container, we're
dumping a text version of our nav into the container.
 
Then, I'm going to style and script it using jQuery. The  thrust of this is
mostly for mobile devices, most of which don't currently support Flash, but
DO support Javascript and CSS.
 
Finally, if they don't even have JS, then they just get a bulleted list.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Tuesday, March 10, 2009 4:00 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to turn a bulleted list into a pseudo select box


Andy, can you explain what you're looking for in a different way? I've read
it a few times and am not sure what you're looking for.

Thx,
Jack

Andy Matthews wrote: 

No one has input on this? I know I've seen it done somewhere, I just

can't remember where.



On Mar 10, 11:30 am, "Andy Matthews"  <mailto:amatth...@dealerskins.com>


wrote:

  

I have a bulleted list that I'd like to convert into a pseudo select box.

The result would be appear to be a select box, but would merely expand the

list container and display the list within.



Does anyone have something like this?



Andy Matthews

Senior Web Developer



www.dealerskins.com



P Please consider the environment before printing this e-mail.



Total customer satisfaction is my number 1 priority! If you are not

completely satisfied with

the service I have provided, please let me know right away so I can correct

the problem,

or notify my manager Aaron West at aw...@dealerskins.com.



 winmail.dat

97KViewDownload





  




[jQuery] Jörn's Tooltip plugin

2009-03-16 Thread Andy Matthews

Anyone know if Jörn Zaefferer's Tooltip plugin can be triggered from
another event or if it's only when hovering over an element?

For example, I could trigger the tooltip on element a FROM element b
(or via trigger()).

I'd like to use it as sort of a poor man's modal window message.


[jQuery] Re: Jörn's Tooltip plugin

2009-03-17 Thread Andy Matthews

Noone?

On Mar 16, 8:46 pm, Andy Matthews  wrote:
> Anyone know if Jörn Zaefferer's Tooltip plugin can be triggered from
> another event or if it's only when hovering over an element?
>
> For example, I could trigger the tooltip on element a FROM element b
> (or via trigger()).
>
> I'd like to use it as sort of a poor man's modal window message.


[jQuery] Re: Validation plugin: combine functions with strings on remote error

2009-03-24 Thread Andy Matthews
Woohoo! That was easy enough. Thanks a ton for this amazing plugin. I'm sad
that this is the first time I've used it.

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jörn Zaefferer
Sent: Monday, March 23, 2009 5:34 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Validation plugin: combine functions with strings on
remote error


Passing a function as a message happens all the time when using
$.format("... {0}") as messages. The function is expected to return the
formated message, so you can just return the string value you want to
display at the end of your function.

Jörn


On Mon, Mar 23, 2009 at 10:39 PM, Andy Matthews 
wrote:



I'm using the validation plugin to validate a field remotely. The validation
portion works great, but I've got a question about the error message if the
validation fails.

I discovered that you can pass a function rather than a plain string as seen
below in the remote key. The problem is that when I do this, I lose the
ability to display a string of my choosing. Does anyone know how to
accomplish both?

messages: {
   pagealias: {
   required: 'Page alias is required',
   remote: function(){
   // highlight the field
   $field.pulse();
   // display message
   'This page alias is already in use'
   }
   }
}


Andy Matthews
Senior Web Developer

www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.






[jQuery] Re: Validation plugin: combine functions with strings on remote error

2009-03-24 Thread Andy Matthews
Okay...
 
Another question. I'm having an odd issue with the message area of the
plugin, specifically with remote methods. When the remove method fires, as
in my original post. The problem is that I want to do some additional error
display when the error fires. Problem is that the message key appears to be
getting triggered whether there's an error fired or not.
 
For example, I'm checking to see if a key exists in the database. If it
does, the message should be displayed, AND  the fom field containing the key
should have it's background color changed. The problem is that the
background color changes whether the msg is displayed or not. Is this a bug,
or intended behaviour? 
 
Here's my code to this point.
 
messages: {
pagealias: {
required: 'Page alias is required',
remote: function(){
// also highlight the field containing the error
$field.pulse({
backgroundColors: ['#fff','#ea7f1e']
}).bind('focus', function(){
$(this).recover();
});
return 'This page alias is already in use';
}
}
}
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jörn Zaefferer
Sent: Monday, March 23, 2009 5:34 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Validation plugin: combine functions with strings on
remote error


Passing a function as a message happens all the time when using
$.format("... {0}") as messages. The function is expected to return the
formated message, so you can just return the string value you want to
display at the end of your function.

Jörn


On Mon, Mar 23, 2009 at 10:39 PM, Andy Matthews 
wrote:



I'm using the validation plugin to validate a field remotely. The validation
portion works great, but I've got a question about the error message if the
validation fails.

I discovered that you can pass a function rather than a plain string as seen
below in the remote key. The problem is that when I do this, I lose the
ability to display a string of my choosing. Does anyone know how to
accomplish both?

messages: {
   pagealias: {
   required: 'Page alias is required',
   remote: function(){
   // highlight the field
   $field.pulse();
   // display message
   'This page alias is already in use'
   }
   }
}


Andy Matthews
Senior Web Developer

www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.






[jQuery] Re: Validation plugin: combine functions with strings on remote error

2009-03-24 Thread Andy Matthews

Man, you thought of everything. Thank you. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jörn Zaefferer
Sent: Tuesday, March 24, 2009 10:42 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Validation plugin: combine functions with strings on
remote error


You shouldn't then use the message-callback for this functionality.
Take a look at the highlight-option instead.

Jörn

On Tue, Mar 24, 2009 at 3:35 PM, Andy Matthews 
wrote:
> Okay...
>
> Another question. I'm having an odd issue with the message area of the 
> plugin, specifically with remote methods. When the remove method 
> fires, as in my original post. The problem is that I want to do some 
> additional error display when the error fires. Problem is that the 
> message key appears to be getting triggered whether there's an error fired
or not.
>
> For example, I'm checking to see if a key exists in the database. If 
> it does, the message should be displayed, AND  the fom field 
> containing the key should have it's background color changed. The 
> problem is that the background color changes whether the msg is 
> displayed or not. Is this a bug, or intended behaviour?
>
> Here's my code to this point.
>
> messages: {
>     pagealias: {
>     required: 'Page alias is required',
>     remote: function(){
>     // also highlight the field containing the error
>     $field.pulse({
>     backgroundColors: ['#fff','#ea7f1e']
>     }).bind('focus', function(){
>     $(this).recover();
>     });
>     return 'This page alias is already in use';
>     }
>     }
> }
>
>
> andy
> 
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
> On Behalf Of Jörn Zaefferer
> Sent: Monday, March 23, 2009 5:34 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Validation plugin: combine functions with 
> strings on remote error
>
> Passing a function as a message happens all the time when using 
> $.format("... {0}") as messages. The function is expected to return 
> the formated message, so you can just return the string value you want 
> to display at the end of your function.
>
> Jörn
>
> On Mon, Mar 23, 2009 at 10:39 PM, Andy Matthews 
> 
> wrote:
>>
>> I'm using the validation plugin to validate a field remotely. The 
>> validation portion works great, but I've got a question about the 
>> error message if the validation fails.
>>
>> I discovered that you can pass a function rather than a plain string 
>> as seen below in the remote key. The problem is that when I do this, 
>> I lose the ability to display a string of my choosing. Does anyone 
>> know how to accomplish both?
>>
>> messages: {
>>        pagealias: {
>>                required: 'Page alias is required',
>>                remote: function(){
>>                        // highlight the field
>>                        $field.pulse();
>>                        // display message
>>                        'This page alias is already in use'
>>                }
>>        }
>> }
>>
>>
>> Andy Matthews
>> Senior Web Developer
>>
>> www.dealerskins.com
>>
>> P Please consider the environment before printing this e-mail.
>>
>> Total customer satisfaction is my number 1 priority! If you are not 
>> completely satisfied with the service I have provided, please let me 
>> know right away so I can correct the problem, or notify my manager 
>> Aaron West at aw...@dealerskins.com.
>>
>
>




[jQuery] jQuery SWFObject callback function anyone?

2009-03-25 Thread Andy Matthews

Does anyone know if the jQuery SWFObject plugin offers a callback
function? I've got some alternate content inside the container which
will contain my Flash movie. Problem is that the page takes so long to
load that the HTML is visible for about 2 seconds before SWFobject
kicks in.

I'd like to hide the container with jQuery until after the plugin
runs, then return the container to visibility.

Anyone have an idea?


[jQuery] Re: Pointless but fun jQuery experiment

2009-03-26 Thread Andy Matthews

That's stinkin' awesome! Very cool. I'm not even ask how you did it (I'll
just view source).

:) 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Kelvin Luck
Sent: Wednesday, March 25, 2009 8:22 PM
To: jquery-en
Subject: [jQuery] Pointless but fun jQuery experiment


Inspired by google's chrome experiments I recently put together a pointless
but fun experiment with the help of jQuery and I thought that people on the
list might like to check it out:

http://www.kelvinluck.com/assets/jquery/boingPic/index.html

As I said, completely pointless but makes a nice change from "serious"
progressive enhancement!

Hope you like it,

Kelvin :)




[jQuery] Re: OT: AIR sync?

2009-03-27 Thread Andy Matthews

It sounds like you've already made up your mind about using HTML/JS (my
personal choice), but have you considered Flex in conjunction with LiveCycle
Data Services? LCDS makes syncing and managing conflicts SUPER simple.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 1:06 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] OT: AIR sync?


Sorry for the slightly off topic post, but I know there are some AIR devs on
this list and someone might have a tip for me.

I'm planning an Adobe AIR app that will be written with HTML/jQuery and
needs to do offline sync (using SQLite db on AIR side, mysql on server side
and json web services). IE: an online user must be able to sync their SQLite
db from the server, disconnect, modify records, then reconnect and sync back
to the server, with any conflicts (due to someone else changing the same
record since they last got it) raised so that we can notify the user and
offer a conflict resolution dialog.

I've googled around a bunch, but am not finding much (about best practices,
or opensource code to help me along, or 3rd party products to help). We have
experience doing sync in other projects, just not in AIR, so are doing some
fishing.

If anyone has some links, advice, etc, thanks in advance!

- Jack




[jQuery] Re: OT: AIR sync?

2009-03-27 Thread Andy Matthews

It's possible I suppose. The problem is that the cost for LCDS (to get the
data syncing) might be prohibitive for your project. You could also work
with BlazeDS which has much of the same functionality of LCDS (a little
brother of sorts).

I've not personally done any data snycing so I'm not speaking from
experience. How I might approach it though is to store a set of SQL scripts
in the AIR app to get the timestamps from the local SQLite db. Stash the
"last synced" timestamp on the file system (or in a table in the db
locally). Then compare when needed with the remote database. The syncing is
going to be the hard part though. Possibly you could add a column in both
dbs which contained a "last changed" data. Then, you could also query
against the "last changed" between the AIR app and the remote db.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 2:38 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: OT: AIR sync?


We've looked at LCDS, but aren't too keen on using Flex for the UI. 
Maybe there's some minimal way we could use it just for the sync aspect (ie
as more of an internal thing)? That would be fine.

- Jack

Andy Matthews wrote:
> It sounds like you've already made up your mind about using HTML/JS 
> (my personal choice), but have you considered Flex in conjunction with 
> LiveCycle Data Services? LCDS makes syncing and managing conflicts SUPER
simple.
>
>
> andy
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
> On Behalf Of Jack Killpatrick
> Sent: Friday, March 27, 2009 1:06 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] OT: AIR sync?
>
>
> Sorry for the slightly off topic post, but I know there are some AIR 
> devs on this list and someone might have a tip for me.
>
> I'm planning an Adobe AIR app that will be written with HTML/jQuery 
> and needs to do offline sync (using SQLite db on AIR side, mysql on 
> server side and json web services). IE: an online user must be able to 
> sync their SQLite db from the server, disconnect, modify records, then 
> reconnect and sync back to the server, with any conflicts (due to 
> someone else changing the same record since they last got it) raised 
> so that we can notify the user and offer a conflict resolution dialog.
>
> I've googled around a bunch, but am not finding much (about best 
> practices, or opensource code to help me along, or 3rd party products 
> to help). We have experience doing sync in other projects, just not in 
> AIR, so are doing some fishing.
>
> If anyone has some links, advice, etc, thanks in advance!
>
> - Jack
>
>
>
>   





[jQuery] Re: OT: AIR sync?

2009-03-27 Thread Andy Matthews
I don't know the current version, but my company was willing to put the
initial release into production for using in a broadcasting application AIR
app that I wrote in jQuery/HTML, sort of a one way instant messenger. It
seemed very stable at the time, and that was almost a year ago.
 
It's a pretty cool thing, but don't let their marketing chatter about "push"
kid you. It's polling plain and simple. That's "okay", but not really what
they advertise it as.
 
One thing I'll warn you of. If you end up using BlazeDS I discovered a bug
where transparent HTML AIR apps would not function if you used BlazeDS. Turn
transparency off and it worked just fine.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 3:13 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: OT: AIR sync?


Thanks, Andy. I haven't been able to find pricing for LCDS, which makes it
hard to consider (without a ballpark, at least). Looks like it's an
enterprise-sale kind of thing, but if you know otherwise, do tell ;-)

The client-server sync, conflict resolution and offline data cache *does*
sound about right for what we'd need, based on this:

http://www.adobe.com/products/livecycle/dataservices/features.html

There's mention in there of ajax date services, too, but nothing
specifically about how it might tie into the sync stuff.

Thanks for the design thoughts... that's roughly what we're thinking, too
(check timestamps, do something). It's unclear to me at this point what the
"high-performance data sync engine" in LCDS would supply.

Taking a look at BlazeDS. I see that an Ajax client library can be used to
talk to the BlazeDS server. Know how stable BlazeDS is?

- Jack



Andy Matthews wrote: 

It's possible I suppose. The problem is that the cost for LCDS (to get the

data syncing) might be prohibitive for your project. You could also work

with BlazeDS which has much of the same functionality of LCDS (a little

brother of sorts).



I've not personally done any data snycing so I'm not speaking from

experience. How I might approach it though is to store a set of SQL scripts

in the AIR app to get the timestamps from the local SQLite db. Stash the

"last synced" timestamp on the file system (or in a table in the db

locally). Then compare when needed with the remote database. The syncing is

going to be the hard part though. Possibly you could add a column in both

dbs which contained a "last changed" data. Then, you could also query

against the "last changed" between the AIR app and the remote db.





andy



-Original Message-

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

Behalf Of Jack Killpatrick

Sent: Friday, March 27, 2009 2:38 PM

To: jquery-en@googlegroups.com

Subject: [jQuery] Re: OT: AIR sync?





We've looked at LCDS, but aren't too keen on using Flex for the UI. 

Maybe there's some minimal way we could use it just for the sync aspect (ie

as more of an internal thing)? That would be fine.



- Jack



Andy Matthews wrote:

  

It sounds like you've already made up your mind about using HTML/JS 

(my personal choice), but have you considered Flex in conjunction with 

LiveCycle Data Services? LCDS makes syncing and managing conflicts SUPER



simple.

  

andy



-Original Message-

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 

On Behalf Of Jack Killpatrick

Sent: Friday, March 27, 2009 1:06 PM

To: jquery-en@googlegroups.com

Subject: [jQuery] OT: AIR sync?





Sorry for the slightly off topic post, but I know there are some AIR 

devs on this list and someone might have a tip for me.



I'm planning an Adobe AIR app that will be written with HTML/jQuery 

and needs to do offline sync (using SQLite db on AIR side, mysql on 

server side and json web services). IE: an online user must be able to 

sync their SQLite db from the server, disconnect, modify records, then 

reconnect and sync back to the server, with any conflicts (due to 

someone else changing the same record since they last got it) raised 

so that we can notify the user and offer a conflict resolution dialog.



I've googled around a bunch, but am not finding much (about best 

practices, or opensource code to help me along, or 3rd party products 

to help). We have experience doing sync in other projects, just not in 

AIR, so are doing some fishing.



If anyone has some links, advice, etc, thanks in advance!



- Jack







  











  




[jQuery] Re: OT: AIR sync?

2009-03-27 Thread Andy Matthews
Mostly. Using Blaze allows you to communicate via remoting, which is a
binary protocol. It's faster and lighterweight.
 
However, the data sync is where LCDS really gets it's muscle.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 4:24 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: OT: AIR sync?


Thanks for the info. I took a look a BlazeDS and it looks like it's just a
messaging system for Flex-to-Java/services messaging (or js-to-flex-to-java
via js bridge), not anything specific for db manipulation or sync. Did I
read it right?

- Jack

Andy Matthews wrote: 

I don't know the current version, but my company was willing to put the
initial release into production for using in a broadcasting application AIR
app that I wrote in jQuery/HTML, sort of a one way instant messenger. It
seemed very stable at the time, and that was almost a year ago.
 
It's a pretty cool thing, but don't let their marketing chatter about "push"
kid you. It's polling plain and simple. That's "okay", but not really what
they advertise it as.
 
One thing I'll warn you of. If you end up using BlazeDS I discovered a bug
where transparent HTML AIR apps would not function if you used BlazeDS. Turn
transparency off and it worked just fine.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 3:13 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: OT: AIR sync?


Thanks, Andy. I haven't been able to find pricing for LCDS, which makes it
hard to consider (without a ballpark, at least). Looks like it's an
enterprise-sale kind of thing, but if you know otherwise, do tell ;-)

The client-server sync, conflict resolution and offline data cache *does*
sound about right for what we'd need, based on this:

http://www.adobe.com/products/livecycle/dataservices/features.html

There's mention in there of ajax date services, too, but nothing
specifically about how it might tie into the sync stuff.

Thanks for the design thoughts... that's roughly what we're thinking, too
(check timestamps, do something). It's unclear to me at this point what the
"high-performance data sync engine" in LCDS would supply.

Taking a look at BlazeDS. I see that an Ajax client library can be used to
talk to the BlazeDS server. Know how stable BlazeDS is?

- Jack



Andy Matthews wrote: 

It's possible I suppose. The problem is that the cost for LCDS (to get the

data syncing) might be prohibitive for your project. You could also work

with BlazeDS which has much of the same functionality of LCDS (a little

brother of sorts).



I've not personally done any data snycing so I'm not speaking from

experience. How I might approach it though is to store a set of SQL scripts

in the AIR app to get the timestamps from the local SQLite db. Stash the

"last synced" timestamp on the file system (or in a table in the db

locally). Then compare when needed with the remote database. The syncing is

going to be the hard part though. Possibly you could add a column in both

dbs which contained a "last changed" data. Then, you could also query

against the "last changed" between the AIR app and the remote db.





andy



-Original Message-

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

Behalf Of Jack Killpatrick

Sent: Friday, March 27, 2009 2:38 PM

To: jquery-en@googlegroups.com

Subject: [jQuery] Re: OT: AIR sync?





We've looked at LCDS, but aren't too keen on using Flex for the UI. 

Maybe there's some minimal way we could use it just for the sync aspect (ie

as more of an internal thing)? That would be fine.



- Jack



Andy Matthews wrote:

  

It sounds like you've already made up your mind about using HTML/JS 

(my personal choice), but have you considered Flex in conjunction with 

LiveCycle Data Services? LCDS makes syncing and managing conflicts SUPER



simple.

  

andy



-Original Message-

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 

On Behalf Of Jack Killpatrick

Sent: Friday, March 27, 2009 1:06 PM

To: jquery-en@googlegroups.com

Subject: [jQuery] OT: AIR sync?





Sorry for the slightly off topic post, but I know there are some AIR 

devs on this list and someone might have a tip for me.



I'm planning an Adobe AIR app that will be written with HTML/jQuery 

and needs to do offline sync (using SQLite db on AIR side, mysql on 

server side and json web services). IE: an online user must be able to 

sync their SQLite db from the server, disconnect, modify records, then 

reconnect and sync back to the server, with any conflicts (due to 

someone else changing the same record since they last got it) raised 

s

[jQuery] Re: Cool Flash-like Menu Effect

2009-03-31 Thread Andy Matthews

The Lava Lamp plugin is the one you want:

http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/ 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of DesignerNotCoder
Sent: Tuesday, March 31, 2009 8:36 AM
To: jQuery (English)
Subject: [jQuery] Cool Flash-like Menu Effect


http://www.alexbuga.com/v8/

Notice the menu to the upper right and how it slides as it follows the mouse
across the icons. I have been searching for an open source for this, but I'm
not sure how to define it. Any ideas? Thx




[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Andy Matthews

It's against the W3c spec for the DOM. The whole point of an ID is that it's
unique on the page. Duplicate IDs lead to potential errors.

If you need to have more than one of a thing on a page, then use a class. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of riotbrrd
Sent: Tuesday, March 31, 2009 11:24 AM
To: jQuery (English)
Subject: [jQuery] A general Javascript question: duplicate IDs in a
document?


I realize this is not jQuery specific, but I figured you guys might have
some good advice...

I often find myself wanting to assign the same ID to multiple elements in a
document -- typically when there are several versions of an element which
display at different times. Is there a good reason NOT to do this? If so,
what's a better practice?

thanks,
Kim




[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Andy Matthews

One problem with that approach is that you're polluting the DOM with invalid
markup.  Rel is not a valid attribute of the div tag.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Eric Garside
Sent: Tuesday, March 31, 2009 1:57 PM
To: jQuery (English)
Subject: [jQuery] Re: A general Javascript question: duplicate IDs in a
document?


A best practice I've adopted is to utilize classes and ref/rel attributes on
dom elements for situations like you're describing.







Instead of







On Mar 31, 12:31 pm, brian  wrote:
> An ID should be unique. That's why it's callled an ID (IDentifier).
> Repeating an ID in a page will cause problems for any DOM work.
>
> For your purposes, you might do something like:
>
> 
> 
> 
> 
>
> On Tue, Mar 31, 2009 at 12:24 PM, riotbrrd  wrote:
>
> > I realize this is not jQuery specific, but I figured you guys might 
> > have some good advice...
>
> > I often find myself wanting to assign the same ID to multiple 
> > elements in a document -- typically when there are several versions 
> > of an element which display at different times. Is there a good 
> > reason NOT to do this? If so, what's a better practice?
>
> > thanks,
> > Kim




[jQuery] Re: jQuery within Javascript?

2009-04-07 Thread Andy Matthews

You can use jQuery's each method:

$("*[id^='bgChangerAnchor').each(function () {
// do some stuff here for each item returned by the match
})'

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Edward Ludlow
Sent: Tuesday, April 07, 2009 3:58 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery within Javascript?


MorningZ wrote:
 > jQuery *is* JavaScript, keep that in mind

That's why I was confused why my loop won't workis there a reason it
doesn't?

 > $(document).ready(function(){
 > $("*[id^='bgChangerAnchor').click(function () {
 >  var id = this.id.replace('bgChangerAnchor', '');
 >  $("#mainContainer").css("background","url(backgrounds/
 > bg_" + id + ".jpg)");
 > });
 > });


Thanks, will try that.  Is there no way I can incorporate a simple for loop
so some other stuff can be performed too?

Thanks for the reply.

Ed




[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread Andy Matthews

Use Excel?

:) 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Matt Wilson
Sent: Wednesday, April 08, 2009 9:53 AM
To: jQuery (English)
Subject: [jQuery] How can I freeze the title row in a table?


I have a table with lots of rows, and when I scroll down, I can't see the
row with the column titles.

How can I freeze that row in place so I can still see it as I scroll down?




[jQuery] Re: capture user's selection on a html page

2009-04-13 Thread Andy Matthews

Look into the functionality on the New York Times story pages:
http://www.nytimes.com/2009/04/14/world/asia/14thai.html?_r=1&hp

Highlight any block of text inside the story, and you'll get a litle popup
question mark icon which links to a search of that string in the NYT
database.

Pretty handy actually. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of ihomest...@gmail.com
Sent: Monday, April 13, 2009 11:36 AM
To: jQuery (English)
Subject: [jQuery] capture user's selection on a html page


Hi,

There is an onselect event for javascript which allows you to capture user
selected text in text input or textarea box. Is there a way to capture
user's selection anywhere on the html page?

I know several javascript applications which allow users to select elements
on a html page and allow you to copy paste your selected html data into
other places. Would appreciate if anyone points me to some references on how
this is implemented, especially how in Jquery.

Thanks.




[jQuery] Re: Should $(document).ready() be external? And should it be placed at the bottom of the page?

2009-04-14 Thread Andy Matthews

You can externalize the document.ready call if you choose, I do it all the
time.

As for putting it at the bottom of the page, I'd say no. Putting it in an
external JS file, with the ready call makes it so that code is not run until
the entire DOM is ready anyway.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of kgosser
Sent: Tuesday, April 14, 2009 10:28 AM
To: jQuery (English)
Subject: [jQuery] Should $(document).ready() be external? And should it be
placed at the bottom of the page?


Hey all,

Two quick questions for you. I couldn't find the answers while searching...
This would be a great thing to add to the jQuery FAQ, by the way.


(1) Is it advisable to place a page's $(document).ready() stuff in an
external .js file?

I've been doing a lot of reading and research on optimizing my front end
code, and YSlow seems to make a big deal of placing code externally if
possible for caching reasons. I understand the usefulness of placing the
code in an external document for that reason, however, the problem is that
there are a lot of functions for button and link clicks, shows/hides, etc.,
that are unique to that page and used differently on other pages.

Thus, putting it externally means it would most likely have to be in an
independent file just for that page... which means an added HTTP request
which is really the speed killer.

So anyways, looking for thoughts on this one.


(2) Is it advisable to place the $(document).ready() at the bottom of the
page right before the closing BODY tag?

Also when doing my research, I've seen that YSlow makes a big deal of this
as well. I'm sure many of you on here have discussed it or thought about it
yourself.

My question though is does it make sense to put the ready() code at the
bottom? Does it help? Is it useful? Will it break?


Thanks in advance for any feedback. Take care everyone.




[jQuery] Re: Converting JSON to html output

2009-04-14 Thread Andy Matthews

ColdFusion JSON represent!
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Nando
Sent: Tuesday, April 14, 2009 9:51 AM
To: jQuery (English)
Subject: [jQuery] Re: Converting JSON to html output


Sure. Here's the JSON string being returned by the server. The only thing
that will need some fiddling is that the year is being returned as a float.
Not sure how to get that displayed as just an integer in JS.

{"COLUMNS":
["REFERENCEID","AUTHOR","DETAIL","REFYEAR","REFTYPE"],"DATA":[[1,"Chen
& Chen","Chinese Herbs and Recipes, Second Revision",2009.0,1], [16,"Dana
Cat","","",1],[5,"Simon Becker","Chinese Medicine Today", 2008.0,1],[14,"tom
cat","",2009.0,1],[4,"Becker, Simon","Chinese Medicine
Today",2009.0,2],[3,"Dana","Dana's Secret Pasta Recipe", 2008.0,5],[15,"bob
cat","",2007.0,5]]}

On Apr 14, 4:32 pm, MorningZ  wrote:
> Can you give an example of the JSON to help?
>
> On Apr 14, 9:24 am, Nando  wrote:
>
> > Hi,
>
> > I'm a jQuery and Javascript noob, and can't seem to get this to work.
> > The JSON output looks right to me via console.log(result), but the 
> > select box isn't being populated. The select box needs to be 
> > populated onfocus, because the interface is set up to allow the user 
> > to add new options to the select via a popup without a page refresh.
>
> > $(function() {
>
> >   $.getJSON('index.cfm?view=listReferenceJSON',
> >     function(result,status) {
> >       console.log(result)
> >       var str = ''
> >       for(var i=0; i < result.ROWCOUNT; i++) {
> >         str+= ''+result.DATA.AUTHOR[i]+' ('+result.DATA.REFYEAR[i]+')'
> >       }
> >         $("refSelectBox").bind('focus', function(event, ui) {
> >           $("#refSelectBox").html(str)
> >         }
> >     });
>
> > });
>
> > 
>
> > Thanks in advance for any help.
>
> > Nando




<    2   3   4   5   6   7   8   9   10   >