[jQuery] Fwd: DOM traversing problem.

2007-08-06 Thread Dan Eastwell
-- Forwarded message -- From: Dan Eastwell <[EMAIL PROTECTED]> Date: Aug 3, 2007 4:40 PM Subject: DOM traversing problem. To: jQuery Discussion <[EMAIL PROTECTED]> Given this html within a form:

[jQuery] Re: Fwd: DOM traversing problem.

2007-08-07 Thread Dan Eastwell
; > > You can't have a table and h4 inside of an LI - they're both > > block-level elements, so browsers automatically push them outside of > > the LI (meaning that you can't find them. You'll have to use some > > other markup structure in order to handl

[jQuery] Re: Fwd: DOM traversing problem.

2007-08-07 Thread Dan Eastwell
page where this is running? Unfortunately not all > of the HTML for this document is present, so I'm not sure if there's > another issue at play here. If you could put the full HTML or a demo > online, that'd be most helpful. > > --John > > On 8/7/07, Dan

[jQuery] Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
Hi, I'm doing an order form for a bookstore. The order form has over 500 items in it, so jquery runs slowly. There is no way I can change the number of items, it's a given and a piece of business 'logic'. The jquery I have comprises four simple functions to add increment/decrement buttons to th

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
(qty_field).val(numValue); }); }); } See it here: http://test2.danieleastwell.co.uk/test3/master_order_test.html It still takes about ten seconds to load. Any ideas how I could slim down this code? Thanks, Dan. On 8/21/07, Dan Eastwell <[EMAIL PROTECTED]> wrote

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
need to use the .each > > $('td [EMAIL PROTECTED]@type=text]').after('stuff') will append to all > elements that match the selector, no need to go into a loop with each. > > > Dan Eastwell wrote: > > > > > > Hi, > > > > I&#

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
); > $("table.summarytable tr:even").addClass("odd"); > }); > Cheers, > -js > > > > > > On 8/21/07, seedy <[EMAIL PROTECTED]> wrote: > > > > > > You shouldn't need to use the .each > > > > $('td [E

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
filter('[EMAIL PROTECTED],[EMAIL PROTECTED]') > > .after(' alt="-" /> />') > > .each(function() { > > var $qty_field = $(this); > > $qty_field.siblings('img').bind('click', function() > { > >

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
Oh, one more thing, $qty_field.val($qty_field.val()-1); Is concatenating as a string, not adding! Just a small point, and nothing compared to the errors I'd make in coding without any testing!! Cheers, Dan. On 8/21/07, Dan Eastwell <[EMAIL PROTECTED]> wrote: > No, not at all,

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
e: > > $qty_field.val(parseInt($qty_field.val())-1); > > And: > > $qty_field.val(parseInt($qty_field.val())+1); > > > --Erik > > On 8/21/07, Dan Eastwell < [EMAIL PROTECTED]> wrote: > > > > Oh, one more thing, > > > > $qty_field.val($qty_field.val()

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
.after( $(' src="images/buttons/button_plus.gif" alt="+" > class="increment" />').bind('click', true, doPlusMinus) ) > > ); > > $("table.summarytable tr:even").addClass("odd");

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
t;[EMAIL PROTECTED]> wrote: > > > From: Dan Eastwell > > I'm doing an order form for a bookstore. The order form has > > over 500 items in it, so jquery runs slowly... > > Can't you do any of this on the server? All of the code generation - the IMG > tags and the

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Dan Eastwell
cially the event.target selector, what's that? I didn't really get target from the documentation, and what's the 'event' parameter? thanks. On 8/21/07, Dan Eastwell <[EMAIL PROTECTED]> wrote: > Thanks for the reply, Mike, > > The thinking behind it is not to ad

[jQuery] Re: Ajax, Screen Readers and 508 compliance... On My!

2007-06-19 Thread Dan Eastwell
I tend to treat screenreaders as Javascript ignorers, but I know in certain cases this isn't the case. I tend to build my sites as flat HTML/CSS plus back-end technology and then add the event handlers, additional buttons etc using scripting. I'd like to know if screen readers are partially parsi

[jQuery] Re: HELP!!!!!!

2007-06-28 Thread Dan Eastwell
As an aside: If you're using firebug (on firefox) - try console.log('test'); it will appear in the console and not interrupt the script. Not that that would affect any other errors you might have.. I'd greatly encourage you to install this if you haven't On 6/28/07, "Sebastián V. Würtz" <[EMAI

[jQuery] Stopping click event action in safari 1.3 ( click(function(){return false;}); )

2008-01-09 Thread Dan Eastwell
Hi, I've got a very simple tab interface which works perfectly, except in Safari. The click event is carried out, then the link is followed even with return false in the click event function. I've simplified everything to the following code, but the tabs are still treated as in-page anchors rath

[jQuery] Stopping click event action in safari 1.3 ( click(function(){return false;}); )

2008-01-09 Thread Dan Eastwell
No one? I would have thought it was fairly common... On 1/9/08, Dan Eastwell <[EMAIL PROTECTED]> wrote: > Hi, > > I've got a very simple tab interface which works perfectly, except in Safari. > > The click event is carried out, then the link is followed even with &

[jQuery] Re: Stopping click event action in safari 1.3 ( click(function(){return false;}); )

2008-01-09 Thread Dan Eastwell
.tabs plug in covers this situation? Cheers, Dan. On 1/9/08, Klaus Hartl <[EMAIL PROTECTED]> wrote: > > On 9 Jan., 18:13, "Dan Eastwell" <[EMAIL PROTECTED]> wrote: > > No one? I would have thought it was fairly common... > > It is common. As far as I remem

[jQuery] Re: Stopping click event action in safari 1.3 ( click(function(){return false;}); )

2008-01-10 Thread Dan Eastwell
rdless! I'll have to debug as I go. Many thanks again, Dan. On 1/9/08, Klaus Hartl <[EMAIL PROTECTED]> wrote: > > On 9 Jan., 19:14, "Dan Eastwell" <[EMAIL PROTECTED]> wrote: > > Thanks Klaus, I'll have to rewrite my functions for that. I'm sure

[jQuery] Re: Mixing vanilla Javascript with jQuery

2008-01-14 Thread Dan Eastwell
Hi Jon, I'm also something of a newbie, but you can include normal javascript in with jquery, as jquery *is* javascript. The main problem is that jquery functions won't work on normal DOM objects, they have to be selected using the $ function first e.g. $(#myObject).show(); The $ function also

[jQuery] Checking whether a jquery function exists

2008-01-14 Thread Dan Eastwell
Hi, I'm using the datepicker widget on a site, but there may be pages where the script is not called in the head, where there's no datepicker needed on the page. (To save download time and to reduce execution time) the $(document).ready function will include a $('.invokeBoth').datepicker( ... )

[jQuery] Re: Announce: jQuery Expander Plugin

2008-01-14 Thread Dan Eastwell
Great plugin - I'll very likely be using that, it's so often required. On 1/13/08, Karl Swedberg <[EMAIL PROTECTED]> wrote: > > Hey everyone, > > Last week I wrote a blog entry about how to hide a portion of an > element's text and display a link that, when clicked on, reveals the > hidden portio

[jQuery] Re: Checking whether a jquery function exists

2008-01-14 Thread Dan Eastwell
y the http://docs.jquery.com/Utilities/jQuery.isFunction#obj > jQuery.isFunction(); . > > -- > Bohdan Ganicky > > > Dan Eastwell wrote: > > > > > > Hi, > > > > I'm using the datepicker widget on a site, but there may be pages > > where the

[jQuery] Re: [TABS plugin RELATED] Look mum, TABS layout only with CSS !!

2008-01-16 Thread Dan Eastwell
Hi Enrique, It's looking good. Have you tried applying the jquery tabs plugin or any similar tabbing script to make them function? Bearing in mind that the idea behind tabs is to use javascript to apply the css structure, so that people without script can see the content. All the best, Dan. On

[jQuery] Adding a callback function to a extended jquery function

2008-02-05 Thread Dan Eastwell
Hello, I have the following function: // Show and fade out a feedback message $.fn.addFeedback = function(feedbackMessage){ var offset = $(this).offset(); var feedbackDiv = "" + feedbackMessage + ""; $("body").append(feedbackDiv); $('#feedbackElement').fadeIn('slow

[jQuery] Re: Adding a callback function to a extended jquery function

2008-02-05 Thread Dan Eastwell
's all wrong. > Also, you might need to deal with timing issues if you want to make sure the > callback is run only after the animations / setTimeout complete. > > Scott > > On Feb 5, 2008 10:35 AM, Dan Eastwell <[EMAIL PROTECTED]> wrote: > > > Hello, > > >

[jQuery] Performance differences

2008-04-03 Thread Dan Eastwell
What would the performance considerations be between: showHide(".showhide"); function showHide(elem){} and $(".showhide").showHide(); $.fn.showHide= function(){} Thanks, Dan. -- Daniel Eastwell Portfolio and articles: http://www.thoughtballoon.co.uk Blog: http://www.thoughtballoon.co.uk/bl