[jQuery] Re: Quick question on image loading

2009-10-07 Thread Mulyadi Oey
Yes, using a sprite can easily remedy the flickering problem during rollover. Unfortunately, it won't work in IE6 if you try to position a sprite PNG file that contains transparency -- this is a separate topic but you generally need to "hack" the transparent png file in order to keep the transpare

[jQuery] Re: Quick question on image loading

2009-10-07 Thread Mulyadi Oey
Related to this topic -- I have a page that: * Has a button whose background image will change upon rollover (done in CSS, using ":hover") * Preloads the rollover image for the button above (done using a simple jQuery script) The page can be found at http://test.happypod.com/preloadimage/ The pa

[jQuery] Re: Quick question on image loading

2009-10-07 Thread Mulyadi Oey
Related to this topic -- I have a page that: * Has a button whose background image will change upon rollover (done in CSS, using ":hover") * Preloads the rollover image for the button above (done using a simple jQuery script) The page can be found at http://test.happypod.com/preloadimage/ The pa

[jQuery] Re: Quick question on image loading

2009-10-05 Thread Michael Geary
Instead of changing the background image to a different URL, you should create a single image that has them tiled together, and change the div's background-position style to select one or the other. That guarantees you an instant transition between the two images. If you have several images on you

[jQuery] Re: Quick question on image loading

