[jQuery] Re: How to pick out classes that start with a particular string.

2009-04-16 Thread jonhobbs
nathan Vanherpe (T & T NV)" wrote: > jonhobbs wrote: > > Both of those would work as solutions to this problem. > > > However, I'd still really like to find out if there's a way to get a > > list (array?) of all of the classes that are currently attached to

[jQuery] Re: How to pick out classes that start with a particular string.

2009-04-16 Thread jonhobbs
> > { > >       $(this).append(""); > > } > > ) > > > I know that it is probably not the best code as you are using > > attibutes that do not fall into the dom standards but it looks like it > > would get the job done. > > > On Apr 16,

[jQuery] Re: How to pick out classes that start with a particular string.

2009-04-16 Thread jonhobbs
.each(function() { >       var $dv = $(this); >       $.each(icons, function() { >            if ($dv.hasClass("icon" + this)) { >                  $dv.append(' alt="" />'); >                  return false; >            } >       }); > > }); >

[jQuery] Re: How to pick out classes that start with a particular string.

2009-04-16 Thread jonhobbs
a: > > > > > > > > > If that's possible, that seriously would make your code easier and > less complicated > > On Apr 16, 8:58 am, jonhobbs wrote: > > > This might be hard to explain, but I need a way to loop through a > > bunch of ele

[jQuery] How to pick out classes that start with a particular string.

2009-04-16 Thread jonhobbs
This might be hard to explain, but I need a way to loop through a bunch of elements I've already selected and for each one find classes that start with the word "icon". So for example I might have the following elements So, I begin by selecting the elements and looping through them $

[jQuery] jQuery tips and tricks article

2008-12-16 Thread jonhobbs
Hi guys, I hope nobody minds me posting this on here but I've just written an article about "improving your jquery" for our blog. It's the first big article I've written and it took a fair while to write so I hope it helps a few people out. http://www.tvidesign.co.uk/blog/improve-your-jquery-25

[jQuery] Re: Detecting a click "off" an element

2008-11-19 Thread jonhobbs
arent fullpage overlay, so when a user clicks > on the page (actually the div overlay) you can do something like > > $("div.overlay").click(function () { >        $(".classname").hide(); > > }); > jonhobbs wrote: > > HI, > > > I'm trying

[jQuery] Re: Detecting a click "off" an element

2008-11-19 Thread jonhobbs
Hi Donald, I can't help feeling that if I google "sticky hover" I might not like what I find but I'll give it a go. Thanks On Nov 19, 5:19 pm, "Donald J. Organ IV" <[EMAIL PROTECTED]> wrote: > Sounds like you want a sticky hover. > > > >

[jQuery] Detecting a click "off" an element

2008-11-19 Thread jonhobbs
HI, I'm trying to make a layer popup when you focus on a text box. That't the easy bit though and I've managed to do that. I now want the layer to disappear if the user clicks anywhere on the page EXCEPT on the layer, or the textbox they clicked into. I'm struggling to think of how to do this.

[jQuery] Re: slideDown animation jumps - even without padding set.

2008-11-07 Thread jonhobbs
Actually, that solution only works in IE anyway as .height() is reporting the wrong height in safari and chrome. So I guess now I'm trying to find a solution to get the correct height of an element in all browsers. Jon On Nov 7, 1:58 pm, jonhobbs <[EMAIL PROTECTED]> wrote: > Hi R

[jQuery] Re: slideDown animation jumps - even without padding set.

2008-11-07 Thread jonhobbs
the CSS height $('#text').slideDown(2000); } ); That seems to work but would still like to hear of a neater solution if anyone has one. Jon On Nov 7, 1:51 pm, "Rik Lomas" <[EMAIL PROTECTED]> wrote: > Hi Jon, > > This article might help >

[jQuery] Re: slideDown animation jumps - even without padding set.

2008-11-07 Thread jonhobbs
ill need to help you. > Though looking into the dimensions plugin may > help.http://brandonaaron.net/docs/dimensions/#sample-2 > > > > > > jonhobbs wrote: > > I know jquery sometimes has a problem calculating the heights of > > elements that have padding

[jQuery] slideDown animation jumps - even without padding set.

2008-11-07 Thread jonhobbs
I know jquery sometimes has a problem calculating the heights of elements that have padding/margins which can cause jumpy animations when using slideDown. Unfortunately I have now come across the same problem without using margins/padding and I've managed to create a very simple test case which d

