-- 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:
;
> > 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
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
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
(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
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
);
> $("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
filter('[EMAIL PROTECTED],[EMAIL PROTECTED]')
> > .after(' alt="-" /> />')
> > .each(function() {
> > var $qty_field = $(this);
> > $qty_field.siblings('img').bind('click', function()
> {
> >
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,
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()
.after( $(' src="images/buttons/button_plus.gif" alt="+"
> class="increment" />').bind('click', true, doPlusMinus) )
> > );
> > $("table.summarytable tr:even").addClass("odd");
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
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
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
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
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
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
&
.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
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
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
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( ... )
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
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
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
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
'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,
> >
>
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
27 matches
Mail list logo