[jQuery] Re: jQuery UI 1.6rc6 - how to sort tabular data?

2009-03-03 Thread Sam H

Sorry, just realized this may be misleading.  jQuery UI "Sortable"
allows you to REORDER items in a list.  I am looking to have a user
drag/reorder items in a table, basically.

On Mar 3, 4:20 pm, Sam H  wrote:
> I know you can't actually sort tables, it's kinda broken.  I can
> easily sort UL lists, but whenever I try to use float: left and width:
> XXXem to give set widths to each span, e.g.:
>
> 32 Bob Jenkins li>
>
> #list li {
>         clear: left;}
>
> #list li span {
>         float: left;
>         background: #ddd;
>         margin: 1px;}
>
> #list li span.id {
>         width: 2em;}
>
> #list li span.name {
>         width: 12em;}
>
> #list li span.desc {
>         width: 12em;
>
> }
>
> Well, the "float: left" seems to break sortable().  If I remove the
> float left, it works fine.
>
> How do I make each SPAN an exact set width?  The only thing that seems
> to work is float:left combined with setting the 'width'.  I'm just
> trying to make my UL look like a table so sortable() will work.
>
> Thanks..


[jQuery] jQuery UI 1.6rc6 - how to sort tabular data?

2009-03-03 Thread Sam H

I know you can't actually sort tables, it's kinda broken.  I can
easily sort UL lists, but whenever I try to use float: left and width:
XXXem to give set widths to each span, e.g.:

32 Bob Jenkins

#list li {
clear: left;
}
#list li span {
float: left;
background: #ddd;
margin: 1px;
}
#list li span.id {
width: 2em;
}
#list li span.name {
width: 12em;
}
#list li span.desc {
width: 12em;
}

Well, the "float: left" seems to break sortable().  If I remove the
float left, it works fine.

How do I make each SPAN an exact set width?  The only thing that seems
to work is float:left combined with setting the 'width'.  I'm just
trying to make my UL look like a table so sortable() will work.

Thanks..


[jQuery] slideUp/Down jumpy in Firefox 3 but not in IE7?

2009-02-04 Thread Sam H

I don't remember if it was like this in jQuery 1.2, but I have 1.3.1
and I can clearly see that slideDown/Up is much smoother in IE7 than
in Firefox 3.

Is it just me?


[jQuery] Re: jQuery UI Dialog - how to hide 'X' close box?

2009-02-04 Thread Sam H

Perfect - thanks!

On Feb 4, 10:32 am, "Richard D. Worth"  wrote:
> See this thread
>
> http://groups.google.com/group/jquery-ui/browse_thread/thread/9c8fbe3...
>
> for some examples.
>
> - Richard
>
> On Wed, Feb 4, 2009 at 11:24 AM, Liam Potter wrote:
>
>
>
> > css
>
> > Sam H wrote:
>
> >> Is there any way with jQuery UI Dialog to not show the "X" close box
> >> in the titlebar? (what if I want to show a message dialog that the
> >> user cannot close, such as a "Loading..." dialog)


[jQuery] jQuery UI Dialog - how to hide 'X' close box?

2009-02-04 Thread Sam H

Is there any way with jQuery UI Dialog to not show the "X" close box
in the titlebar? (what if I want to show a message dialog that the
user cannot close, such as a "Loading..." dialog)


[jQuery] New 1.3 feature, native event delegation??

2009-01-22 Thread Sam H

John Resig said of 1.3:

"I only posted last week about how event delegation can help you to
optimize your code and it looks like jQuery will do it for you now,
which means that any event handlers you add to a group of elements
will automatically be added to matching elements when you create
them."

Yet I'm not seeing this functionality.  Within my $(document).ready()
func, I do this:

  $('.do_it').click(function() { ...stuff... });

Yet if I dynamically create new items using class="do_it", the above
function is not automatically attached to them.  I have to once again,
after dynamically creating new items, perform the $('.do_it').click()
again.

I thought 1.3 was supposed to eliminate this.  Am I doing something
wrong?


[jQuery] Re: Traversal: Aggressive "next" to blast through all parents?

2008-11-11 Thread Sam H

Sorry - but your script causes an infinite loop for some reason.  And
jQuery's "nextUntil" doesn't work either, it doesn't survive past the
end of the sibling tree.

