[jQuery] Re: draggable performance issues

2008-10-14 Thread chadmichael

Actually, I've done some tests where I just make a small div with
nothing in it, set it to a fixed width and height, and it still has
poor performance.

I think I may need to mock up some simple test cases.

On Oct 14, 3:20 pm, Louis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I recently worked on a project that used a lot of draggable items
> combined with some sorting functionality.
>
> There seemed to be major performance issues with FireFox 2 when we
> tried calculating things on the fly, as the items were dragged. The
> main culprit of this kind of problem is widths and heights of the
> elements you are dragging.
>
> eg if all the items that could be dragged and sorted were different
> heights, that couldn't be a fixed value in CSS. jQuery would have to
> calculate all the heights of the items whilst performing the drag and
> sort, thus resulting in poor performance.
>
> On Oct 14, 6:59 am, chadmichael <[EMAIL PROTECTED]> wrote:
>
> > On Firefox 2.0, Linux, I'm seeing horrible performance issues on a
> > draggable div.  I thought it might be due to images in the div, but I
> > removed all of that and even a simple div with little content performs
> > poorly.  Interestingly enough the demo on the jqueryUI site works
> > great.  This makes me think it's something else on my page.
>
> > My question is:  what kinds of things could effect the performance of
> > the draggable?


[jQuery] Re: draggable performance issues

2008-10-14 Thread chadmichael

I'm not sure i follow you.  Are you saying that I just need to style
the draggable element to a fixed size?

On Oct 14, 3:20 pm, Louis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I recently worked on a project that used a lot of draggable items
> combined with some sorting functionality.
>
> There seemed to be major performance issues with FireFox 2 when we
> tried calculating things on the fly, as the items were dragged. The
> main culprit of this kind of problem is widths and heights of the
> elements you are dragging.
>
> eg if all the items that could be dragged and sorted were different
> heights, that couldn't be a fixed value in CSS. jQuery would have to
> calculate all the heights of the items whilst performing the drag and
> sort, thus resulting in poor performance.
>
> On Oct 14, 6:59 am, chadmichael <[EMAIL PROTECTED]> wrote:
>
> > On Firefox 2.0, Linux, I'm seeing horrible performance issues on a
> > draggable div.  I thought it might be due to images in the div, but I
> > removed all of that and even a simple div with little content performs
> > poorly.  Interestingly enough the demo on the jqueryUI site works
> > great.  This makes me think it's something else on my page.
>
> > My question is:  what kinds of things could effect the performance of
> > the draggable?


[jQuery] draggable performance issues

2008-10-13 Thread chadmichael

On Firefox 2.0, Linux, I'm seeing horrible performance issues on a
draggable div.  I thought it might be due to images in the div, but I
removed all of that and even a simple div with little content performs
poorly.  Interestingly enough the demo on the jqueryUI site works
great.  This makes me think it's something else on my page.

My question is:  what kinds of things could effect the performance of
the draggable?


[jQuery] Re: star ratings performance

2008-10-03 Thread chadmichael

Okay.  So, I'm using the jquery star rating plugin from the following
link.

 http://www.fyneworks.com/jquery/star-rating/#tab-Background

I had horrible performance issues when running more than a few
( 3-4+ ) star ratings WITH split stars on the same page.  I went
through the code and determined that it was the following line from
the code that process the split star math.

var stw = ($.fn.width ? $(eStar).width() : 0) || settings.starWidth;

I was suprized to find that this line caused the problems.  I was sure
it was the math.  See the full section of code that this is from
below.  By process of elimination I determined that this ternary
operator line was causing the entire page to render about 7-9 times
slower ( 8 seconds versus barely one second ).  Anybody know why this
line sux?  Seems harmless enough to me.  BTW, I simply modified it to
use the settings.starWidth directly.