[jQuery] Jquery fix for IE6 position:fixed bug ?

2008-01-13 Thread jonhobbs
Hi, I am trying to create a shopping cart similar to the one on http://www.panic.com/goods/ I have tried their technique to get the cart fixed at the bottom of the screen in IE6 but there are several problems with it (first off my body tag background isn't scrolling! Then the heights get a bit m

[jQuery] Re: Fading a background image

2007-12-05 Thread jonhobbs
e one with text has a higher zIndex. Fade out the "underlay", > leaving the content? > > On Dec 4, 2007 5:25 PM, jonhobbs <[EMAIL PROTECTED]> wrote: > > > > > HI Guys, > > > I'm trying to fadeIn the background image of an A tag (which is set

[jQuery] Fading a background image

2007-12-04 Thread jonhobbs
HI Guys, I'm trying to fadeIn the background image of an A tag (which is set to display:blovk so effectively a div) when you roll over it. The A tags form the main menu of a site I am designing. I haven't managed to find any way of changing the Background Image opacity using css so can't use the

[jQuery] Jcarousel problems in Safari.

2007-11-30 Thread jonhobbs
Hi, I've been trying to use Jcarousel - http://sorgalla.com/jcarousel/ - I'm sure some of you will know of it. The problem is that I was coming across all sorts of display bugs in the PC version of Safari (version 3.0.3). I thought it was my implementation but then I checked the official site an

[jQuery] Re: Getting the index of a cell in a row.

2007-11-27 Thread jonhobbs
s).is(':checked') ? 'checked' : > ''}); > }); >}); > > }); > > :-) > > --Karl > _ > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Nov 25, 2007, at 5:15 PM, jonhobbs wrote: > > > > > Hi, >

[jQuery] Re: how to access this?

2007-11-27 Thread jonhobbs
You could put the inches into a span like this... inches then you could change it using $("#HeightLabel").text("centimeters"); If you're going to have lots of them on the page then you'll have to use a class name instead of an ID and find some way of selecting just the one you want to chan

[jQuery] Re: Best way to attach settings to a bunch of HTML

2007-11-26 Thread jonhobbs
t; 1. Is validation critical to you? > 2. What is the most manageable for you? > > Glen > > On Nov 26, 2007 9:59 AM, Wizzud <[EMAIL PROTECTED]> wrote: > > > > > Can you not simply add another class to the container div (or the > > image)? > >

[jQuery] Re: Getting the index of a cell in a row.

2007-11-26 Thread jonhobbs
nction() { >$('.Grid tbody tr td:nth-child(' + column + ') > input:checkbox').attr({checked: $(this).is(':checked') ? 'checked' : > ''}); > }); >}); > > }); > > :-) > > --Karl > _ &

[jQuery] Re: Which child am I?

2007-11-26 Thread jonhobbs
I posted a very similar question yesterday, here - http://groups.google.com/group/jquery-en/browse_thread/thread/c50d8efbf11f0a22#1328b2f196d81e7f I possibly worded the question badly and haven't had a reply yet but would also be very interested in a neat way to do this. People must often need a

[jQuery] Best way to attach settings to a bunch of HTML

2007-11-26 Thread jonhobbs
Just a quick question hopefully. What's the best way of storing settings as part of a chunk of html ? Let me give an example of a photo gallery with lots of photos on the page with the following HTML for each one... Walking in the park Average Rating:6/10 Somewhere I would like

[jQuery] Getting the index of a cell in a row.

2007-11-25 Thread jonhobbs
Hi, I hope somebody can help me. I'm trying to write a function which will tick every checkbox in a column when you tick the checkbox in the header. The plan is to attach an evetn to every checkbox in the header which when you check it will find the column bumber of the cell it is in and plug th

[jQuery] Re: Styling left hand column of table.

2007-11-25 Thread jonhobbs
;); > $cells.filter(":nth-child(2)").addClass("GridMiddleCell"); > $cells.filter(":nth-child(3)").addClass("GridRightCell"); > > Hope that helps. > > --Karl > > _ > Karl Swedbergwww.englishrules.comwww.learningjquery.com > &g

[jQuery] Styling left hand column of table.

2007-11-24 Thread jonhobbs
Hi, I've just read the Jquery book and though I understood a bit about selectors, turned out I was wrong! I am trying style every cell in a table but style the left and right most colums differently. I start with three classes GridLeftCell GridMiddleCell GridRightCell ... and I style ever