I need my function to go PAST the end of the list of siblings, up
through parents, etc., all the way to the end of the document if need
be.

Example:


Text here - buried ends here 
got me!


$('.bury').crawl('.gotme') should actually return the "gotme" DIV.
next(), nextAll(), and nextUntil() will all stop right after the
"lastKid" DIV.


[jQuery] Re: Traversal: Aggressive "next" to blast through all parents?

2008-10-30 Thread Sam H

Most excellent - thanks!


[jQuery] Re: Traversal: Aggressive "next" to blast through all parents?

2008-10-30 Thread Sam H

Anyone?  I might have to write a plugin to do thishmm


[jQuery] Re: Adding a variable within a function name?

2008-10-29 Thread Sam H

On Oct 29, 4:57 pm, Nic Hubbard <[EMAIL PROTECTED]> wrote:
> I am using the jquery each() function to find the id of text areas on
> my page.  Then I need to add that id next to another function, but I
> am getting syntax errors:
>
> $('textarea').each(function() {
>         var textId = $(this).attr('id');
>         $(this).val(); = eval('editor_' + textId + '.getHTML();');
>       });
>
> Am I right in using eval to add the id?  Or am I going about this the
> wrong way?

Not clear on what you're trying to do, exactly.  OK, so you have a
bunch of TEXTAREAs on a page and you want to grab their respective IDs
and... do what with them?  Let's say one has an ID of "color."  What
is editor_color.getHTML()??

One thing I see wrong:
> $(this).val(); = eval('editor_' + textId + '.getHTML();');

That's bad syntax.  You have an erroneous semicolon after val(), and
besides, you set a value like this:

$(this).val('my value');

Not like this:

$(this).val() = 'my value';


[jQuery] Traversal: Aggressive "next" to blast through all parents?

2008-10-29 Thread Sam H

Given HTML code like this:


  


  


  


  


I want some way to skip to each 'stop' class..something that crawls
forward, up and down parents and children, in other words:

var x = $('#main').crawl('.stop');//
[startingPoint].crawl([stoppingPoint]);

Now x == $('#sub').  next() doesn't work because it just grabs the
next item.  nextAll() and siblings() keep grabbing siblings until it
hits the end (a , , etc..some sort of parent).  I need a
way for it to keep traversing through ANYTHING until it hits what it's
looking for.

Is this possible?  I have a feeling maybe slice() could be used
somehow, or filter().


[jQuery] Re: How to call a function directly that is normally an event.. ?

2008-10-29 Thread Sam H

Thanks!!

On Oct 24, 9:08 pm, Mike Alsup <[EMAIL PROTECTED]> wrote:
> > Let's say you have this:
>
> > $('#myID').click(magicFunc);
>
> > magicFunc looks like:
>
> > function magicFunc()
> > {
> >    $(this).fadeOut();
>
> > }
>
> > Now, let's say I want to invoke magicFunc on a certain item MANUALLY,
> > via code, not through a user-driven event.  e.g.: (I know this is
> > wrong)
>
> > $('#myID').magicFunc();
>
> > I don't want to make a plug-in.  I just want to somehow make the $
> > (this) reference in magicFunc() refer to whatever I pass into it.  Is
> > that possible?
>
> $('#myID').triggerHandler('click');


[jQuery] How to call a function directly that is normally an event.. ?

2008-10-24 Thread Sam H

Sorry, I don't know how to summarize this problem so I'll just post
code.

Let's say you have this:

$('#myID').click(magicFunc);

magicFunc looks like:

function magicFunc()
{
   $(this).fadeOut();
}

Now, let's say I want to invoke magicFunc on a certain item MANUALLY,
via code, not through a user-driven event.  e.g.: (I know this is
wrong)

$('#myID').magicFunc();

I don't want to make a plug-in.  I just want to somehow make the $
(this) reference in magicFunc() refer to whatever I pass into it.  Is
that possible?


[jQuery] jQuery Cycle plugin question - changing speeds mid-slideshow

2008-09-19 Thread Sam H

I have an effect where I cycle through images with the default slow
fade speed, and when a user mouses over a link, I jump to a specific
image via:

$('#myPics').cycle(3);

The problem is, I want to change the fade options to "fast" just
before I jump to that image.  How would this be done?