if(typeof settings.split=='number' && settings.split>0){
var stw = ($.fn.width ? $(eStar).width() : 0) ||
settings.starWidth;
var spi = (i % settings.split);
var spw = Math.floor(stw/settings.split);
$(eStar)
// restrict star's width and hide overflow 
(already in CSS)
.width(spw)
// move the star left by using a negative margin
// this is work-around to IE's stupid box model 
(position:relative
doesn't work)
.find('a').css({ 'margin-left':'-'+ (spi*spw) 
+'px' })
};



[jQuery] Re: star ratings performance

2008-10-03 Thread chadmichael

I've now noticed that there are two different versions of the star
ratings plugin.

http://orkan.jaslo4u.pl/star_rating/index.html#overview

http://www.fyneworks.com/jquery/star-rating/#tab-Background

The second one claims to be the next generation of the first one.
They have different versioning systems though.


On Oct 3, 12:03 pm, chadmichael <[EMAIL PROTECTED]> wrote:
> I'm having serious performance issues with the star ratings plugin.
> It's specifically related to using the split:4 option on a page with
> ten different ratings.
>
> I'm looking through the code to find the problem, but if anyone knows
> anything, I'd appreciate the info.
>
> Thanks,
> Chad


[jQuery] star ratings performance

2008-10-03 Thread chadmichael

I'm having serious performance issues with the star ratings plugin.
It's specifically related to using the split:4 option on a page with
ten different ratings.

I'm looking through the code to find the problem, but if anyone knows
anything, I'd appreciate the info.

Thanks,
Chad


[jQuery] escape character problem

2008-10-02 Thread chadmichael

I use the following code to set a css background image style.  Note,
the last slash before the file name is a different kind of slash.
This url works fine like this, but the problem is that this slash is
dropped by the time it get's to the

$('.clientBrowserThumb').slice(6,7).click( function(event)
{ showEntity0(1379); } );
$('.imageHolder').slice(7,8).css( "background-image",
 "url(/file_depot/
0-1000/0-1/1/conman/thumbs\LeBaronTokyo1.jpg)" );

When this runs, the background-image of the element becomes:

url(/file_depot/0-1000/0-1/1/conman/thumbsLeBaronTokyo1.jpg);

Notice the slash is gone.  I know this is an escape character, but I
kind of confused about what level the issue occurs at.

Is jQuery processing the escape characters?  Is the browser chucking
them out after they've been assigned to the css properties?


[jQuery] Re: performance questions

2008-10-02 Thread chadmichael

The problem is that other images on the page are slowing the page.  Is
there some way to get the stars to precede the other images in
rendering?

On Oct 2, 5:56 am, Diego <[EMAIL PROTECTED]> wrote:
> What browser did this happen with? (IE I'd guess).
> The star rating plugin only uses 2 separate (and very small) images
> which should load almost instantaneously. Once the image is loaded for
> one control, it should be immediately displayed for all other controls
> using the same image - not downloaded again.
>
> You could try pre-loading the image via javascript (Google it)
>
> On Sep 29, 5:06 pm, chadmichael <[EMAIL PROTECTED]> wrote:
>
> > First of all, thestarratingplugin is great.  I think I need some
> > help with my use of it perhaps.  I've got some performance issues
> > regarding the rendering of the page.
>
> > The problem is that when the page is waiting on some images to finish
> > loading, thejQueryhas already run and converted thestarrated
> > fields into checkboxes.  In my case, I'm using a split set so there
> > are 20 checkboxes, and the user sees these for several seconds while
> > the images of the page are loading.
>
> > Is there something I could do to help this?  I was thinking about
> > trying to hide the checkboxes until the images were done.


[jQuery] Re: dealing with multiple forms having same id

2008-09-29 Thread chadmichael

You're not "supposed" to have the same id for any two elements in an
HTML document, as far as I know.

On Sep 29, 9:40 am, ♫ cheskonov <[EMAIL PROTECTED]> wrote:
> Hi,
> i am a new customer in jQuery so the following may sound stupid .. the
> problem i am facing is as bellow:
> I am working in a site where i am dealing with multiple forms having
> same id and every this .. all the forms contain some radio buttons (no
> of buttons may vary) and one submit button .. now how do i find out
> which submit button is clicked . all the submit buttons are also
> having the same id anb everything . any help please :
>
> the html for my page is as follows :
>
>  id="div_poll">
>   
> 
>   
>type="hidden">
>   
> 
>   
> What's the best
> version of 'Zelda?'
>   
>   
> 
>   
> 
>  type="radio">
> Legend of Zelda
>   
>   
> 
>   
> 
>  type="radio">
> Majora's Mask
>   
>   
>   
>   
> 
>   
> 
>  type="radio">
> Twilight Princess
>   
>   
> 
>   
> 
>  type="radio">
> The Wind Waker
>   
>   
>   
>   
> 
>   
> 
>  type="radio">
> Ocarina of Time
>   
>   
> 
>   
> 
>  type="radio">
> The Minish Cap
>   
>   
>   
>   
>   
>  
>  
>   
>   
>  class="form-submit legend_polls" onClick="$('#edit-current-
> nid').val('2015');return false;" type="submit">
> 
> 
>   
>value="poll_view_voting" type="hidden">
> 
>   
> 
>   
> 
>   
>   
> 
>   
>type="hidden">
>   
> 
>   
> Best search engine h2>
>   
>   
> 
>   
> 
>  type="radio">
> google
>   
>   
> 
>   
> 
>  type="radio">
> yahoo
>   
>   
>   
>   
> 
>   
> 
>  type="radio">
> msn
>   
>   
> 
>   
> 
>  type="radio">
> AOL
>   
>   
>   
>   
>   
>  
>  
>   
>   
>  class="form-submit legend_polls" onClick="$('#edit-current-
> nid').val('2017');return false;" type="submit">
> 
> 
>   
>value="poll_view_voting" type="hidden">
> 
>   
> 
>   
> 
>   
> 


[jQuery] performance questions

2008-09-29 Thread chadmichael

First of all, the star rating plugin is great.  I think I need some
help with my use of it perhaps.  I've got some performance issues
regarding the rendering of the page.

The problem is that when the page is waiting on some images to finish
loading, the jQuery has already run and converted the star rated
fields into checkboxes.  In my case, I'm using a split set so there
are 20 checkboxes, and the user sees these for several seconds while
the images of the page are loading.

Is there something I could do to help this?  I was thinking about
trying to hide the checkboxes until the images were done.


[jQuery] multiple event handlers and sequence

2008-09-25 Thread chadmichael

Is there any way to control the order of multiple event handlers
registered?

If not, does anyone have an idea of how to make a form that uses
onchange to submit the form ( i.e. i don't want a submit button i just
want the form to submit when someone leaves a field, provided
everything has been filled out ), but also wants to use onchange to
validate data, and possibly do other things?


[jQuery] star ratings pllugin

2008-09-21 Thread chadmichael

I would like to be able to feed two options into the class name.  The
following example is from the project page, and works fine.

 class="star {split:4}"

BUt when I try something like

 class="star {split:4 required:true}"

It doesn't work?