2009-10-05 Thread Jonathan Sharp
Hi Eric, The browser will replace the image first before loading it. What you can do to preload the image is as follows: var newBackgroundImage = '/new/image/url.png'; $('') .attr('src', newBackgroundImage) .bind('load', function() { $('div').css('background-image', 'url(' + newBac

[jQuery] Re: Quick question, basic stuff

2009-08-26 Thread Bart
Thanks! I'll try that, just for my knowledge, any other ways? On Aug 26, 12:50 pm, Paolo Chiodi wrote: > one way could be $('div.pic:eq(1)').find('ul li a:eq(2)) > > Paolo > > > > On Wed, Aug 26, 2009 at 12:17 PM, Bart wrote: > > > Hi all, > > > In a HTML document I'm having a few divs with the

[jQuery] Re: Quick question, basic stuff

2009-08-26 Thread Paolo Chiodi
one way could be $('div.pic:eq(1)').find('ul li a:eq(2)) Paolo On Wed, Aug 26, 2009 at 12:17 PM, Bart wrote: > > Hi all, > > In a HTML document I'm having a few divs with the same class. In each > of this divs is nested an unordered list with inside the list items > some anchors. I'm trying to f

[jQuery] Re: Quick Question about the ui.datepicker

2009-02-02 Thread Richard D. Worth
We'd love to help with this question over on jQuery UI list http://groups.google.com/group/jquery-ui if you could ask it there. Thanks. - Richard On Mon, Feb 2, 2009 at 8:00 AM, robg wrote: > > Hi there's a couple of things that id like to ask. > > Here is my code: > >$(functi

[jQuery] Re: Quick question

2008-07-10 Thread Overshee
Thanks a lot! You've been really helpful! I think the biggest plus about the jquery code is that it works with firefox and IE, which is nice. Anyways, thanks so much for the help, you're awesome. On Jul 10, 4:20 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote: > First, let's indent the code so i

[jQuery] Re: Quick question

2008-07-10 Thread Michael Geary
First, let's indent the code so it's easier to follow: $(document).ready(function(){ if(document.body.offsetWidth > 1024 ) { $("#wrapper").css(function() { $(this).animate({width: "1024px"}, 1000); }); } }); Now, where you went wron

[jQuery] Re: Quick question about dimensions

2008-06-18 Thread Josh Nathanson
The offset() method is only gettable, not settable. You might need to do something like this: $("#insertLink").click(function(){ var offset = $(this).offset(); $("#insertDiv").css({ top: offset.top, left: offset.left }).toggle(); }); -- Josh - Original Message - From: "eric" <[

[jQuery] Re: Quick Question... (got a meeting in 30 minutes)

2007-12-06 Thread Benjamin Sterling
Rick, I am not sure if one currently does all that, you can probably mod out the jqModal to have a scroll bar on the bottom and then style the scroll for will, I can't think of the name, but the scroll bar plugin. But if you want it to pan automatically, probably put just animate it margin:0 to ma

[jQuery] Re: quick question, selecting dynamic elements

2007-11-30 Thread leepowell
Your selector is still incorrect, this this instead: $("ul#specialsNav li a").click( function(){ var whichID = $(this).attr("id").replace(/_a_/, ""); $("#" + whichID).toggle(); return false; }); jvittetoe2 wrote: > > > here is my code.

[jQuery] Re: quick question, selecting dynamic elements

2007-11-30 Thread Josh V
here is my code. http://pastemonkey.org/paste/229 for some reason i still cant get this to work. instead of using the toggle(); function i am manually toggling the elements based on the resulting string. but how can i select an element based on a variable. essentially the variable newSpecial is e

[jQuery] Re: quick question, selecting dynamic elements

2007-11-29 Thread Josh V
wow silly me, after all I am trying to target the ID, # would be useful. :p ill give that a try tomorrow. On Nov 29, 7:22 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > On Nov 29, 2007, at 6:04 PM, Josh V wrote: > > > > > > > on click i am storing the ID of an the i clicked. > > > i am then rep

[jQuery] Re: quick question, selecting dynamic elements

2007-11-29 Thread Karl Swedberg
On Nov 29, 2007, at 6:04 PM, Josh V wrote: on click i am storing the ID of an the i clicked. i am then replacing characters in that string to get the desired resulting string. i am then trying to toggle a div whos ID is the resulting string. heres what i got. $("ul#specialsNav

[jQuery] Re: Quick question...

2007-08-16 Thread polyrhythmic
I agree with Allex, phpQuery is the only thing I can think of, however I've never had a need for it, let us know how if you try it out. On Aug 16, 8:37 am, "Smith, Allex" <[EMAIL PROTECTED]> wrote: > Have you taken a look at this? > > I'm not a PHP guy, but I marked this article some time back du

[jQuery] Re: Quick question...

2007-08-16 Thread MikeR
WOW http://meta20.net/phpQuery (found via link from Smith, Allex).. That is exactly what I was looking for. Unfortunately, I still have PHP 4 installed... this gives me an excuse to try out PHP 5! Thanks! On Aug 16, 9:37 am, "Smith, Allex" <[EMAIL PROTECTED]> wrote: > Have you taken a look a

[jQuery] Re: Quick question...

2007-08-16 Thread Smith, Allex
Have you taken a look at this? I'm not a PHP guy, but I marked this article some time back due to the mention of jQuery. http://ajaxian.com/archives/plaintemplate-phpquery AllexS -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of MikeR Sent: Wedn

[jQuery] Re: Quick question...

2007-08-16 Thread MikeR
I received your email, Pops. Thanks for your input! I will see what SmartyPant has to offer. On Aug 16, 6:47 am, Pops <[EMAIL PROTECTED]> wrote: > Mike, early I wrote a more detail message but when saving it, Google > swallowed it up and it went into LALA land. I don't know if it was > related by

[jQuery] Re: Quick question...

2007-08-16 Thread Pops
Mike, early I wrote a more detail message but when saving it, Google swallowed it up and it went into LALA land. I don't know if it was related by FireFox barfed when Google failed to return. Anyway, I explained how you may be able to do this using Functional Programming ideas, but I also mention

[jQuery] Re: Quick question...

2007-08-15 Thread MikeR
I just threw together a few regular expressions in PHP that'll do *this* job I want not elegant, nor very re-usable.. but I'm going to keep searching for a decent PHP HTML parser in the meantime. Thanks, Matt! Anybody else want to chime in please do. On Aug 15, 8:41 pm, "Matt Stith" <[EMAIL P

[jQuery] Re: Quick question...

2007-08-15 Thread Matt Stith
I believe there is a PECL extension called DOMParser or something like that, i find it during my hunt, but the server i was working on wouldnt allow me to install it.. Oh well.. Had to write myself a table parser.. fun. On 8/15/07, MikeR <[EMAIL PROTECTED]> wrote: > > > Unfortunately, I haven't fo

[jQuery] Re: Quick question...

2007-08-15 Thread MikeR
Unfortunately, I haven't found one either... obviously. It's quite difficult finding a decent HTML parser in PHP. Oh well... guess I can still dream about one. On Aug 15, 7:29 pm, "Matt Stith" <[EMAIL PROTECTED]> wrote: > I highly doubt something like that exists. I had trouble finding an HTML >

[jQuery] Re: Quick question...

2007-08-15 Thread Matt Stith
I highly doubt something like that exists. I had trouble finding an HTML parser in any form for php, let alone one with the rich feature set of jQuery. Good luck on your hunt! On 8/15/07, MikeR <[EMAIL PROTECTED]> wrote: > > > We all know & love jQuery, but something that I've been wondering for >

[jQuery] Re: Quick question about jQuery & getElementsByName

2007-06-28 Thread Erik Beeson
From http://docs.jquery.com/DOM/Traversing/Selectors Get the input field's value with the name of 'bar': $("[EMAIL PROTECTED]").val(); --Erik On 6/27/07, Yansky <[EMAIL PROTECTED]> wrote: How would I use the document.getElementsByName() selector method in jQuery?

[jQuery] Re: Quick question...

2007-06-26 Thread Erik Beeson
The html function is synchronis, it should be done before it returns. What isn't working about it? Could you setup a sample page, or include a complete example of the code that you're using? --Erik On 6/26/07, Trav Johnston <[EMAIL PROTECTED]> wrote: Hi, I need to find the height of a div

[jQuery] Re: Quick question about the ".each()" function

2007-04-06 Thread Kenneth
Your initial code block: $('.wordbreakfield').each(function(){ $(this).text(); }); ...doesn't do anything with the text(). You retrieve it but it's not used. On 4/6/07, Yansky <[EMAIL PROTECTED]> wrote: Hi, thanks for the reply. I'm still a bit confused though. :) If "$('.wordbreakfield

[jQuery] Re: Quick question about the ".each()" function

2007-04-06 Thread Yansky
Hi, thanks for the reply. I'm still a bit confused though. :) If "$('.wordbreakfield')" returns an array of jquery objects, then ".each(function(){" applies a function to the raw DOM of each element, & using "$(this)" accesses the jquery object rather than the raw DOM so we can use the "text()" f

[jQuery] Re: Quick question about the ".each()" function

2007-04-06 Thread remy
Because: On Apr 6, 7:58 am, "Yansky" <[EMAIL PROTECTED]> wrote: > $.map(theData, function(i){ > return i.childNodes[0].nodeValue; > > }); The .map function is returning an array of the result of each function call - in your case: > return i.childNodes[0].nodeValue; You second block doesn't