Re: [jQuery] jQuery and Rails

2007-02-21 Thread Klaus Hartl
Yehuda Katz schrieb:
 I'm in the process of building what will soon be the first release of 
 jQuery on Rails together with Steven Bristol, who was a winner of Rails 
 Hackfest (which won him a free ticket to RailsConf for his contributions 
 to the Rails core).

Great news again (does that stop these days?)!

 I had a few questions that I would love if you guys could answer:
 
 1) Are you using Rails?

Yes.

 3) Would you prefer an approach that generated JS by writing Ruby 
 helpers that generated jQuery code, or an approach that made is easier 
 to link up existing jQuery code into Rails?

I think both approaches are required. I'd use helpers if they generated 
unobtrusive code, but often I will have to step out of that and produce 
my own custom code.

 4) If you've used jQuery with Rails, what issues have you run into

No issues :-) It's just fun. By the way, jQuery feels much like Rails/Ruby.

 5) If you've used jQuery with Rails before, what type of application 
 (size, scope, etc.) was it?

We're using it for the Plazes rewrite. Scope: Location based social 
network, size: hopefully getting bigger each day ;-)


-- Klaus


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Rails

2007-02-21 Thread Ⓙⓐⓚⓔ
though I'm not using ruby or ror, i did some reading and it looks very
interesting... will you have an install guide for jqor? I have ruby on
my mac, and have run simple programs but little more.

On 2/20/07, Yehuda Katz [EMAIL PROTECTED] wrote:
 I'm in the process of building what will soon be the first release of jQuery
 on Rails together with Steven Bristol, who was a winner of Rails Hackfest
 (which won him a free ticket to RailsConf for his contributions to the Rails
 core).

 I had a few questions that I would love if you guys could answer:

 1) Are you using Rails?
 2) If you're not, would you if it was easier to use jQuery with Rails?
 3) Would you prefer an approach that generated JS by writing Ruby helpers
 that generated jQuery code, or an approach that made is easier to link up
 existing jQuery code into Rails?
 4) If you've used jQuery with Rails, what issues have you run into
 5) If you've used jQuery with Rails before, what type of application (size,
 scope, etc.) was it?

 --
 Yehuda Katz
 Web Developer | Wycats Designs
 (ph)  718.877.1325
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Rails

2007-02-21 Thread Andreas Wahlin
 1) Are you using Rails?

Only in my spare time, but I want to use it more.

 3) Would you prefer an approach that generated JS by writing Ruby  
 helpers that generated jQuery code, or an approach that made is  
 easier to link up existing jQuery code into Rails?

I suppose the linkup ... not that used to rails or so yet, and since  
I'm mainly a client-side person, I don't really like the server-side  
to generate javascript ala rjs or similar.
I think I'd like some easy way to generate JSON and get that into  
Ajax stuff, and an easy way to know if a request was made by ajax and  
then filter/present partials/views accordingly. I'm really a beginner  
to rails so this may already exist in some form but stuff like

if request.ajax?
   render :partial = 'my_ajax_partial'
else
   render :partial ='normal_view'
end

or perhaps even some filter, in the view, than renders a partial with  
partialname_ajax or just partialname depending on the request.  
(following the rails magical convention over configuration)

or just give out json from a model in a controller

def json_request
   render: json = My_object.new(params).to_json
end

or something. again, this might exist, I don't know rails good at al  
and I'm just making some stuff up :)


 4) If you've used jQuery with Rails, what issues have you run into

haven't tried yet, but as things look now, I suppose I'll just use it  
as if it was with PHP or semething, that is, not really having any  
kind of server-side specific support like remote_form_tag or anything  
like that.


andreas



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Rails

2007-02-21 Thread Andre Lewis

Yehuda, I'm looking forward to jQuery on Rails!

1) Are you using Rails?


All my server-side work is in Rails.

3) Would you prefer an approach that generated JS by writing Ruby helpers

that generated jQuery code, or an approach that made is easier to link up
existing jQuery code into Rails?


I think the former (helpers generating jQ code) -- although I'm not sure
exactly what the latter would look like.
If you go the helpers route, they should avoid dumping JS inline in the HTML
(obviously, this is the beef with the standard Rails JS helpers). It would
be nice if the helpers could write all the JS into the header of your
document, or into an external JS file.

It looks like the UJS plugin has solved some of these problems already, so
it might serve as a useful point of reference. One of the other good things
they've done is provided an easy migration path to switch to UJS.


4) If you've used jQuery with Rails, what issues have you run into

You definitely pay a price in terms of development time. There has been a
lot of effort implementing Prototype/scriptaculous support in Rails --
including RJS templates --  and you throw that all away when you go the
jQuery route (my applications have been *all* jQ or *all*
proto/scriptaculous -- I've never mixed the two)


5) If you've used jQuery with Rails before, what type of application (size,

scope, etc.) was it?


Two Rails apps using exclusively jQ:
- hotspotr.com is a map-based app with ratings and reviews. Not huge, but
respectable.
- http://termmap.earthcode.com/build/web20 is smal, but with more JS. It's
basically one page, with a lot of JS interaction packed into it.

Thanks for your work on this,

Andre

--
Andre Lewis
Author, Google Maps Applications with Rails and Ajax
http://www.amazon.com/dp/1590597877/
My blog: http://earthcode.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Flash video chunkyness and strange rendering on Mac Firefox using thickbox?

2007-02-21 Thread Kelvin Luck
Yeah - I had exactly this problem before... All parts of the flash movie 
which aren't being redrawn disappear. I came up with a bit of a hacky 
workaround... I drew a black box at the back of my flash movie (the 
background was black) and made it into a movieclip which was constantly 
switching between completely black and 99% alpha black. This forces a 
redraw of the whole flash movie every frame and fixes the problem...

Hope that helps,

Kelvin :)

Anna Vo wrote:
 I can play flash movies fine in all browsers with thickbox except for 
 Firefox (FF2x) on a Mac (OS10x). The flash movie renders in chunks and 
 will sometimes disappear and then reappear. Has anyone else run into 
 this and is there some way to fix it? Thanks in advance.
 
  
 
 Anna

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jCarousel with many (100+) items

2007-02-21 Thread Kelvin Luck
Alexandre Plennevaux wrote:
 Back in the days, i developed in flash a UI that is similar to jCarousel,
 but showing thousands (!) of items.
 The same issue quickly arouse, so the solution was to unload/load
 dynamically the prev/next, say, 20 items.
 

Yeah - that is exactly the approach I'm planning to take, I just 
wondered if anyone else had programmed this before. And I'm wondering if 
I should add this functionality into jCarousel itself as it might be 
useful for other people?

Cheers,

Kelvin :)

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery is OpenAjax Compliant

2007-02-21 Thread Kenneth

First off, kudos for taking the initiative to keep jQuery at the leading
edge!

I would like to inquire though, and forgive my ignorance if this is silly,
but why not just include the jquery.openajax.js in the standard jQuery
release? It looks to only be 11 actual lines, which only check for the
presence of the OpenAjax, so it seems unobtrusive. Am I jumping ahead here,
and you plan to do this in the future?

Also, I think I need a OpenAjax.org for dummies book or something, it took
me over 5m to find an actual download of OpenAjax on the site, and the rest
of the information was so technical that I am still wondering if the files I
downloaded are actually supposed to be usedreference implementation..?

Perhaps I am just too tired to soak up what is needed to understand this
right now.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Loop Checkbox Action Question

2007-02-21 Thread Gorkfu

Ok I figured this one out using append and empty, except it emptys all
checkboxes. I tried using prev and :last, but that only worked for the last
checkbox checked not the current one.

$(document).ready(function(){
$([EMAIL PROTECTED]'checkbox']).click(function(){
if ($(this).is(:checked)){
$(this).siblings(ul).hide(normal);
$(this).parent(li).append(span
class='complete'Complete!/span);
} else {
$(this).siblings(ul).show(normal);
$([EMAIL PROTECTED]'complete']).empty();
}
});
});

Is there any way to limit the empty to the current selected checkbox?
-- 
View this message in context: 
http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9077857
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Flash video chunkyness and strange rendering on Mac Firefox using thickbox?

2007-02-21 Thread Joel Birch
Yes I've run into this and it had me stumped. I found out that it is  
(drum roll) once again due to Mac FF ongoing issues with opacity. I  
had opacity:.99; set on the body element because it triggers smoother  
rendering of fonts (sometimes good, sometimes bad, but that's another  
story). I had the same problem you described until I narrowed it down  
to opacity. I removed the opacity style and the problem went away.  
Obviously then, the Thickbox overlay (with transparency) is the  
trigger in your case, Anna. Thanks for the workaround Kelvin! I'll  
remember that.

Joel.


On 21/02/2007, at 8:05 PM, Kelvin Luck wrote:

 Yeah - I had exactly this problem before... All parts of the flash  
 movie
 which aren't being redrawn disappear. I came up with a bit of a hacky
 workaround... I drew a black box at the back of my flash movie (the
 background was black) and made it into a movieclip which was  
 constantly
 switching between completely black and 99% alpha black. This forces a
 redraw of the whole flash movie every frame and fixes the problem...

 Hope that helps,

 Kelvin :)

 Anna Vo wrote:
 I can play flash movies fine in all browsers with thickbox except for
 Firefox (FF2x) on a Mac (OS10x). The flash movie renders in chunks  
 and
 will sometimes disappear and then reappear. Has anyone else run into
 this and is there some way to fix it? Thanks in advance.



 Anna


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANNOUNCEMENT: jQuery Ext Partner to Deliver Integrated JavaScript UI, Features

2007-02-21 Thread Felix Geisendörfer


Personally, I think that we should keep adding speed optimizations until
we're at 19. kb compressed.  :)
That'd be 163839,1808 bit. I'm exited to see the code for allowing 
partial bits to be stored in a JS library : ).


-- Felix
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


Brian Miller wrote:

This kind of reminds me of auto racing.  The rules limit you to a total
gross vehicle weight, but you want to get as much engine under the hood as
you possibly can, without going over the limit.

Personally, I think that we should keep adding speed optimizations until
we're at 19. kb compressed.  :)

(Although, I also think that maybe John should raise the limit by 1.5
times every 18 months.  :-D)

- Brian


  

Well, there are fundamental tradeoffs that need to be made. If you want a
very small codebase, it's difficult to squeeze in all the speed
optimizations. And if you value speed above all else, you might produce a
fairly large, blazing library. We're looking at these issues to try and
come
to a conclusion that will benefit the jQuery community.

-- Yehuda

On 2/20/07, Brian Miller [EMAIL PROTECTED] wrote:


Ideally, there should eventually be one selector base that uses the best
methods of both jQuery's selector engine and DomQuery.  That way,
there's
no longer an issue of which one is used.

- Brian


  

Hi Rajesh,

We're investigating the possibility of supporting the use of DomQuery,
Ext's selector engine, as an alternative (not a replacement) to


jQuery's
  

CSS Selector code.

Rey...

R. Rajesh Jeba Anbiah wrote:


On Feb 20, 5:30 am, Rey Bango [EMAIL PROTECTED] wrote:
  

Today, we're proud to announce that the jQuery Project and Jack
Slocum's
Ext Project, have partnered to integrate the amazingly lightweight


and
  

powerful jQuery framework with Ext's awesome UI library.


   snip

   I previously asked about DOM Query support [*]. And asking the
  

same
  

question:)

[*] news:[EMAIL PROTECTED]
( http://groups.google.com/group/jquery-discuss/msg/
c74f44b95ac863cb )

--
  ?php echo 'Just another PHP saint'; ?
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

  

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

  


--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/






___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

  
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] History Plugin API

2007-02-21 Thread Chris Ovenden

Hi All

I have searched Google and my archives of this list, and can't find an API
for the history plugin. Is there one, somewhere?

Thanks!

Chris

--
Chris Ovenden

http://thepeer.blogspot.com
Imagine all the people / Sharing all the world
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Loop Checkbox Action Question

2007-02-21 Thread Gorkfu

Ok I finnally got this to work, lol. I came accross filter and it helps hide
checked checkboxes on page load. =)

Such as (top one for clicks and bottom for page load):

script type=text/javascript
$(document).ready(function(){
$([EMAIL PROTECTED]'checkbox']).click(function(){
if ($(this).is(:checked)){
$(this).siblings(ul).hide(normal);
} else {
$(this).siblings(ul).show(normal);
}
});
});

/script
script type=text/javascript
$(document).ready(function(){
$([EMAIL PROTECTED]'checkbox']).filter(function(){
if ($(this).is(:checked)){
$(this).siblings(ul).hide(normal);
} else {
$(this).siblings(ul).show(normal);
}
});
});
/script


Gorkfu wrote:
 
 I understand the ready function and have looked over the documentation.
 Maybe I wasn't clear enough in my last post and I'm sorry if that's the
 case.
 
 To explain a little further basically I have a php document i made that
 will load the checkoxes as checked or not checked according to how the
 data is saved in mysql. I wanted the script to hide checkboxes that are
 checked as the page is loading.
 
 So basically I want the script to do it's thing while the page is loading,
 not after it has loaded, but from what I understand that is not possible
 with javascript, unless I'm missing something.
 
 
 
 Karl Rudd wrote:
 
 $(document).ready( function() {
   /* Stuff to do when the page has loaded */
 });
 
 You might like to take a quick look over the documentation for jQuery.
 A good place to start is:
 
 http://docs.jquery.com/How_jQuery_Works
 
 It'll make your jQuery life a lot easier :).
 
 Karl Rudd
 
 On 2/21/07, Gorkfu [EMAIL PROTECTED] wrote:

 Thx for all the help everyone. I tried empty before also, it completely
 removes the li and blank append doesn't remove a prior append. I'm
 stuck
 figuring this one out.

 Also, another thing I ran across is that I would like the javascript to
 run
 when the page loads, if possible. I checked out the load and bind but
 don't
 seam to work for what I want.


 Olaf wrote:
 
  Gorkfu schrieb:
  I tried to set up an append text and remove text to a checkbox that
 is
  clicked. I tried the following it works for append perfectly but the
  remove
  manipulation freezes firefox and explorer.
 
  Or so:
 
  $(document).ready(function(){
$([EMAIL PROTECTED]'checkbox']).click(function(){
if ($(this).is(:checked)){
$(this).siblings(ul).hide(normal);
$(this).parent(li).append(Complete!);
} else {
$(this).siblings(ul).show(normal);
$(this).parent(li).empty();
}
});
});
 
 
  --
  Viele Grüße, Olaf
 
  ---
  [EMAIL PROTECTED]
  http://olaf-bosch.de
  www.akitafreund.de
  ---
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 

 --
 View this message in context:
 http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9074931
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9078557
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] History Plugin API

2007-02-21 Thread Klaus Hartl
Chris Ovenden schrieb:
 Hi All
 
 I have searched Google and my archives of this list, and can't find an 
 API for the history plugin. Is there one, somewhere?
 
 Thanks!
 
 Chris

Chris, you'll find the documentation inline.

http://dev.jquery.com/browser/trunk/plugins/history_remote/jquery.history.js?format=txt

After all, there is not much API:

Enable history for an Ajax driven link:

$('a').remote('#output');

Such a link will load content from the URL of its href attribute into an 
element with the id output. (You can put in any selector suported by 
jQuery or a DOM element).

You still have to activate history:

$.ajaxHistory.initialize();

There is an undocumented feature. If you have links that do not load 
Ajax content but have attached some handler on the click event (for 
example showing a part of the page) you can history-enable that link as 
well:

$('a').history();

I'll write up a little tutorial as soon as possible.


-- Klaus




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Jack Slocum's Ext

2007-02-21 Thread Sam Collett
On 20/02/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 John Resig schrieb:
  Hi Everyone -
 
  Today, we're proud to announce that the jQuery Project and Jack
  Slocum's Ext Project, have partnered to integrate the amazingly
  lightweight and powerful jQuery framework with Ext's awesome UI
  library. This collaboration will greatly enhance the capabilities of
  both projects and expand the functionality available to developers
  using the jQuery JavaScript Library and the Ext UI component suite.
 
 For anyone wondering if any jQuery plugins will be replaced by Ext
 components: While that is possible, there are still good reasons to use
 jQuery plugins. Most are very lightweight, easy to customize and extend,
 and most important: unobtrusive. So if you are looking for something to
 use on a normal website, jQuery's plugins are a good choice. If you
 are looking for components for a rich web application, Ext components
 offer a much richer experience.

 I'm looking forward to the first Ext-release with jQuery.

 --
 Jörn Zaefferer

 http://bassistance.de

Can they even be used in a way to degrade nicely? All the examples I
have looked have don't have a fall-back if you disable JavaScript.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Loop Checkbox Action Question

2007-02-21 Thread Karl Rudd
The ready function does that. It works on the page (for most
browsers) before the page is displayed.

Karl Rudd

On 2/21/07, Gorkfu [EMAIL PROTECTED] wrote:

 I understand the ready function and have looked over the documentation. Maybe
 I wasn't clear enough in my last post and I'm sorry if that's the case.

 To explain a little further basically I have a php document i made that will
 load the checkoxes as checked or not checked according to how the data is
 saved in mysql. I wanted the script to hide checkboxes that are checked as
 the page is loading.

 So basically I want the script to do it's thing while the page is loading,
 not after it has loaded, but from what I understand that is not possible
 with javascript, unless I'm missing something.



 Karl Rudd wrote:
 
  $(document).ready( function() {
/* Stuff to do when the page has loaded */
  });
 
  You might like to take a quick look over the documentation for jQuery.
  A good place to start is:
 
  http://docs.jquery.com/How_jQuery_Works
 
  It'll make your jQuery life a lot easier :).
 
  Karl Rudd
 
  On 2/21/07, Gorkfu [EMAIL PROTECTED] wrote:
 
  Thx for all the help everyone. I tried empty before also, it completely
  removes the li and blank append doesn't remove a prior append. I'm
  stuck
  figuring this one out.
 
  Also, another thing I ran across is that I would like the javascript to
  run
  when the page loads, if possible. I checked out the load and bind but
  don't
  seam to work for what I want.
 
 
  Olaf wrote:
  
   Gorkfu schrieb:
   I tried to set up an append text and remove text to a checkbox that is
   clicked. I tried the following it works for append perfectly but the
   remove
   manipulation freezes firefox and explorer.
  
   Or so:
  
   $(document).ready(function(){
 $([EMAIL PROTECTED]'checkbox']).click(function(){
 if ($(this).is(:checked)){
 $(this).siblings(ul).hide(normal);
 $(this).parent(li).append(Complete!);
 } else {
 $(this).siblings(ul).show(normal);
 $(this).parent(li).empty();
 }
 });
 });
  
  
   --
   Viele Grüße, Olaf
  
   ---
   [EMAIL PROTECTED]
   http://olaf-bosch.de
   www.akitafreund.de
   ---
  
   ___
   jQuery mailing list
   discuss@jquery.com
   http://jquery.com/discuss/
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9074931
  Sent from the JQuery mailing list archive at Nabble.com.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 

 --
 View this message in context: 
 http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9075142
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jCarousel with many (100+) items

2007-02-21 Thread agent2026



vitch wrote:
 
 And I'm wondering if 
 I should add this functionality into jCarousel itself as it might be 
 useful for other people?
 

Yes, you should! :)

Adam
-- 
View this message in context: 
http://www.nabble.com/jCarousel-with-many-%28100%2B%29-items-tf3257540.html#a9079247
Sent from the jCarousel mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Loop Checkbox Action Question

2007-02-21 Thread Karl Rudd
You could combine those two and stick them both in the document HEAD,
since they both run on ready (see other email for why).

There's no need to for the filter() function in this case, the
each() function will do fine. Both iterate over the collection of
objects, but filter is meant for filtering, as in removing some
elements.

Hmmm and there's some other small optimisations. For example factoring
the hide/show code into it's own function. Can change
[EMAIL PROTECTED]'checkbox'] to :checkbox.

Also normal is default for show() and hide().

If I may suggest the following (untested):

$(document).ready(function(){

function visibleCheck() {
var $this = $(this);
var ul = $this.siblings(ul);
if ($this.is(:checked))
ul.hide();
else
ul.show();
}

$(:checkbox)
.click(visibleCheck)
.each(visibleCheck);
});

Karl Rudd

On 2/21/07, Gorkfu [EMAIL PROTECTED] wrote:

 Ok I finnally got this to work, lol. I came accross filter and it helps hide
 checked checkboxes on page load. =)

 Such as (top one for clicks and bottom for page load):

 script type=text/javascript
 $(document).ready(function(){
 $([EMAIL PROTECTED]'checkbox']).click(function(){
 if ($(this).is(:checked)){
 $(this).siblings(ul).hide(normal);
 } else {
 $(this).siblings(ul).show(normal);
 }
 });
 });

 /script
 script type=text/javascript
 $(document).ready(function(){
 $([EMAIL PROTECTED]'checkbox']).filter(function(){
 if ($(this).is(:checked)){
 $(this).siblings(ul).hide(normal);
 } else {
 $(this).siblings(ul).show(normal);
 }
 });
 });
 /script


 Gorkfu wrote:
 
  I understand the ready function and have looked over the documentation.
  Maybe I wasn't clear enough in my last post and I'm sorry if that's the
  case.
 
  To explain a little further basically I have a php document i made that
  will load the checkoxes as checked or not checked according to how the
  data is saved in mysql. I wanted the script to hide checkboxes that are
  checked as the page is loading.
 
  So basically I want the script to do it's thing while the page is loading,
  not after it has loaded, but from what I understand that is not possible
  with javascript, unless I'm missing something.
 
 
 
  Karl Rudd wrote:
 
  $(document).ready( function() {
/* Stuff to do when the page has loaded */
  });
 
  You might like to take a quick look over the documentation for jQuery.
  A good place to start is:
 
  http://docs.jquery.com/How_jQuery_Works
 
  It'll make your jQuery life a lot easier :).
 
  Karl Rudd
 
  On 2/21/07, Gorkfu [EMAIL PROTECTED] wrote:
 
  Thx for all the help everyone. I tried empty before also, it completely
  removes the li and blank append doesn't remove a prior append. I'm
  stuck
  figuring this one out.
 
  Also, another thing I ran across is that I would like the javascript to
  run
  when the page loads, if possible. I checked out the load and bind but
  don't
  seam to work for what I want.
 
 
  Olaf wrote:
  
   Gorkfu schrieb:
   I tried to set up an append text and remove text to a checkbox that
  is
   clicked. I tried the following it works for append perfectly but the
   remove
   manipulation freezes firefox and explorer.
  
   Or so:
  
   $(document).ready(function(){
 $([EMAIL PROTECTED]'checkbox']).click(function(){
 if ($(this).is(:checked)){
 $(this).siblings(ul).hide(normal);
 $(this).parent(li).append(Complete!);
 } else {
 $(this).siblings(ul).show(normal);
 $(this).parent(li).empty();
 }
 });
 });
  
  
   --
   Viele Grüße, Olaf
  
   ---
   [EMAIL PROTECTED]
   http://olaf-bosch.de
   www.akitafreund.de
   ---
  
   ___
   jQuery mailing list
   discuss@jquery.com
   http://jquery.com/discuss/
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9074931
  Sent from the JQuery mailing list archive at Nabble.com.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9078557
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery 

Re: [jQuery] History Plugin API

2007-02-21 Thread Chris Ovenden

On 2/21/07, Klaus Hartl [EMAIL PROTECTED] wrote:


Chris Ovenden schrieb:
 Hi All

 I have searched Google and my archives of this list, and can't find an
 API for the history plugin. Is there one, somewhere?

 Thanks!

 Chris

Chris, you'll find the documentation inline.


http://dev.jquery.com/browser/trunk/plugins/history_remote/jquery.history.js?format=txt

After all, there is not much API:

Enable history for an Ajax driven link:

$('a').remote('#output');

Such a link will load content from the URL of its href attribute into an
element with the id output. (You can put in any selector suported by
jQuery or a DOM element).

You still have to activate history:

$.ajaxHistory.initialize();

There is an undocumented feature. If you have links that do not load
Ajax content but have attached some handler on the click event (for
example showing a part of the page) you can history-enable that link as
well:

$('a').history();

I'll write up a little tutorial as soon as possible.





Thanks, Klaus! I'll give it a try.

Chris

--
Chris Ovenden

http://thepeer.blogspot.com
Imagine all the people / Sharing all the world
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] History Plugin API

2007-02-21 Thread Klaus Hartl
Chris Ovenden schrieb:
 Thanks, Klaus! I'll give it a try.
 
 Chris


Another hint: if you build the documentation from SVN with all plugins, 
the history plugin is in there as well.


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Loop Checkbox Action Question

2007-02-21 Thread Gorkfu

Thx, that does clean it up a lot. =)

As for normal being default for show and hide, I think the default doesn't
work correctly, or there is no default. Testing it blank in IE7 and
Firefox2, the checkboxes disapear faster than when set to normal setting.


Karl Rudd wrote:
 
 You could combine those two and stick them both in the document HEAD,
 since they both run on ready (see other email for why).
 
 There's no need to for the filter() function in this case, the
 each() function will do fine. Both iterate over the collection of
 objects, but filter is meant for filtering, as in removing some
 elements.
 
 Hmmm and there's some other small optimisations. For example factoring
 the hide/show code into it's own function. Can change
 [EMAIL PROTECTED]'checkbox'] to :checkbox.
 
 Also normal is default for show() and hide().
 
 If I may suggest the following (untested):
 
 $(document).ready(function(){
 
   function visibleCheck() {
   var $this = $(this);
   var ul = $this.siblings(ul);
   if ($this.is(:checked))
   ul.hide();
   else
   ul.show();
   }
   
   $(:checkbox)
   .click(visibleCheck)
   .each(visibleCheck);
 });
 
 Karl Rudd
 

-- 
View this message in context: 
http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9079695
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] History Plugin API

2007-02-21 Thread Sam Collett
On 21/02/07, Klaus Hartl [EMAIL PROTECTED] wrote:
 Chris Ovenden schrieb:
  Hi All
 
  I have searched Google and my archives of this list, and can't find an
  API for the history plugin. Is there one, somewhere?
 
  Thanks!
 
  Chris

 Chris, you'll find the documentation inline.

 http://dev.jquery.com/browser/trunk/plugins/history_remote/jquery.history.js?format=txt

 After all, there is not much API:

 Enable history for an Ajax driven link:

 $('a').remote('#output');

 Such a link will load content from the URL of its href attribute into an
 element with the id output. (You can put in any selector suported by
 jQuery or a DOM element).

 You still have to activate history:

 $.ajaxHistory.initialize();

 There is an undocumented feature. If you have links that do not load
 Ajax content but have attached some handler on the click event (for
 example showing a part of the page) you can history-enable that link as
 well:

 $('a').history();

 I'll write up a little tutorial as soon as possible.


 -- Klaus

You could always use the jQuery HTML Documentation Generator:
http://jquery.bassistance.de/docTool/docTool.html

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] accordion table, instead of an accordion list/menu?

2007-02-21 Thread Karl Swedberg
I haven't tested any, but there have been a few threads on this issue  
before and one workaround I recall reading about was to temporarily  
wrap a set of rows in a div before showing and hiding and then remove  
the div after the effect has completed.


If you discover this or some other method works, please post the  
solution to the list! :)


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Feb 20, 2007, at 11:25 PM, rolfsf wrote:



Is there a way around that? Can you get simple animation to work on  
table
rows? I can live with a simple show/hide, but it would be nice to  
dress it

up a little.


Karl Swedberg-2 wrote:


Rolf, I think the strange results occur in Firefox because it wants
all tr elements to have display:table-row but the .slideX()
and .show/hide(speed), etc. methods use display:block

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Feb 20, 2007, at 9:09 PM, rolfsf wrote:



by the way, I do notice that if I use .slideToggle instead
of .toggle I get
strange results... not sure why.





--
View this message in context: http://www.nabble.com/accordion-table% 
2C-instead-of-an-accordion-list-menu--tf3264032.html#a9075220

Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Loop Checkbox Action Question

2007-02-21 Thread Karl Swedberg
Actually, normal is not default for .show() and .hide() -- even  
though it is the default for all the .slideX() methods and .fadeIn 
()/.fadeOut().
Without a parameter, .show() and .hide() act differently -- just  
applying the display=none or display=block/inline to the matched set  
of elements. For them to use the animation, a parameter must be  
inlcluded.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Feb 21, 2007, at 7:01 AM, Gorkfu wrote:



Thx, that does clean it up a lot. =)

As for normal being default for show and hide, I think the default  
doesn't

work correctly, or there is no default. Testing it blank in IE7 and
Firefox2, the checkboxes disapear faster than when set to normal  
setting.



Karl Rudd wrote:


You could combine those two and stick them both in the document HEAD,
since they both run on ready (see other email for why).

There's no need to for the filter() function in this case, the
each() function will do fine. Both iterate over the collection of
objects, but filter is meant for filtering, as in removing some
elements.

Hmmm and there's some other small optimisations. For example  
factoring

the hide/show code into it's own function. Can change
[EMAIL PROTECTED]'checkbox'] to :checkbox.

Also normal is default for show() and hide().

If I may suggest the following (untested):

$(document).ready(function(){

function visibleCheck() {
var $this = $(this);
var ul = $this.siblings(ul);
if ($this.is(:checked))
ul.hide();
else
ul.show();
}

$(:checkbox)
.click(visibleCheck)
.each(visibleCheck);
});

Karl Rudd



--
View this message in context: http://www.nabble.com/Loop-Checkbox- 
Action-Question-tf3246372.html#a9079695

Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Problem to add an jQuey- command to a loop

2007-02-21 Thread ZentraNet
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Select elements without specific children

2007-02-21 Thread agent2026

Thanks everyone, that did it.  I was looking at gotAPI which doesn't mention
that issue.  Not sure who takes care of that, but guess it should be
updated.

One question: is there a best practice regarding using the .not method vs.
the :not pseudo-class?

Btw, in my tests, and in examples I've found, the pseudo-class selector does
not require quotes (at least it doesn't for :not).

Adam



Karl Swedberg-2 wrote:
 
 Hi Adam,
 
 try this:
 
 $('li.expandable:not([a.on])')
 
 A couple things to note:
 1. you don't need to repeat li.expandable inside the :not
 2. If you are using single quotation marks around the whole selector  
 expression, use double quotation marks around the selector for  
 the :not pseudo-class.
 
 Cheers,
 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com
 

-- 
View this message in context: 
http://www.nabble.com/Select-elements-without-specific-children-tf3260789.html#a9081248
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread SeViR
Hi,

  I write some plugins for jQuery that I would want to share with everybody.
Sorry, I have no time for comment the code. I make a simple sample pages 
with
notepad ;)

jQMaps plugin: http://www.sevir.org/projects/storage/jqmaps/index.html
Hotspots, maximize info window, custom icons,...

jQPanView: http://www.sevir.org/projects/storage/jpanview/index.html
inspired in Pan View Plugin of Christian Bach (thanks for your sample, 
Christian)

These plugins are developed for help me in my projects but never I have 
time to
publish :-P

-- 
Best Regards,
 José Francisco Rives Lirola sevir1ATgmail.com

 SeViR CW · Computer Design
 http://www.sevir.org
  
 Murcia - Spain


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Hide and show inside JTabs

2007-02-21 Thread Web Specialist

Hi all

I'm using JTabs with a big form for improve usability. Works like a charm.
Inside this form I'll want to show/hide input fields when user
checks/unchecks a radio button. But I have a problem. Using this sample
script works fine outside JTabs:

Jquery code:
   script type=text/javascript
   $(document).ready(function(){
$(#show_property__pat_co).hide();//hides the DIV
$([EMAIL PROTECTED]'property__pat_co_yes_no']).click(function(){
if ($([EMAIL PROTECTED]'property__pat_co_yes_no'[EMAIL PROTECTED]).val() == 
1){
   $(#show_property__pat_co).show();
}
else{
   $(#show_property__pat_co).hide();
}
   });

   });
   /script

form id=test name=test
tr
   tdMore properties?/td
   td
   input name=property__pat_co_yes_no type=radio value=1
/nbsp;Yesnbsp;input name=property__pat_co_yes_no type=radio
value=2 /nbsp;No
   /td
/tr

!--- this div needs to show only after user checked YES above ---
!--- and needs to hide after checked NO above ---
div id=show_property__pat_co
tr
   tdProperty Code/td
   tdinput name=property__pat_co type=text size=50 maxlength=22
//td
/tr
tr
   tdDescription/td
   tdinput name=property__pat_no type=text size=50 maxlength=22
//td
/tr
tr
   tdProperty Value/td
   tdinput name=property__pat_vr type=text size=50 maxlength=22
//td
/tr
/div
/form

What's wrong? Could be JTabs properties?

Cheers
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread Benjamin Sterling

Very good stuff, thanks.
--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread Schnuck
wow, thanks.

On 21/02/07, SeViR [EMAIL PROTECTED] wrote:
 Hi,

   I write some plugins for jQuery that I would want to share with everybody.
 Sorry, I have no time for comment the code. I make a simple sample pages
 with
 notepad ;)

 jQMaps plugin: http://www.sevir.org/projects/storage/jqmaps/index.html
 Hotspots, maximize info window, custom icons,...

 jQPanView: http://www.sevir.org/projects/storage/jpanview/index.html
 inspired in Pan View Plugin of Christian Bach (thanks for your sample,
 Christian)

 These plugins are developed for help me in my projects but never I have
 time to
 publish :-P

 --
 Best Regards,
  José Francisco Rives Lirola sevir1ATgmail.com

  SeViR CW · Computer Design
  http://www.sevir.org

  Murcia - Spain


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Rails

2007-02-21 Thread Luke Lutman
Yehuda Katz wrote:
 1) Are you using Rails?
Yes :-)

 3) Would you prefer an approach that generated JS by writing Ruby 
 helpers that generated jQuery code, or an approach that made is easier 
 to link up existing jQuery code into Rails?
 4) If you've used jQuery with Rails, what issues have you run into
I'd prefer not to have helpers that generate js -- I can write javascript 
myself. I'd rather see 
the integration issues solved. One of the best things about rails is that it 
lets you bypass all 
the magic when you need to. Helpers (i.e. form_remote, etc.) can't handle every 
situation, so 
having accessible building blocks is crucial to me.

I realize there is a group of people who'd like to just write everything in 
Ruby (i.e. get to 
use javascript without having to know javascript), but I think that's a red 
herring. Plus, those 
concerns can be addressed by more complicated helpers, built on the more basic 
ones.

Here are the main issues I've run into:
+ unobtrusively including js specific to a view
+ targeting elements on a page without adding ID's all over the place
+ concatenation, compression and caching (i.e. cache the packed version of a 
bunch of scripts)

I think what I'd like (ideally) would be a basic helper (that wouldn't even 
need to be 
jQuery-specific) that I could call from any view which would concatenate, 
compress, and cache 
(fragment cache? page cache?) bits of javascript or javascript files, and add a 
script 
src=.../script tag to the head. If you have a plugin (or some custom 
code in an external 
file) that you only use in a few places, you could include it alongside inline 
script (if it was 
more widely used, it would go in your application-wide js file).

So, in whatever.rhtml, do something like:

 % javascript :file = 'path/to/plugin.js' %
 % javascript :text = %{ $('p').css('color','blue'); } %
 pWhatever.../p
 % javascript :text = %{ $('p').css('font-size', '2em'); }% %

And get:

 html
   head
 script type=text/javascript src=whatever.js/script
   /head
   body
 pWhatever.../p
   /body
 /html

In a way, what I'm picturing is very jQuery-centric -- there's a core utility, 
plus plugins 
(i.e. more complex, task-specific helpers).

Luke


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Rails

2007-02-21 Thread Klaus Hartl
Luke Lutman schrieb:
 Yehuda Katz wrote:
 1) Are you using Rails?
 Yes :-)
 
 3) Would you prefer an approach that generated JS by writing Ruby 
 helpers that generated jQuery code, or an approach that made is easier 
 to link up existing jQuery code into Rails?
 4) If you've used jQuery with Rails, what issues have you run into
 I'd prefer not to have helpers that generate js -- I can write javascript 
 myself. I'd rather see 
 the integration issues solved. One of the best things about rails is that it 
 lets you bypass all 
 the magic when you need to. Helpers (i.e. form_remote, etc.) can't handle 
 every situation, so 
 having accessible building blocks is crucial to me.
 
 I realize there is a group of people who'd like to just write everything in 
 Ruby (i.e. get to 
 use javascript without having to know javascript), but I think that's a red 
 herring. Plus, those 
 concerns can be addressed by more complicated helpers, built on the more 
 basic ones.
 
 Here are the main issues I've run into:
 + unobtrusively including js specific to a view
 + targeting elements on a page without adding ID's all over the place
 + concatenation, compression and caching (i.e. cache the packed version of a 
 bunch of scripts)
 
 I think what I'd like (ideally) would be a basic helper (that wouldn't even 
 need to be 
 jQuery-specific) that I could call from any view which would concatenate, 
 compress, and cache 
 (fragment cache? page cache?) bits of javascript or javascript files, and add 
 a script 
 src=.../script tag to the head. If you have a plugin (or some custom 
 code in an external 
 file) that you only use in a few places, you could include it alongside 
 inline script (if it was 
 more widely used, it would go in your application-wide js file).
 
 So, in whatever.rhtml, do something like:
 
  % javascript :file = 'path/to/plugin.js' %
  % javascript :text = %{ $('p').css('color','blue'); } %
  pWhatever.../p
  % javascript :text = %{ $('p').css('font-size', '2em'); }% %
 
 And get:
 
  html
head
  script type=text/javascript src=whatever.js/script
/head
body
  pWhatever.../p
/body
  /html
 
 In a way, what I'm picturing is very jQuery-centric -- there's a core 
 utility, plus plugins 
 (i.e. more complex, task-specific helpers).
 
 Luke

Luke, have you tried to use the AssetPackager plugin? It is not totally 
automatic as you have to define the scripts to be packed in one yml, but 
thats okay for me. I think merging whatever JavaScript there is into a 
file is not always good for files that are only included in special 
views, because that would result in a file that would not be loaded from 
cache because of the (minor) differences.



-- Klaus




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Rails

2007-02-21 Thread Klaus Hartl
Peter De Berdt schrieb:
 1) Are you using Rails?
 
 Yes, close to 24/7 :-)
 
 3) Would you prefer an approach that generated JS by writing Ruby helpers
 that generated jQuery code, or an approach that made is easier to link up
 existing jQuery code into Rails?
 
 A mix of both actually, it would be great if I could just replace
 Prototype/scriptaculous with jquery/interface and I wouldn't have to
 replace my Rails helpers with Javascript code (I prefer to use Rails
 helpers for the simple stuff and resort to custom JS code if the Rails
 helpers are not sufficient). The Rails helpers are really great for
 the day-to-day stuff, but they don't encompass the complete
 functionality of Proto/script.

This is *exactly* what I'm after - combined with the idea of UOJS, that is.


-- Klaus



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread Rey Bango
Sevir, awesome work my man.

Could I make a small request? Would it be possible to provide a version 
of the files with the instructions  parameters translated to English?

While I can understand what you mean by el parámetro infopanel debe de 
ser un objeto DOM (the infopanel parameter should be a DOM object), its 
going to be hard for many other folks to understand this.

I'd do it but I'm swamped on other things.

I really appreciate your efforts.

Thanks,

Rey

SeViR wrote:
 Hi,
 
   I write some plugins for jQuery that I would want to share with everybody.
 Sorry, I have no time for comment the code. I make a simple sample pages 
 with
 notepad ;)
 
 jQMaps plugin: http://www.sevir.org/projects/storage/jqmaps/index.html
 Hotspots, maximize info window, custom icons,...
 
 jQPanView: http://www.sevir.org/projects/storage/jpanview/index.html
 inspired in Pan View Plugin of Christian Bach (thanks for your sample, 
 Christian)
 
 These plugins are developed for help me in my projects but never I have 
 time to
 publish :-P
 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread Klaus Hartl
SeViR schrieb:
 Hi,
 
   I write some plugins for jQuery that I would want to share with everybody.
 Sorry, I have no time for comment the code. I make a simple sample pages 
 with
 notepad ;)
 
 jQMaps plugin: http://www.sevir.org/projects/storage/jqmaps/index.html
 Hotspots, maximize info window, custom icons,...
 
 jQPanView: http://www.sevir.org/projects/storage/jpanview/index.html
 inspired in Pan View Plugin of Christian Bach (thanks for your sample, 
 Christian)
 
 These plugins are developed for help me in my projects but never I have 
 time to
 publish :-P
 


Nice! It would be totally cool to get latitude/longitude of the required 
data from a geo microformat...

Or even better get the whole location data from a vcard microformat. 
Here's an example of one:

div class=vcard
 a class=fn org href=...
 Clara's Coffeeshop/a

 div class=adr
 street: span class=street-addressSchouml;nhauser Allee 
36/spanbr /
 city: span class=localityBerlin/spanbr /
 state: span class=regionBerlin/spanbr /
 zip: span class=postal-code10425/spanbr /
 country: span class=country-nameGermany/span
 kind of plaze: abbr class=type title=workRestaurant/abbr
 /div

 lat/lon:
 span class=geo
 abbr class=latitude title=52.53754152.53/abbr,
 abbr class=longitude title=13.41250913.41/abbr
 /span
/div

The markup could be improved in semantics, it's just an example.


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Komod API catalog

2007-02-21 Thread Alexandre Plennevaux
Hello!
 
the excellent (and free) Komodo Edit 4 software offers the possibility to 
extend code completion libraries.
 
I would like to know if there is an existing jquery API catalog already 
created? Googling around and looking at activestate website was unfruitful.
 
Thank you!
 
Alexandre
 

-- 
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.441 / Base de données virus: 268.18.3/694 - Date: 20/02/2007 13:44
 
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread Christian Bach

2007/2/21, SeViR [EMAIL PROTECTED]:


Hi,

  I write some plugins for jQuery that I would want to share with
everybody.
Sorry, I have no time for comment the code. I make a simple sample pages
with
notepad ;)

jQMaps plugin: http://www.sevir.org/projects/storage/jqmaps/index.html
Hotspots, maximize info window, custom icons,...

jQPanView: http://www.sevir.org/projects/storage/jpanview/index.html
inspired in Pan View Plugin of Christian Bach (thanks for your sample,
Christian)

These plugins are developed for help me in my projects but never I have
time to
publish :-P



Excellent work!

I'm glad to see that Mr T was kept in the example :)

/christian
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Rails

2007-02-21 Thread Chris Ovenden

On 2/21/07, Yehuda Katz [EMAIL PROTECTED] wrote:




1) Are you using Rails?



Yes, but still a newbie; migrating from PHP

3) Would you prefer an approach that generated JS by writing Ruby helpers

that generated jQuery code, or an approach that made is easier to link up
existing jQuery code into Rails?




I have avoided RoR's automatic javascript stuff, because I read that it's
not unobtrusive. But in any case I love to code in jQ (and I agree with
Klaus that there are similarities between jQ and Ruby) so have kept it
separate from the ruby stuff. I would be interested, though, in helper
methods in templates which hijax links automatically in an unobtrusive way
(including back button issues).

4) If you've used jQuery with Rails, what issues have you run into


We have several mini-sites running as separate Rails instances. We have a
module with common ruby code in it, but as yet we haven't found a nice way
to share javascript resources across projects.

Looking forward to seeing your first release!

--
Chris Ovenden

http://frontend.blogsome.com
Imagine all the people / Sharing all the world
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Rails

2007-02-21 Thread Luke Lutman
Klaus Hartl wrote:
   Luke, have you tried to use the AssetPackager plugin? It is not totally
 automatic as you have to define the scripts to be packed in one yml, but 
 thats okay for me. I think merging whatever JavaScript there is into a 
 file is not always good for files that are only included in special 
 views, because that would result in a file that would not be loaded from 
 cache because of the (minor) differences.
 
 -- Klaus

I hadn't seen AssetPackager before ... thanks for the tip! And I agree, the 
contatenation and 
caching would be tricky to get right.

Luke


-- 
zinc Roe Design
www.zincroe.com
(647) 477-6016

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] accordion table, instead of an accordion list/menu?

2007-02-21 Thread rolfsf

Thanks Karl - I've scoured the threads - it's definitely on the list of hard
problems, and labeled unsolved
http://docs.jquery.com/HardProblems



Karl Swedberg-2 wrote:
 
 I haven't tested any, but there have been a few threads on this issue  
 before and one workaround I recall reading about was to temporarily  
 wrap a set of rows in a div before showing and hiding and then remove  
 the div after the effect has completed.
 
 If you discover this or some other method works, please post the  
 solution to the list! :)
 
 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com
 
 
 
 On Feb 20, 2007, at 11:25 PM, rolfsf wrote:
 

 Is there a way around that? Can you get simple animation to work on  
 table
 rows? I can live with a simple show/hide, but it would be nice to  
 dress it
 up a little.
 

-- 
View this message in context: 
http://www.nabble.com/accordion-table%2C-instead-of-an-accordion-list-menu--tf3264032.html#a9083021
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] How to get the ID of the parent node?

2007-02-21 Thread dalvarado
Hi,

Following up from a question I asked yesterday, I wanted to get the closest 
parent DIV given an arbitrary nested element.  But when I request the .id of 
that element, i repeatedly get an undefined message, even though this call, 
$(this).parent(div.sidebarToDo) yields an object.

$('#todoList a.deleteTDItem').each(function(index) {
var divId = $(this).parent(div.sidebarToDo).id;
alert(divId);   // alwasy gives 'undefined'
$(this).click = function() { $('#' + divId).remove(); };
});

This is the HTML in question:

div class=sidebarToDo width=100% id=dToDo3
table cellpadding=0 cellspacing=0 border=0 width=100%
tr
tdinput id=cbTdId3 onClick=var textDecor = (this.checked ? 
'line-through' : 'none'); $('#textId3').css('text-decoration', textDecor); 
type=checkbox id=tdcb3 /td

td id=textId3 class=sidebarText style=text-decoration: 
noneStart Work/td
td align=righta class=editTDItem href='#'img 
src=images/edit.gif alt=Edit border=0/a/td
td align=righta class=deleteTDItem 
href=javascript:toggleDiv('dToDo3');img src=images/deleteLink.gif 
alt=Delete border=0/a/td
/tr
/table
/div

Thanks, - Dave

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Sam Collett
On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi,

 Following up from a question I asked yesterday, I wanted to get the closest 
 parent DIV given an arbitrary nested element.  But when I request the .id 
 of that element, i repeatedly get an undefined message, even though this 
 call, $(this).parent(div.sidebarToDo) yields an object.

 $('#todoList a.deleteTDItem').each(function(index) {
 var divId = $(this).parent(div.sidebarToDo).id;
 alert(divId);   // alwasy gives 'undefined'
 $(this).click = function() { $('#' + divId).remove(); 
 };
 });

 This is the HTML in question:

 div class=sidebarToDo width=100% id=dToDo3
 table cellpadding=0 cellspacing=0 border=0 width=100%
 tr
 tdinput id=cbTdId3 onClick=var textDecor = (this.checked ? 
 'line-through' : 'none'); $('#textId3').css('text-decoration', textDecor); 
 type=checkbox id=tdcb3 /td

 td id=textId3 class=sidebarText style=text-decoration: 
 noneStart Work/td
 td align=righta class=editTDItem href='#'img 
 src=images/edit.gif alt=Edit border=0/a/td
 td align=righta class=deleteTDItem 
 href=javascript:toggleDiv('dToDo3');img src=images/deleteLink.gif 
 alt=Delete border=0/a/td
 /tr
 /table
 /div

 Thanks, - Dave

You can get the id via attr:

$(this).parent(div.sidebarToDo).attr(id)

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Chris Ovenden

On 2/21/07, Sam Collett [EMAIL PROTECTED] wrote:


On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hi,

 Following up from a question I asked yesterday, I wanted to get the
closest parent DIV given an arbitrary nested element.  But when I request
the .id of that element, i repeatedly get an undefined message, even
though this call, $(this).parent(div.sidebarToDo) yields an object.

 $('#todoList a.deleteTDItem').each(function(index) {
 var divId = $(this).parent(div.sidebarToDo
).id;
 alert(divId);   // alwasy gives
'undefined'
 $(this).click = function() { $('#' +
divId).remove(); };
 });

 This is the HTML in question:

 div class=sidebarToDo width=100% id=dToDo3
 table cellpadding=0 cellspacing=0 border=0 width=100%
 tr
 tdinput id=cbTdId3 onClick=var textDecor = (this.checked ?
'line-through' : 'none'); $('#textId3').css('text-decoration', textDecor);
type=checkbox id=tdcb3 /td

 td id=textId3 class=sidebarText style=text-decoration:
noneStart Work/td
 td align=righta class=editTDItem href='#'img
src=images/edit.gif alt=Edit border=0/a/td
 td align=righta class=deleteTDItem
href=javascript:toggleDiv('dToDo3');img src=images/deleteLink.gif
alt=Delete border=0/a/td
 /tr
 /table
 /div

 Thanks, - Dave

You can get the id via attr:

$(this).parent(div.sidebarToDo).attr(id)





To spell it out a little more clearly, the API for attributes has changed in
jQuery 1.0.3+ and shortcuts like .id() no longer work

--
Chris Ovenden

http://thepeer.blogspot.com
Imagine all the people / Sharing all the world
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread dalvarado

  ---Original Message---
  From: Chris Ovenden [EMAIL PROTECTED]
  Subject: Re: [jQuery] How to get the ID of the parent node?
  Sent: Feb 21 '07 16:04
  
  On 2/21/07, SAM COLLETT [LINK: mailto:[EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote: On 21/02/07, [LINK:
  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] [LINK:
  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   Hi,
  
   Following up from a question I asked yesterday, I wanted to get the
  closest parent DIV given an arbitrary nested element.  But when I request
  the .id of that element, i repeatedly get an undefined message, even
  though this call, $(this).parent( div.sidebarToDo) yields an object.
  
   $('#todoList
  a.deleteTDItem').each(function(index) {
   var divId =
  $(this).parent(div.sidebarToDo).id;
   alert(divId);   // alwasy gives
  'undefined'
   $(this).click = function() { $('#' +
  divId).remove(); };
   });
  
   This is the HTML in question:
  
   div class=sidebarToDo width=100% id=dToDo3
   table cellpadding=0 cellspacing=0 border=0 width=100%
   tr
   tdinput id=cbTdId3 onClick=var textDecor = (this.checked ?
  'line-through' : 'none');
  $('#textId3').css('text-decoration', textDecor);
  type=checkbox id=tdcb3 /td
  
   td id=textId3 class=sidebarText style=text-decoration:
  noneStart Work/td
   td align=righta class=editTDItem href='#'img
  src=images/edit.gif alt=Edit border=0/a/td
   td align=righta class=deleteTDItem
  href=javascript:toggleDiv('dToDo3');img
  src=images/deleteLink.gif alt=Delete border=0/a/td
   /tr
   /table
   /div
  
   Thanks, - Dave
  
  You can get the id via attr:
  
  $(this).parent(div.sidebarToDo).attr(id)
  
  
  To spell it out a little more clearly, the API for attributes has changed
  in jQuery 1.0.3+ and shortcuts like .id() no longer work
  
  --
  Chris Ovenden
  
  [LINK: http://thepeer.blogspot.com]  http://thepeer.blogspot.com
  Imagine all the people / Sharing all the world

Thanks, but I'm still getting undefined even though I can an object for my 
reference to the DIV.  Any ideas on how to troubleshoot?  here's the JS:

$('#todoList a.deleteTDItem').each(function(index) {
var divId = 
$(this).parent(div.sidebarToDo).attr(id);
alert($(this).parent(div.sidebarToDo) +  id: + 
divId);
$(this).click = function() { $('#' + divId).remove(); };
});



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] animation in interface ie7 bug

2007-02-21 Thread Andreas Wahlin
I've struggled for about three hours with a strange ie7 bug.
It's a simple animation (of a div with a height of 6em), looking like  
this
.animate({height: ghostHeight}, 250, function() { ... });
and it works fine everywhere except ie7 that says invalid argument.

If i take away the interface (running on 1.2) it works. It seems to  
somehow complain that height isn't initialized correctly or  
something, because any other attribute will do (like width), and if I  
add this
 $(self).height($(self).height());
the bug disappears.

just thought I should mention it, I don't understand (and I'd rather  
not have that extra line of code)

andreas


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Applyng classes to table rows?

2007-02-21 Thread Shane Graber - jQuery
I'm stumped on how to do this with jQuery.  I have a table like this:

table

tr class=row id=blah-one
td
/td
/tr

tr
td
/td
/tr

tr
td
/td
/tr

tr class=row id=blah-two
td
/td
/tr

tr
td
/td
/tr

tr
td
/td
/tr

/table

I need to convert it to:

table

tr class=row id=blah-one
td
/td
/tr

tr class=row blah-one
td
/td
/tr

tr class=row blah-one
td
/td
/tr

tr class=row id=blah-two
td
/td
/tr

tr class=row blah-two
td
/td
/tr

tr class=row blah-two
td
/td
/tr

/table

Basically, I want to look at each table row and if it does not have a
class, I want to look up the table row by row till it finds a row that
has a class and id set on it and then take that class and id and apply
it to that row that does not have its class set.

What I am attempting to do is to write a show/hide script for phpBB so
that I can dynamically show/hide sections of the forum tree either
collapsed or expanded.  So far I have been successful at applying a
class and id to each table row section but not the rows directly
beneath it yet.

Any help would be appreciated.  Thanks!

Shane

-- 
-
Bender: Amy, you like cute things so I baked you a pony.
-

http://www.reefs.org - Where reefkeeping begins on the internet.
http://www.advancedaquarist.com - High quality, free monthly publication for
the reef keeping hobbyist.
http://www.aquaristcourses.org - Distance learning courses for the
marine aquarist.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] accordion table, instead of an accordion list/menu?

2007-02-21 Thread Kristinn Sigmundsson
Thing is that even if you have a callback to the slideToggle and set
the display property to table-row, it still comes out wierd...

maybe a wrapping div is the best solution?

On 2/21/07, rolfsf [EMAIL PROTECTED] wrote:

 Thanks Karl - I've scoured the threads - it's definitely on the list of hard
 problems, and labeled unsolved
 http://docs.jquery.com/HardProblems



 Karl Swedberg-2 wrote:
 
  I haven't tested any, but there have been a few threads on this issue
  before and one workaround I recall reading about was to temporarily
  wrap a set of rows in a div before showing and hiding and then remove
  the div after the effect has completed.
 
  If you discover this or some other method works, please post the
  solution to the list! :)
 
  --Karl
  _
  Karl Swedberg
  www.englishrules.com
  www.learningjquery.com
 
 
 
  On Feb 20, 2007, at 11:25 PM, rolfsf wrote:
 
 
  Is there a way around that? Can you get simple animation to work on
  table
  rows? I can live with a simple show/hide, but it would be nice to
  dress it
  up a little.
 

 --
 View this message in context: 
 http://www.nabble.com/accordion-table%2C-instead-of-an-accordion-list-menu--tf3264032.html#a9083021
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



-- 
——
 Med Vänliga Hälsningar
 Kristinn Kiddi Sigmundsson
   0707-971938
——

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread Andreas Wahlin
 jQPanView: http://www.sevir.org/projects/storage/jpanview/index.html
 inspired in Pan View Plugin of Christian Bach (thanks for your sample,
 Christian)

Strangest thing ... the top example works in safari, but it seems the  
bottom one does not, i wanna see mr T :D

andreas

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] accordion table, instead of an accordion list/menu?

2007-02-21 Thread Sam Collett
On 21/02/07, Kristinn Sigmundsson [EMAIL PROTECTED] wrote:
 Thing is that even if you have a callback to the slideToggle and set
 the display property to table-row, it still comes out wierd...

 maybe a wrapping div is the best solution?

I have tried wrapping with DIV's, but they don't seem to work for me
(around tr, tbody and wrapping the contents of cells).

I have not come across any method in JavaScript that can slide up/down
a row. I am not sure if Prototype or YUI are capable of this.


 On 2/21/07, rolfsf [EMAIL PROTECTED] wrote:
 
  Thanks Karl - I've scoured the threads - it's definitely on the list of hard
  problems, and labeled unsolved
  http://docs.jquery.com/HardProblems
 
 
 
  Karl Swedberg-2 wrote:
  
   I haven't tested any, but there have been a few threads on this issue
   before and one workaround I recall reading about was to temporarily
   wrap a set of rows in a div before showing and hiding and then remove
   the div after the effect has completed.
  
   If you discover this or some other method works, please post the
   solution to the list! :)
  
   --Karl
   _
   Karl Swedberg
   www.englishrules.com
   www.learningjquery.com
  
  
  
   On Feb 20, 2007, at 11:25 PM, rolfsf wrote:
  
  
   Is there a way around that? Can you get simple animation to work on
   table
   rows? I can live with a simple show/hide, but it would be nice to
   dress it
   up a little.
  
 
  --
  View this message in context: 
  http://www.nabble.com/accordion-table%2C-instead-of-an-accordion-list-menu--tf3264032.html#a9083021
  Sent from the JQuery mailing list archive at Nabble.com.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


 --
 ——
  Med Vänliga Hälsningar
  Kristinn Kiddi Sigmundsson
0707-971938
 ——

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Applyng classes to table rows?

2007-02-21 Thread Kristinn Sigmundsson
this does it for the classes
$(table tr:not([EMAIL PROTECTED])).each(function() {
$(this).attr(class, $(this).prev([EMAIL 
PROTECTED]).attr(class));
});
you might be able to get it down to one row...

I would not recommend setting the IDs as you want, because the
standars clearly states that IDs should be UNIQUE!

//Kristinn

On 2/21/07, Shane Graber - jQuery [EMAIL PROTECTED] wrote:
 I'm stumped on how to do this with jQuery.  I have a table like this:

 table

 tr class=row id=blah-one
 td
 /td
 /tr

 tr
 td
 /td
 /tr

 tr
 td
 /td
 /tr

 tr class=row id=blah-two
 td
 /td
 /tr

 tr
 td
 /td
 /tr

 tr
 td
 /td
 /tr

 /table

 I need to convert it to:

 table

 tr class=row id=blah-one
 td
 /td
 /tr

 tr class=row blah-one
 td
 /td
 /tr

 tr class=row blah-one
 td
 /td
 /tr

 tr class=row id=blah-two
 td
 /td
 /tr

 tr class=row blah-two
 td
 /td
 /tr

 tr class=row blah-two
 td
 /td
 /tr

 /table

 Basically, I want to look at each table row and if it does not have a
 class, I want to look up the table row by row till it finds a row that
 has a class and id set on it and then take that class and id and apply
 it to that row that does not have its class set.

 What I am attempting to do is to write a show/hide script for phpBB so
 that I can dynamically show/hide sections of the forum tree either
 collapsed or expanded.  So far I have been successful at applying a
 class and id to each table row section but not the rows directly
 beneath it yet.

 Any help would be appreciated.  Thanks!

 Shane

 --
 -
 Bender: Amy, you like cute things so I baked you a pony.
 -

 http://www.reefs.org - Where reefkeeping begins on the internet.
 http://www.advancedaquarist.com - High quality, free monthly publication for
 the reef keeping hobbyist.
 http://www.aquaristcourses.org - Distance learning courses for the
 marine aquarist.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread SeViR
Sorry, as I said, normally I have any time... but, I will do an exception :P

http://www.sevir.org/projects/storage/jqmaps/index.html

Comments translated, example translated, and all params now are in english.

Rey Bango escribió:
 Sevir, awesome work my man.

 Could I make a small request? Would it be possible to provide a version 
 of the files with the instructions  parameters translated to English?

 While I can understand what you mean by el parámetro infopanel debe de 
 ser un objeto DOM (the infopanel parameter should be a DOM object), its 
 going to be hard for many other folks to understand this.

 I'd do it but I'm swamped on other things.

 I really appreciate your efforts.

 Thanks,

 Rey

 SeViR wrote:
   

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

   


-- 
Best Regards,
 José Francisco Rives Lirola sevir1ATgmail.com

 SeViR CW · Computer Design
 http://www.sevir.org
  
 Murcia - Spain


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Jquery to set cookies?

2007-02-21 Thread Quiero
Hi is there a way to set cookies with Jquery? Let's say someone  
submits a form, I use jquery to process the form through ajax and  
sends it to php... is there a way to create a cookie with jquery?

Maybe in the ajax call I can send the data to PHP and set it through  
PHP?

Anyways, just wanted to know if I can do it directly with jquery.

thanks everyone,


G.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Setting a cookie through Jquery

2007-02-21 Thread Gaston Garcia
Hi is there a way to set cookies with Jquery? Let's say someone  
submits a form, I use jquery to process the form through ajax and  
sends it to php... is there a way to create a cookie with jquery?

Maybe in the ajax call I can send the data to PHP and set it through  
PHP?

Anyways, just wanted to know if I can do it directly with jquery.

thanks everyone,


G.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jCarousel wrapping

2007-02-21 Thread Jim Nimblett
Does anyone know if there is a way to get jCarousel to wrap without 
'zooming' from the last to the first item? I would rather just have the 
first item slide in just as each of the other items have. That way it's 
more of a seamless loop.

Any ideas or suggestions?


- Jim



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread Rey Bango
You're awesome Sevir! I think you did it just because I knew Spanish! ;o)

Thanks man,

Rey

SeViR wrote:
 Sorry, as I said, normally I have any time... but, I will do an exception :P
 
 http://www.sevir.org/projects/storage/jqmaps/index.html
 
 Comments translated, example translated, and all params now are in english.
 
 Rey Bango escribió:
 Sevir, awesome work my man.

 Could I make a small request? Would it be possible to provide a version 
 of the files with the instructions  parameters translated to English?

 While I can understand what you mean by el parámetro infopanel debe de 
 ser un objeto DOM (the infopanel parameter should be a DOM object), its 
 going to be hard for many other folks to understand this.

 I'd do it but I'm swamped on other things.

 I really appreciate your efforts.

 Thanks,

 Rey

 SeViR wrote:
   

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

   
 
 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Sam Collett
On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

   ---Original Message---
   From: Chris Ovenden [EMAIL PROTECTED]
   Subject: Re: [jQuery] How to get the ID of the parent node?
   Sent: Feb 21 '07 16:04
 
   On 2/21/07, SAM COLLETT [LINK: mailto:[EMAIL PROTECTED]
   [EMAIL PROTECTED] wrote: On 21/02/07, [LINK:
   mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] [LINK:
   mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi,
   
Following up from a question I asked yesterday, I wanted to get the
   closest parent DIV given an arbitrary nested element.  But when I request
   the .id of that element, i repeatedly get an undefined message, even
   though this call, $(this).parent( div.sidebarToDo) yields an object.
   
$('#todoList
   a.deleteTDItem').each(function(index) {
var divId =
   $(this).parent(div.sidebarToDo).id;
alert(divId);   // alwasy gives
   'undefined'
$(this).click = function() { $('#' +
   divId).remove(); };
});
   
This is the HTML in question:
   
div class=sidebarToDo width=100% id=dToDo3
table cellpadding=0 cellspacing=0 border=0 width=100%
tr
tdinput id=cbTdId3 onClick=var textDecor = (this.checked ?
   'line-through' : 'none');
   $('#textId3').css('text-decoration', textDecor);
   type=checkbox id=tdcb3 /td
   
td id=textId3 class=sidebarText style=text-decoration:
   noneStart Work/td
td align=righta class=editTDItem href='#'img
   src=images/edit.gif alt=Edit border=0/a/td
td align=righta class=deleteTDItem
   href=javascript:toggleDiv('dToDo3');img
   src=images/deleteLink.gif alt=Delete border=0/a/td
/tr
/table
/div
   
Thanks, - Dave
 
   You can get the id via attr:
 
   $(this).parent(div.sidebarToDo).attr(id)
 
 
   To spell it out a little more clearly, the API for attributes has changed
   in jQuery 1.0.3+ and shortcuts like .id() no longer work
 
   --
   Chris Ovenden
 
   [LINK: http://thepeer.blogspot.com]  http://thepeer.blogspot.com
   Imagine all the people / Sharing all the world

 Thanks, but I'm still getting undefined even though I can an object for my 
 reference to the DIV.  Any ideas on how to troubleshoot?  here's the JS:

 $('#todoList a.deleteTDItem').each(function(index) {
 var divId = 
 $(this).parent(div.sidebarToDo).attr(id);
 alert($(this).parent(div.sidebarToDo) +  id: + 
 divId);
 $(this).click = function() { $('#' + divId).remove(); 
 };
 });


I would have thought that would have worked.. you could always try:
$(this).parent(div.sidebarToDo)[0].id

I think I have an idea of what you are trying to do - hide the todo
item when delete is clicked, and put a line through the task if the
checkbox is checked (i.e. task completed). In that case, the HTML can
be tidied up a bit (I've removed the id's to improve readability, and
also noticed that you had two defined on the checkbox):


div class=sidebarToDo width=100% id=dToDo3
table cellpadding=0 cellspacing=0 border=0 width=100%
tr
   tdinput type=checkbox name=completed/td
   td class=sidebarTextStart Work/td
   td align=righta class=editTDItem href='#'img
src=images/edit.gif alt=Edit border=0/a/td
   td align=righta class=deleteTDItem href='#'img
src=images/deleteLink.gif alt=Delete border=0/a/td
/tr
/table
/div

And the following JavaScript used:

$('#todoList a.deleteTDItem').click( function() {
alert(clicked);
$(this).parent(div.sidebarToDo).remove();
return false;
});
$('#todoList :checkbox').click( function() {
var textDecor = (this.checked ? 'line-through' : 'none');
$(this).parent().find(td.sidebarText).css('text-decoration', 
textDecor);
});

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Karl Swedberg

Hi Dave,

A couple things:

1. since you're trying to get the ID of an ancestor of a  
class=deleteTDItem, you need to add an s to parent.

This should work:

$('#todoList a.deleteTDItem').each(function(index) {
  var divId = $(this).parents(div.sidebarToDo).attr(id);
  alert($(this).parents(div.sidebarToDo) +  id: + divId);
  $(this).click = function() { $('#' + divId).remove(); };
});

2. Initially you were trying to use the DOM property rather than the  
jQuery attribute method. That's fine. You can do it that way, but you  
first need to convert the jQuery object into a DOM node.

This should work, too:

$('#todoList a.deleteTDItem').each(function(index) {
  var divId = $(this).parents(div.sidebarToDo)[0].id
  alert($(this).parents(div.sidebarToDo)[0].id +  id: + divId);
  $(this).click = function() { $('#' + divId).remove(); };
});



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Feb 21, 2007, at 11:16 AM, [EMAIL PROTECTED]  
[EMAIL PROTECTED] wrote:





 ---Original Message---
 From: Chris Ovenden [EMAIL PROTECTED]
 Subject: Re: [jQuery] How to get the ID of the parent node?
 Sent: Feb 21 '07 16:04

 On 2/21/07, SAM COLLETT [LINK: mailto:[EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote: On 21/02/07, [LINK:
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]  
[LINK:
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]  
wrote:

Hi,

Following up from a question I asked yesterday, I wanted to get the
 closest parent DIV given an arbitrary nested element.  But when I  
request
 the .id of that element, i repeatedly get an undefined  
message, even
 though this call, $(this).parent( div.sidebarToDo) yields an  
object.


$('#todoList

 a.deleteTDItem').each(function(index) {

var divId =

 $(this).parent(div.sidebarToDo).id;

alert(divId);   // alwasy gives

 'undefined'

$(this).click = function() { $('#' +

 divId).remove(); };

});

This is the HTML in question:

div class=sidebarToDo width=100% id=dToDo3
table cellpadding=0 cellspacing=0 border=0 width=100%
tr
tdinput id=cbTdId3 onClick=var textDecor =  
(this.checked ?

 'line-through' : 'none');
 $('#textId3').css('text-decoration', textDecor);
 type=checkbox id=tdcb3 /td


td id=textId3 class=sidebarText style=text-decoration:

 noneStart Work/td

td align=righta class=editTDItem href='#'img

 src=images/edit.gif alt=Edit border=0/a/td

td align=righta class=deleteTDItem

 href=javascript:toggleDiv('dToDo3');img
 src=images/deleteLink.gif alt=Delete border=0/a/td

/tr
/table
/div

Thanks, - Dave


 You can get the id via attr:

 $(this).parent(div.sidebarToDo).attr(id)


 To spell it out a little more clearly, the API for attributes has  
changed

 in jQuery 1.0.3+ and shortcuts like .id() no longer work

 --
 Chris Ovenden

 [LINK: http://thepeer.blogspot.com]  http://thepeer.blogspot.com
 Imagine all the people / Sharing all the world


Thanks, but I'm still getting undefined even though I can an  
object for my reference to the DIV.  Any ideas on how to  
troubleshoot?  here's the JS:


$('#todoList a.deleteTDItem').each(function(index) {
var divId = $(this).parent 
(div.sidebarToDo).attr(id);
alert($(this).parent(div.sidebarToDo) +   
id: + divId);
$(this).click = function() { $('#' +  
divId).remove(); };

});



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Sam Collett
On 21/02/07, Sam Collett [EMAIL PROTECTED] wrote:
 On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
---Original Message---
From: Chris Ovenden [EMAIL PROTECTED]
Subject: Re: [jQuery] How to get the ID of the parent node?
Sent: Feb 21 '07 16:04
  
On 2/21/07, SAM COLLETT [LINK: mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: On 21/02/07, [LINK:
mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] [LINK:
mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi,

 Following up from a question I asked yesterday, I wanted to get the
closest parent DIV given an arbitrary nested element.  But when I request
the .id of that element, i repeatedly get an undefined message, even
though this call, $(this).parent( div.sidebarToDo) yields an object.

 $('#todoList
a.deleteTDItem').each(function(index) {
 var divId =
$(this).parent(div.sidebarToDo).id;
 alert(divId);   // alwasy gives
'undefined'
 $(this).click = function() { $('#' +
divId).remove(); };
 });

 This is the HTML in question:

 div class=sidebarToDo width=100% id=dToDo3
 table cellpadding=0 cellspacing=0 border=0 width=100%
 tr
 tdinput id=cbTdId3 onClick=var textDecor = (this.checked 
   ?
'line-through' : 'none');
$('#textId3').css('text-decoration', textDecor);
type=checkbox id=tdcb3 /td

 td id=textId3 class=sidebarText style=text-decoration:
noneStart Work/td
 td align=righta class=editTDItem href='#'img
src=images/edit.gif alt=Edit border=0/a/td
 td align=righta class=deleteTDItem
href=javascript:toggleDiv('dToDo3');img
src=images/deleteLink.gif alt=Delete border=0/a/td
 /tr
 /table
 /div

 Thanks, - Dave
  
You can get the id via attr:
  
$(this).parent(div.sidebarToDo).attr(id)
  
  
To spell it out a little more clearly, the API for attributes has changed
in jQuery 1.0.3+ and shortcuts like .id() no longer work
  
--
Chris Ovenden
  
[LINK: http://thepeer.blogspot.com]  http://thepeer.blogspot.com
Imagine all the people / Sharing all the world
 
  Thanks, but I'm still getting undefined even though I can an object for 
  my reference to the DIV.  Any ideas on how to troubleshoot?  here's the JS:
 
  $('#todoList a.deleteTDItem').each(function(index) {
  var divId = 
  $(this).parent(div.sidebarToDo).attr(id);
  alert($(this).parent(div.sidebarToDo) +  id: + 
  divId);
  $(this).click = function() { $('#' + 
  divId).remove(); };
  });
 

 I would have thought that would have worked.. you could always try:
 $(this).parent(div.sidebarToDo)[0].id

 I think I have an idea of what you are trying to do - hide the todo
 item when delete is clicked, and put a line through the task if the
 checkbox is checked (i.e. task completed). In that case, the HTML can
 be tidied up a bit (I've removed the id's to improve readability, and
 also noticed that you had two defined on the checkbox):


 div class=sidebarToDo width=100% id=dToDo3
 table cellpadding=0 cellspacing=0 border=0 width=100%
 tr
tdinput type=checkbox name=completed/td
td class=sidebarTextStart Work/td
td align=righta class=editTDItem href='#'img
 src=images/edit.gif alt=Edit border=0/a/td
td align=righta class=deleteTDItem href='#'img
 src=images/deleteLink.gif alt=Delete border=0/a/td
 /tr
 /table
 /div

 And the following JavaScript used:

 $('#todoList a.deleteTDItem').click( function() {
 alert(clicked);
 $(this).parent(div.sidebarToDo).remove();
 return false;
 });

That should be:

$('#todoList a.deleteTDItem').click( function() {
$(this).parents(div.sidebarToDo).remove();
return false;
});

 $('#todoList :checkbox').click( function() {
 var textDecor = (this.checked ? 'line-through' : 'none');
 $(this).parent().find(td.sidebarText).css('text-decoration', 
 textDecor);
 });


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Jquery to set cookies?

2007-02-21 Thread Klaus Hartl
Quiero schrieb:
 Hi is there a way to set cookies with Jquery? Let's say someone  
 submits a form, I use jquery to process the form through ajax and  
 sends it to php... is there a way to create a cookie with jquery?
 
 Maybe in the ajax call I can send the data to PHP and set it through  
 PHP?
 
 Anyways, just wanted to know if I can do it directly with jquery.
 
 thanks everyone,
 
 
 G.


Hello G.,

you can use the cookie plugin... a little explanation here:
http://www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/

More documentation inline and also included in Visual jQuery.

Source here:
http://dev.jquery.com/browser/trunk/plugins/cookie/jquery.cookie.js?format=txt


-- Klaus



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Setting a cookie through Jquery

2007-02-21 Thread Sam Collett
On 21/02/07, Gaston Garcia [EMAIL PROTECTED] wrote:
 Hi is there a way to set cookies with Jquery? Let's say someone
 submits a form, I use jquery to process the form through ajax and
 sends it to php... is there a way to create a cookie with jquery?

 Maybe in the ajax call I can send the data to PHP and set it through
 PHP?

 Anyways, just wanted to know if I can do it directly with jquery.

 thanks everyone,


 G.

There is a cookie plugin (documentation is in the comments):
http://dev.jquery.com/browser/trunk/plugins/cookie/jquery.cookie.js?format=txt

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread SeViR
Andreas Wahlin escribió:

 Strangest thing ... the top example works in safari, but it seems the  
 bottom one does not, i wanna see mr T :D

 andreas

   
Strange yes, I have tested in Konqueror (same render than Safari 
[KHTML]) and works.

Maybe refreshing works? :P

-- 
Best Regards,
 José Francisco Rives Lirola sevir1ATgmail.com

 SeViR CW · Computer Design
 http://www.sevir.org
  
 Murcia - Spain


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Setting a cookie through Jquery

2007-02-21 Thread Ryan Rose
There is a cookie plugin by Klaus
(http://www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/)
 
Or you can get it from svn: (svn://jquery.com/plugins)

Ryan Rose
Lead Developer
Digiwize, Inc.
256 Woodmont Dr.
Coventry, CT 06238
e: [EMAIL PROTECTED]
p: 860.742.8252
http://www.digiwize.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Gaston Garcia
Sent: Wednesday, February 21, 2007 12:07 PM
To: jQuery Discussion.
Subject: [jQuery] Setting a cookie through Jquery

Hi is there a way to set cookies with Jquery? Let's say someone  
submits a form, I use jquery to process the form through ajax and  
sends it to php... is there a way to create a cookie with jquery?

Maybe in the ajax call I can send the data to PHP and set it through  
PHP?

Anyways, just wanted to know if I can do it directly with jquery.

thanks everyone,


G.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread SeViR
Klaus Hartl escribió:
 SeViR schrieb:
   


 Nice! It would be totally cool to get latitude/longitude of the required 
 data from a geo microformat...

 Or even better get the whole location data from a vcard microformat. 
 Here's an example of one:

 div class=vcard
  a class=fn org href=...
  Clara's Coffeeshop/a

  div class=adr
  street: span class=street-addressSchouml;nhauser Allee 
 36/spanbr /
  city: span class=localityBerlin/spanbr /
  state: span class=regionBerlin/spanbr /
  zip: span class=postal-code10425/spanbr /
  country: span class=country-nameGermany/span
  kind of plaze: abbr class=type title=workRestaurant/abbr
  /div

  lat/lon:
  span class=geo
  abbr class=latitude title=52.53754152.53/abbr,
  abbr class=longitude title=13.41250913.41/abbr
  /span
 /div

 The markup could be improved in semantics, it's just an example.


 -- Klaus

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

   
I simply write this format for json communications :P

$.get(myserver.com/myproject/gateway.php?action=getlocations,function(json){
   myplaces = eval((+json+));
   $(mymap).gmaps({

data: myplaces,
infopanel: $(#gmaps_info).get(0),
relativepath: http://myserver.com/myproject/;
});

});

But you can make a simple method to parse geo microformat to this format.

-- 
Best Regards,
 José Francisco Rives Lirola sevir1ATgmail.com

 SeViR CW · Computer Design
 http://www.sevir.org
  
 Murcia - Spain


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread dalvarado
  ---Original Message---
  From: Sam Collett [EMAIL PROTECTED]
  Subject: Re: [jQuery] How to get the ID of the parent node?
  Sent: Feb 21 '07 17:19
  
  On 21/02/07, Sam Collett [EMAIL PROTECTED] wrote:
   On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   
  ---Original Message---
  From: Chris Ovenden [EMAIL PROTECTED]
  Subject: Re: [jQuery] How to get the ID of the parent node?
  Sent: Feb 21 '07 16:04

  On 2/21/07, SAM COLLETT [LINK: mailto:[EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote: On 21/02/07, [LINK:
  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] [LINK:
  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   Hi,
  
   Following up from a question I asked yesterday, I wanted to get the
  closest parent DIV given an arbitrary nested element.  But when I 
 request
  the .id of that element, i repeatedly get an undefined message, 
 even
  though this call, $(this).parent( div.sidebarToDo) yields an 
 object.
  
   $('#todoList
  a.deleteTDItem').each(function(index) {
   var divId =
  $(this).parent(div.sidebarToDo).id;
   alert(divId);   // alwasy gives
  'undefined'
   $(this).click = function() { $('#' +
  divId).remove(); };
   });
  
   This is the HTML in question:
  
   div class=sidebarToDo width=100% id=dToDo3
   table cellpadding=0 cellspacing=0 border=0 width=100%
   tr
   tdinput id=cbTdId3 onClick=var textDecor = 
 (this.checked ?
  'line-through' : 'none');
  $('#textId3').css('text-decoration', textDecor);
  type=checkbox id=tdcb3 /td
  
   td id=textId3 class=sidebarText style=text-decoration:
  noneStart Work/td
   td align=righta class=editTDItem href='#'img
  src=images/edit.gif alt=Edit border=0/a/td
   td align=righta class=deleteTDItem
  href=javascript:toggleDiv('dToDo3');img
  src=images/deleteLink.gif alt=Delete border=0/a/td
   /tr
   /table
   /div
  
   Thanks, - Dave

  You can get the id via attr:

  $(this).parent(div.sidebarToDo).attr(id)


  To spell it out a little more clearly, the API for attributes has 
 changed
  in jQuery 1.0.3+ and shortcuts like .id() no longer work

  --
  Chris Ovenden

  [LINK: http://thepeer.blogspot.com]  http://thepeer.blogspot.com
  Imagine all the people / Sharing all the world
   
Thanks, but I'm still getting undefined even though I can an object 
 for my reference to the DIV.  Any ideas on how to troubleshoot?  here's the 
 JS:
   
$('#todoList a.deleteTDItem').each(function(index) {
var divId = 
 $(this).parent(div.sidebarToDo).attr(id);
alert($(this).parent(div.sidebarToDo) +  id: 
 + divId);
$(this).click = function() { $('#' + 
 divId).remove(); };
});
   
  
   I would have thought that would have worked.. you could always try:
   $(this).parent(div.sidebarToDo)[0].id
  
   I think I have an idea of what you are trying to do - hide the todo
   item when delete is clicked, and put a line through the task if the
   checkbox is checked (i.e. task completed). In that case, the HTML can
   be tidied up a bit (I've removed the id's to improve readability, and
   also noticed that you had two defined on the checkbox):
  
  
   div class=sidebarToDo width=100% id=dToDo3
   table cellpadding=0 cellspacing=0 border=0 width=100%
   tr
  tdinput type=checkbox name=completed/td
  td class=sidebarTextStart Work/td
  td align=righta class=editTDItem href='#'img
   src=images/edit.gif alt=Edit border=0/a/td
  td align=righta class=deleteTDItem href='#'img
   src=images/deleteLink.gif alt=Delete border=0/a/td
   /tr
   /table
   /div
  
   And the following JavaScript used:
  
   $('#todoList a.deleteTDItem').click( function() {
   alert(clicked);
   $(this).parent(div.sidebarToDo).remove();
   return false;
   });
  
  That should be:
  
  $('#todoList a.deleteTDItem').click( function() {
  $(this).parents(div.sidebarToDo).remove();
  return false;
  });
  
   $('#todoList :checkbox').click( function() {
   var textDecor = (this.checked ? 'line-through' : 'none');
   $(this).parent().find(td.sidebarText).css('text-decoration', 
 textDecor);
   });
  
  

You guessed correctly on the bigger picture of what I'm trying to do.  Thanks 
to all for their responses.  The s thing solved the biggest hurdle I was 
trying to get over. - Dave

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Easiest way to add elements on the fly?

2007-02-21 Thread dalvarado
Hi,

If, after the document has fully loaded, I want to append a DIV to the end of 
another DIV with id = todoList, what is the easiest way to do that?  The HTML 
code that I want to append is below ...

div class=sidebarToDo width=100% id=dToDo3
table cellpadding=0 cellspacing=0 border=0 width=100%
tr
   tdinput type=checkbox name=completed/td
   td class=sidebarTextinput type=text size=10 name=newItem 
id=newItem/td
   td align=righta class=editTDItem href='#'img 
src=images/edit.gif alt=Edit border=0/a/td
   td align=righta class=deleteTDItem href='#'img 
src=images/deleteLink.gif alt=Delete border=0/a/td
/tr
/table
/div

Thanks, - Dave

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New jQMaps and jQPanView plugins

2007-02-21 Thread Alex Cook
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SeViR
Subject: [jQuery] New jQMaps and jQPanView plugins

jQMaps plugin: http://www.sevir.org/projects/storage/jqmaps/index.html
Hotspots, maximize info window, custom icons,...

jQPanView: http://www.sevir.org/projects/storage/jpanview/index.html
inspired in Pan View Plugin of Christian Bach (thanks for your sample, 
Christian)

-- 
Best Regards,
 José Francisco Rives Lirola sevir1ATgmail.com

-

First off, thanks for the jQMaps... that will make something I'm starting next 
week easier... how do you handle registering the GMaps api key?

jQPanView looks interesting, but to be honest, I wanted to drag the image 
around.  Perhaps because I'm a Photoshop user my expected experience is 
different, but when I see a setup like the jQPanView window I expect to be able 
to drag the image around and see in the smaller window where I am in relation 
to the whole image.

-ALEX

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Validation plugin 1.0 alpha 2

2007-02-21 Thread Jörn Zaefferer
Lee Hinde schrieb:
 Thanks. I wonder if that may be the same issue as with jQuery core...
 it's testsuite tends to crash Safari, too. Could you click through the
 demos
 (http://jquery.bassistance.de/validate/demo-test/validate-demo.html) and
 see if anything fails there?

 

 Tabbing through and typing gibberish (a specialty  of mine), I had no
 problems with this page in Safari
   
Ok, thanks.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] release: treeview plugin 1.1

2007-02-21 Thread Jörn Zaefferer
abba bryant schrieb:
 On the black and grey demo in ff 1.5 ( only browser I checked ) the
 background art isn;t correct. There is a vertical gap in the art between the
 main nodes.
   
That's intentional to demonstrate that multiple trees can be controlled 
with one treecontrol (two trees with one tree control, black and gray 
image set).

I should have made the gap a bit bigger.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery and Jack Slocum's Ext

2007-02-21 Thread Mark D. Lincoln
Sam,

If you are going to use rich components like those found in Ext, does this
matter?  I am looking at porting large parts of rich client application
functionality to the Web and if a user has scripting disabled, the
application will not work anyway.

Mark D. Lincoln
 
Mark D. Lincoln, Director of Research  Development
Eye On Solutions, LLC
(866) 253-9366x101
www.eyeonsolutions.com
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Sam Collett
Sent: Wednesday, February 21, 2007 5:53 AM
To: jQuery Discussion.
Subject: Re: [jQuery] jQuery and Jack Slocum's Ext

On 20/02/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 John Resig schrieb:
  Hi Everyone -
 
  Today, we're proud to announce that the jQuery Project and Jack
  Slocum's Ext Project, have partnered to integrate the amazingly
  lightweight and powerful jQuery framework with Ext's awesome UI
  library. This collaboration will greatly enhance the capabilities of
  both projects and expand the functionality available to developers
  using the jQuery JavaScript Library and the Ext UI component suite.
 
 For anyone wondering if any jQuery plugins will be replaced by Ext
 components: While that is possible, there are still good reasons to use
 jQuery plugins. Most are very lightweight, easy to customize and extend,
 and most important: unobtrusive. So if you are looking for something to
 use on a normal website, jQuery's plugins are a good choice. If you
 are looking for components for a rich web application, Ext components
 offer a much richer experience.

 I'm looking forward to the first Ext-release with jQuery.

 --
 Jörn Zaefferer

 http://bassistance.de

Can they even be used in a way to degrade nicely? All the examples I
have looked have don't have a fall-back if you disable JavaScript.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Komod API catalog

2007-02-21 Thread Jörn Zaefferer
Alexandre Plennevaux schrieb:
 Hello!
  
 the excellent (and free) Komodo Edit 4 software offers the possibility 
 to extend code completion libraries.
  
 I would like to know if there is an existing jquery API catalog 
 already created? Googling around and looking at activestate website 
 was unfruitful.
Can you provide any information about the format of those? jQuery's 
documentation is already available in an XML-format, together with some 
XSLTs to start with.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] dimensions and IE offset problem

2007-02-21 Thread glenn . w . bach
I am seeing some behavior in IE that I don't understand and that I don't see in 
Firefox.
The offset is being shifted by the margins of the body. If I explicitly set the 
body to
have no margin, it lines up, if I just leave the default, it is shifted. I can 
demonstrate
it with:

html
head
script src=jquery.js/script
script src=dimensions.js/script
script

$(document).ready(function()
{
var offset = {};
var options = {}
$(#bar).offset(options, offset);
$(#movetest).css(offset);
});
/script

style
#movetest{ height: 100px; width: 100px; background: #dd; border: 1px solid 
black;
position: absolute;}
#bar {height: 100px; width: 100px; background: #ee; border: 1px solid 
#dd;}

/style
/head
body

div id=bar
/div

div id=movetest
/div

/body
/html


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Set selected option

2007-02-21 Thread Klaus Hartl
Arne-Kolja Bachstein schrieb:
 Hi,
 
 does anyone know how I can set the selected option in an option list?
 I got several dropdowns to select a date and would like to preselect the
 current date using JS (cannot use a server side language atm). I know
 how to find out the date, but how could I (easily) select the
 corresponding option?
 
 Greets,
 
 Arne
 http://www.arnekolja.com


If for example your option values would look like 02/21/2007 etc. you 
could easily set the selected one with:

$('#date').val('02/22/2007');


select id=date
 ...
 option value=02/21/200702/21/2007/option
 ...
/select



-- Klaus


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions and IE offset problem

2007-02-21 Thread Brandon Aaron
Thanks for the report Glenn. I'm going to do some testing and see what
I can figure out.

--
Brandon Aaron

On 2/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I am seeing some behavior in IE that I don't understand and that I don't see 
 in Firefox.
 The offset is being shifted by the margins of the body. If I explicitly set 
 the body to
 have no margin, it lines up, if I just leave the default, it is shifted. I 
 can demonstrate
 it with:

 html
 head
 script src=jquery.js/script
 script src=dimensions.js/script
 script

 $(document).ready(function()
 {
 var offset = {};
 var options = {}
 $(#bar).offset(options, offset);
 $(#movetest).css(offset);
 });
 /script

 style
 #movetest{ height: 100px; width: 100px; background: #dd; border: 1px 
 solid black;
 position: absolute;}
 #bar {height: 100px; width: 100px; background: #ee; border: 1px solid 
 #dd;}

 /style
 /head
 body

 div id=bar
 /div

 div id=movetest
 /div

 /body
 /html


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Applyng classes to table rows?

2007-02-21 Thread Shane Graber - jQuery
Awesome!  Thanks for the code.  :)

I agree, I should not set the id as id's are unique identifiers.  What
I wanted to do was take the class name and id name from a previous tr
/ and combine them into a new class name like so:

from:   class=row id=blah-one
to: class=row blah-one

I modified your code a bit to achieve this.  Thank you!

Shane

On 2/21/07, Kristinn Sigmundsson [EMAIL PROTECTED] wrote:
 this does it for the classes
 $(table tr:not([EMAIL PROTECTED])).each(function() {
 $(this).attr(class, $(this).prev([EMAIL 
 PROTECTED]).attr(class));
 });
 you might be able to get it down to one row...

 I would not recommend setting the IDs as you want, because the
 standars clearly states that IDs should be UNIQUE!

 //Kristinn

 On 2/21/07, Shane Graber - jQuery [EMAIL PROTECTED] wrote:
  I'm stumped on how to do this with jQuery.  I have a table like this:
 
  table
 
  tr class=row id=blah-one
  td
  /td
  /tr
 
  tr
  td
  /td
  /tr
 
  tr
  td
  /td
  /tr
 
  tr class=row id=blah-two
  td
  /td
  /tr
 
  tr
  td
  /td
  /tr
 
  tr
  td
  /td
  /tr
 
  /table
 
  I need to convert it to:
 
  table
 
  tr class=row id=blah-one
  td
  /td
  /tr
 
  tr class=row blah-one
  td
  /td
  /tr
 
  tr class=row blah-one
  td
  /td
  /tr
 
  tr class=row id=blah-two
  td
  /td
  /tr
 
  tr class=row blah-two
  td
  /td
  /tr
 
  tr class=row blah-two
  td
  /td
  /tr
 
  /table
 
  Basically, I want to look at each table row and if it does not have a
  class, I want to look up the table row by row till it finds a row that
  has a class and id set on it and then take that class and id and apply
  it to that row that does not have its class set.
 
  What I am attempting to do is to write a show/hide script for phpBB so
  that I can dynamically show/hide sections of the forum tree either
  collapsed or expanded.  So far I have been successful at applying a
  class and id to each table row section but not the rows directly
  beneath it yet.
 
  Any help would be appreciated.  Thanks!
 
  Shane
 
  --
  -
  Bender: Amy, you like cute things so I baked you a pony.
  -
 
  http://www.reefs.org - Where reefkeeping begins on the internet.
  http://www.advancedaquarist.com - High quality, free monthly publication for
  the reef keeping hobbyist.
  http://www.aquaristcourses.org - Distance learning courses for the
  marine aquarist.
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



-- 
-
Bender: Amy, you like cute things so I baked you a pony.
-

http://www.reefs.org - Where reefkeeping begins on the internet.
http://www.advancedaquarist.com - High quality, free monthly publication for
the reef keeping hobbyist.
http://www.aquaristcourses.org - Distance learning courses for the
marine aquarist.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Set selected option

2007-02-21 Thread Jörn Zaefferer
Klaus Hartl schrieb:
 Arne-Kolja Bachstein schrieb:
   
 Hi,

 does anyone know how I can set the selected option in an option list?
 I got several dropdowns to select a date and would like to preselect the
 current date using JS (cannot use a server side language atm). I know
 how to find out the date, but how could I (easily) select the
 corresponding option?

 Greets,

 Arne
 http://www.arnekolja.com
 


 If for example your option values would look like 02/21/2007 etc. you 
 could easily set the selected one with:

 $('#date').val('02/22/2007');


 select id=date
  ...
  option value=02/21/200702/21/2007/option
  ...
 /select
   
Or, in case you have seperated selects for each value:

$(#year option:contains(2007)).attr(selected, true);

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] accordion table, instead of an accordion list/menu?

2007-02-21 Thread Rick Faircloth
After trying about everything I could think of to make a 2nd row
slide  hide smoothly, I finally decided to make two tables

The first table contains the visible information, such as event name,
date,  time (this is an experiment for a calendar).

The second table right beneath it contains all the details of the
event.

I applied an id directly to the first table to make it clickable,
and then wrapped the second table in a div.

After doing that I get very smooth show and hide and it looks
no different than it would if it were all in one table.

Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Sam Collett
Sent: Wednesday, February 21, 2007 11:49 AM
To: jQuery Discussion.
Subject: Re: [jQuery] accordion table, instead of an accordion list/menu?

On 21/02/07, Kristinn Sigmundsson [EMAIL PROTECTED] wrote:
 Thing is that even if you have a callback to the slideToggle and set
 the display property to table-row, it still comes out wierd...

 maybe a wrapping div is the best solution?

I have tried wrapping with DIV's, but they don't seem to work for me
(around tr, tbody and wrapping the contents of cells).

I have not come across any method in JavaScript that can slide up/down
a row. I am not sure if Prototype or YUI are capable of this.





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions and IE offset problem

2007-02-21 Thread Brandon Aaron
Hey Glen I've got a fix but it looks as if SVN is down right now. You
can grab the patched version from here[1] but the revision and last
modified tags will not be up-to-date until SVN is back up.

[1]: http://brandon.jquery.com/plugins/dimensions/

--
Brandon Aaron

On 2/21/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Thanks for the report Glenn. I'm going to do some testing and see what
 I can figure out.

 --
 Brandon Aaron

 On 2/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I am seeing some behavior in IE that I don't understand and that I don't 
  see in Firefox.
  The offset is being shifted by the margins of the body. If I explicitly set 
  the body to
  have no margin, it lines up, if I just leave the default, it is shifted. I 
  can demonstrate
  it with:
 
  html
  head
  script src=jquery.js/script
  script src=dimensions.js/script
  script
 
  $(document).ready(function()
  {
  var offset = {};
  var options = {}
  $(#bar).offset(options, offset);
  $(#movetest).css(offset);
  });
  /script
 
  style
  #movetest{ height: 100px; width: 100px; background: #dd; border: 1px 
  solid black;
  position: absolute;}
  #bar {height: 100px; width: 100px; background: #ee; border: 1px solid 
  #dd;}
 
  /style
  /head
  body
 
  div id=bar
  /div
 
  div id=movetest
  /div
 
  /body
  /html
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Applyng classes to table rows?

2007-02-21 Thread rolfsf

sorry - wrong url
http://www.monkeypuzzle.net/testfiles/jquery/Accordion_table/index_2.html

Rolf



rolfsf wrote:
 
 I could be wrong, but it sounds like you're trying to do something very
 similar to what I was working on yesterday - collapsing a set of rows by
 clicking on another row. You can see what I did (I didn't have to add any
 classes to the rows I was collapsing) :
 http://www.monkeypuzzle.net/testfiles/jquery/Accordion_table/ 
 
 Rolf
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Applyng-classes-to-table-rows--tf3267824.html#a9087379
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] blockUI and CPU intensive form processing

2007-02-21 Thread RCS Computers
Basically, I have some CPU intensive form validation that takes about 3 
seconds to complete. I would like blockUI to start before the form 
processing and stop after the form processing. However, the blockUI 
message doesn't ever show up. When I comment out $.unblockUI(), the 
blockUI message shows up AFTER the form processing is completed. Code 
can be found here (57 lines): 


http://sh.nu/p/9301

I can arrange for the full HTML and JS if needed.

--
--
Randy Syring
RCS Computers  Web Solutions
502-644-4776
http://www.rcs-comp.com

Whether, then, you eat or drink or 
whatever you do, do all to the glory

of God. 1 Cor 10:31

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions and IE offset problem

2007-02-21 Thread Glenn Bach

Awesome! Thanks so much. It worked perfectly.

Glenn

On 2/21/07, Brandon Aaron [EMAIL PROTECTED] wrote:


Hey Glen I've got a fix but it looks as if SVN is down right now. You
can grab the patched version from here[1] but the revision and last
modified tags will not be up-to-date until SVN is back up.

[1]: http://brandon.jquery.com/plugins/dimensions/

--
Brandon Aaron

On 2/21/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Thanks for the report Glenn. I'm going to do some testing and see what
 I can figure out.

 --
 Brandon Aaron

 On 2/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I am seeing some behavior in IE that I don't understand and that I
don't see in Firefox.
  The offset is being shifted by the margins of the body. If I
explicitly set the body to
  have no margin, it lines up, if I just leave the default, it is
shifted. I can demonstrate
  it with:
 
  html
  head
  script src=jquery.js/script
  script src=dimensions.js/script
  script
 
  $(document).ready(function()
  {
  var offset = {};
  var options = {}
  $(#bar).offset(options, offset);
  $(#movetest).css(offset);
  });
  /script
 
  style
  #movetest{ height: 100px; width: 100px; background: #dd; border:
1px solid black;
  position: absolute;}
  #bar {height: 100px; width: 100px; background: #ee; border: 1px
solid #dd;}
 
  /style
  /head
  body
 
  div id=bar
  /div
 
  div id=movetest
  /div
 
  /body
  /html
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Applyng classes to table rows?

2007-02-21 Thread Shane Graber - jQuery
Holy smoke, that's almost exactly what I'm trying to do.  The only
thing I'm wanting to do different is to make certain table rows
collapsed by default when the page is first viewed, which is why I am
applying classes to rows.

May I use your code a bit in what I'm working on?

Shane

On 2/21/07, rolfsf [EMAIL PROTECTED] wrote:

 sorry - wrong url
 http://www.monkeypuzzle.net/testfiles/jquery/Accordion_table/index_2.html

 Rolf



 rolfsf wrote:
 
  I could be wrong, but it sounds like you're trying to do something very
  similar to what I was working on yesterday - collapsing a set of rows by
  clicking on another row. You can see what I did (I didn't have to add any
  classes to the rows I was collapsing) :
  http://www.monkeypuzzle.net/testfiles/jquery/Accordion_table/
 
  Rolf
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Applyng-classes-to-table-rows--tf3267824.html#a9087379
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



-- 
-
Bender: Amy, you like cute things so I baked you a pony.
-

http://www.reefs.org - Where reefkeeping begins on the internet.
http://www.advancedaquarist.com - High quality, free monthly publication for
the reef keeping hobbyist.
http://www.aquaristcourses.org - Distance learning courses for the
marine aquarist.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Introduction and Masked Input Plugin

2007-02-21 Thread Jonathan Freeman
Very slick plugin, I will for sure use this on my next application. An
enhancement might be to provide a elegant way of handling non fixed length
numbers, such as currency inputs. So I guess its not so much masking, but
pattern matching.

$(#amount).maskedinput(999,999.99);

Nice job!



--- mrcarxpert [EMAIL PROTECTED] wrote:

 
 So I'm reading that FF, Opera, and Safari support the
 DOMCharacterDataModified event.  I'll try to look into this further to
 produce something to handle pastes.  I've never messed with this event
 before, so I'm just shooting the dark here.  Any direction from the
 crowd?
 
 Josh
 
 
 John Resig wrote:
  
  This is so awesome. I love how the backspace key forces you into the
  correct
  space.
  
  The tricky bit, that I found, is that if you paste in a block of text
  (either correct, or incorrect) or if the browser's autocomplete fills
 in
  an
  incorrect value it doesn't correct it until you hit another key
 inside
  the
  field.
  
  Offhand, I think the best way to solve this is to have a
  setInterval(...)
  check the fields at a specified rate (a couple times a second? or
 whatever
  seems reasonable). This should solve both issues.
  
  Again, this is really really great, I'll be putting this into place,
 like,
  tomorrow.
  
  --John
  
  On 2/13/07, mrcarxpert [EMAIL PROTECTED] wrote:
 
 
  Hello everyone.  I just wanted to take this opportunity to introduce
  myself
  and start giving back to the community.
 
  I've been using jQuery for about 6 months now, and in the process
 I've
  produced a few plugins.  As I clean up the code in these I will be
  releasing
  them.  The first of which is a masked input plugin for
 dates,SSNs,phone
  numbers, etc.
 
  I've made the source code and examples for this project available at
  http://digitalbush.com/projects/masked-input-plugin
  http://digitalbush.com/projects/masked-input-plugin .
 
  I've tested this in Firefox and IE7 with the latest jQuery library. 
 If
  you
  don't mind I'd like to get some feedback on the plugin and how I can
 make
  it
  better.  I'd also like to know if there are any problems on other
  platforms.
 
  Since this is my first plugin I'm sure I'm missing a few things, but
 I
  tried
  to follow the patterns from some other plugins on the jQuery site. 
 One
  thing I know I'm missing is, what's the best way to ensure that this
  masking
  is only applied to a text input?  Right now my code returns
 this.each(
  /*code*/), but I'm guessing I might want to
  this.find([EMAIL PROTECTED]'text']).each(/*code*/).  What is the most
  elegant
  way to do this?
 
  Anyway, I look forward to some feedback.  I'll consider myself
 formally
  introduced. :)
 
  Josh
  --
  View this message in context:
 

http://www.nabble.com/Introduction-and-Masked-Input-Plugin-tf3224850.html#a8957581
  Sent from the JQuery mailing list archive at Nabble.com.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
  
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
  
  
 
 -- 
 View this message in context:

http://www.nabble.com/Introduction-and-Masked-Input-Plugin-tf3224850.html#a8970941
 Sent from the JQuery mailing list archive at Nabble.com.
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 



 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] blockUI and CPU intensive form processing

2007-02-21 Thread Benjamin Sterling

If we can take a look at the test page, that would be helpful.


--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] specifying count for rss feed display with each function

2007-02-21 Thread john smith
Sorry all Im still a newb to jquery. Ive been messing around with using jquery 
for grabbing and displaying rss feed info. A lot less code then using straight 
javascript. what Im not quite clear on is how you grab a specific count from 
doing an .each

For example if I grab a feed with the jquery code below
   
  // count for lines display
var items_count = 10;
  
// feed location
var feed = my.xml';
   
// replace url for link
var u = 'http://www.mypage.html?txtSearch='
   
  $(document).ready(function(){
  $.get(feed, function(xml){
  $(item, xml).each(function(){
  $(this).find(item).each(function(){
  html += ;
  }).end().find(title).each(function(){
  html += a href=' + u + this.text + ' + 
this.text + /abr;
  }); 
  });
$(#feed).html(html).slideDown(slow);
  
  });
});
   
  Using jquery how do I do a for each count like:
  for(var i=0; iitems_count; i++) {

 
-
Access over 1 million songs - Yahoo! Music Unlimited.___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Loop Checkbox Action Question

2007-02-21 Thread Karl Rudd
I stand corrected. :) I did a quick search and couldn't find a
normal string in jQuery core so I assumed it would just default to
hide/show. I now see that normal defaults to using the fade-shrink /
fade-expand animation. Much smoother than the raw hide / show.

Karl Rudd

On 2/22/07, Karl Swedberg [EMAIL PROTECTED] wrote:
 Actually, normal is not default for .show() and .hide() -- even though it
 is the default for all the .slideX() methods and .fadeIn()/.fadeOut().
 Without a parameter, .show() and .hide() act differently -- just applying
 the display=none or display=block/inline to the matched set of elements. For
 them to use the animation, a parameter must be inlcluded.


 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com





 On Feb 21, 2007, at 7:01 AM, Gorkfu wrote:


 Thx, that does clean it up a lot. =)

 As for normal being default for show and hide, I think the default doesn't
 work correctly, or there is no default. Testing it blank in IE7 and
 Firefox2, the checkboxes disapear faster than when set to normal setting.


 Karl Rudd wrote:

 You could combine those two and stick them both in the document HEAD,
 since they both run on ready (see other email for why).

 There's no need to for the filter() function in this case, the
 each() function will do fine. Both iterate over the collection of
 objects, but filter is meant for filtering, as in removing some
 elements.

 Hmmm and there's some other small optimisations. For example factoring
 the hide/show code into it's own function. Can change
 [EMAIL PROTECTED]'checkbox'] to :checkbox.

 Also normal is default for show() and hide().

 If I may suggest the following (untested):

 $(document).ready(function(){

  function visibleCheck() {
  var $this = $(this);
  var ul = $this.siblings(ul);
  if ($this.is(:checked))
  ul.hide();
  else
  ul.show();
  }


  $(:checkbox)
  .click(visibleCheck)
  .each(visibleCheck);
 });

 Karl Rudd



 --
 View this message in context:
 http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9079695
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] blockUI and CPU intensive form processing

2007-02-21 Thread RCS Computers

Thanks for the help.  Here you go:

http://rcs-comp.com/tmp/LaborEffPlanGrid.asp.htm

--
Randy Syring
RCS Computers  Web Solutions
502-644-4776
http://www.rcs-comp.com

Whether, then, you eat or drink or 
whatever you do, do all to the glory

of God. 1 Cor 10:31



Benjamin Sterling wrote:

If we can take a look at the test page, that would be helpful.


--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com http://www.KenzoHosting.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] specifying count for rss feed display with each function

2007-02-21 Thread Karl Swedberg

Hi John,

It works just like a for loop. You can put the i in the anonymous  
function argument for .each(). For example:


$('p').each(function(index) {
  alert('This is paragraph number ' + index);
});

(I used index instead of i because I'm kind of dense, and it  
helps to remind me what it is).



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Feb 21, 2007, at 3:11 PM, john smith wrote:

Sorry all Im still a newb to jquery. Ive been messing around with  
using jquery for grabbing and displaying rss feed info. A lot less  
code then using straight javascript. what Im not quite clear on is  
how you grab a specific count from doing an .each


For example if I grab a feed with the jquery code below

// count for lines display
var items_count = 10;

// feed location
var feed = my.xml';

// replace url for link
var u = 'http://www.mypage.html?txtSearch='

$(document).ready(function(){
  $.get(feed, function(xml){
  $(item, xml).each(function(){
  $(this).find(item).each(function(){
  html += ;
  }).end().find(title).each(function(){
  html += a href=' + u + this.text +  
' + this.text + /abr;

  });
  });
  $(#feed).html(html).slideDown(slow);

  });
});

Using jquery how do I do a for each count like:
for(var i=0; iitems_count; i++) {

Access over 1 million songs - Yahoo! Music Unlimited.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] specifying count for rss feed display with each function

2007-02-21 Thread Kristinn Sigmundsson
you can use the .lt() command before the .each to narrow the results,
so if you want the first 10, you would use something like
$(this).lt(10).each...

//Kristinn

On 2/21/07, john smith [EMAIL PROTECTED] wrote:
 Sorry all Im still a newb to jquery. Ive been messing around with using
 jquery for grabbing and displaying rss feed info. A lot less code then using
 straight javascript. what Im not quite clear on is how you grab a specific
 count from doing an .each

 For example if I grab a feed with the jquery code below

 // count for lines display
 var items_count = 10;

 // feed location
 var feed = my.xml';

 // replace url for link
 var u = 'http://www.mypage.html?txtSearch='

 $(document).ready(function(){
   $.get(feed, function(xml){
   $(item, xml).each(function(){
   $(this).find(item).each(function(){
   html += ;
   }).end().find(title).each(function(){
   html += a href=' + u + this.text + ' +
 this.text + /abr;
   });
   });
   $(#feed).html(html).slideDown(slow);

   });
 });

 Using jquery how do I do a for each count like:
 for(var i=0; iitems_count; i++) {

  
 Access over 1 million songs - Yahoo! Music Unlimited.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Applyng classes to table rows?

2007-02-21 Thread Kristinn Sigmundsson
Ah, I re-read your post again... silly me, but glad you worked it out!

//Kristinn

On 2/21/07, Shane Graber - jQuery [EMAIL PROTECTED] wrote:
 Awesome!  Thanks for the code.  :)

 I agree, I should not set the id as id's are unique identifiers.  What
 I wanted to do was take the class name and id name from a previous tr
 / and combine them into a new class name like so:

 from:   class=row id=blah-one
 to: class=row blah-one

 I modified your code a bit to achieve this.  Thank you!

 Shane

 On 2/21/07, Kristinn Sigmundsson [EMAIL PROTECTED] wrote:
  this does it for the classes
  $(table tr:not([EMAIL PROTECTED])).each(function() {
  $(this).attr(class, $(this).prev([EMAIL 
  PROTECTED]).attr(class));
  });
  you might be able to get it down to one row...
 
  I would not recommend setting the IDs as you want, because the
  standars clearly states that IDs should be UNIQUE!
 
  //Kristinn
 
  On 2/21/07, Shane Graber - jQuery [EMAIL PROTECTED] wrote:
   I'm stumped on how to do this with jQuery.  I have a table like this:
  
   table
  
   tr class=row id=blah-one
   td
   /td
   /tr
  
   tr
   td
   /td
   /tr
  
   tr
   td
   /td
   /tr
  
   tr class=row id=blah-two
   td
   /td
   /tr
  
   tr
   td
   /td
   /tr
  
   tr
   td
   /td
   /tr
  
   /table
  
   I need to convert it to:
  
   table
  
   tr class=row id=blah-one
   td
   /td
   /tr
  
   tr class=row blah-one
   td
   /td
   /tr
  
   tr class=row blah-one
   td
   /td
   /tr
  
   tr class=row id=blah-two
   td
   /td
   /tr
  
   tr class=row blah-two
   td
   /td
   /tr
  
   tr class=row blah-two
   td
   /td
   /tr
  
   /table
  
   Basically, I want to look at each table row and if it does not have a
   class, I want to look up the table row by row till it finds a row that
   has a class and id set on it and then take that class and id and apply
   it to that row that does not have its class set.
  
   What I am attempting to do is to write a show/hide script for phpBB so
   that I can dynamically show/hide sections of the forum tree either
   collapsed or expanded.  So far I have been successful at applying a
   class and id to each table row section but not the rows directly
   beneath it yet.
  
   Any help would be appreciated.  Thanks!
  
   Shane
  
   --
   -
   Bender: Amy, you like cute things so I baked you a pony.
   -
  
   http://www.reefs.org - Where reefkeeping begins on the internet.
   http://www.advancedaquarist.com - High quality, free monthly publication 
   for
   the reef keeping hobbyist.
   http://www.aquaristcourses.org - Distance learning courses for the
   marine aquarist.
  
   ___
   jQuery mailing list
   discuss@jquery.com
   http://jquery.com/discuss/
  
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


 --
 -
 Bender: Amy, you like cute things so I baked you a pony.
 -

 http://www.reefs.org - Where reefkeeping begins on the internet.
 http://www.advancedaquarist.com - High quality, free monthly publication for
 the reef keeping hobbyist.
 http://www.aquaristcourses.org - Distance learning courses for the
 marine aquarist.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] blockUI and CPU intensive form processing

2007-02-21 Thread Mike Alsup
That's a problem.  I see what you're doing, and I understand why
you're doing it, but I don't know of any way to force the browser to
render changes while you've got the current thread pinned.  You really
need async behavior to make this work, but that's not an option for
you in your use case.

I don't have an answer for this.  Anyone have any ideas?

Mike


On 2/21/07, RCS Computers [EMAIL PROTECTED] wrote:

  Basically, I have some CPU intensive form validation that takes about 3
 seconds to complete. I would like blockUI to start before the form
 processing and stop after the form processing. However, the blockUI message
 doesn't ever show up. When I comment out $.unblockUI(), the blockUI message
 shows up AFTER the form processing is completed. Code can be found here (57
 lines):

  http://sh.nu/p/9301

  I can arrange for the full HTML and JS if needed.
  --
 --
 Randy Syring
 RCS Computers  Web Solutions
 502-644-4776
 http://www.rcs-comp.com

 Whether, then, you eat or drink or
 whatever you do, do all to the glory
 of God. 1 Cor 10:31


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Easiest way to add elements on the fly?

2007-02-21 Thread Karl Rudd
$(function(){
  $('#todoList').append( 'div class=sidebarToDo ./div' );
});

http://docs.jquery.com/DOM/Manipulation#append.28_content_.29

You might like to break the HTML into a string per line and join them
via +. For example:

'div class=sidebarToDo width=100% id=dToDo3' +
  'table cellpadding=0 cellspacing=0 border=0 width=100%' +
'tr' +
  etc...

Karl Rudd

On 2/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi,

 If, after the document has fully loaded, I want to append a DIV to the end of 
 another DIV with id = todoList, what is the easiest way to do that?  The 
 HTML code that I want to append is below ...

 div class=sidebarToDo width=100% id=dToDo3
 table cellpadding=0 cellspacing=0 border=0 width=100%
 tr
tdinput type=checkbox name=completed/td
td class=sidebarTextinput type=text size=10 name=newItem 
 id=newItem/td
td align=righta class=editTDItem href='#'img 
 src=images/edit.gif alt=Edit border=0/a/td
td align=righta class=deleteTDItem href='#'img 
 src=images/deleteLink.gif alt=Delete border=0/a/td
 /tr
 /table
 /div

 Thanks, - Dave

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions.js lesson needed

2007-02-21 Thread Brandon Aaron
I believe you are better off letting CSS deal with this. The
performance of the CSS is going to greatly outweigh the JavaScript in
this scenario. You should check out the YUI Grids CSS [1], maybe it
can help you get what you need without too much overhead.

[1]: http://developer.yahoo.com/yui/grids/

--
Brandon Aaron

On 2/21/07, rolfsf [EMAIL PROTECTED] wrote:

 I've got a basic layout that looks like this:

 div id=wrapper
 div id=top/div
 div id=container
   div id=leftPane/div
   div id=rightPane/div
 /div
 /div

 All divs are flexible in height and width depending on the viewport, except
 #leftPane, which has a fixed width.
 I want to set:
 #container width to be equal to viewport width
 #container height to be equal to (viewport height - #top height)
 #leftPane height to be equal to #container height
 #rightPane height to be equal to #container  height
 #leftPane width is equal to 300px;
 #rightPane width to be equal to (#container width - #leftPane width)

 (what I'm trying to get to is to have #leftPane and #rightPane with
 autoscroll, and have #rightPane expand when #leftPane slides left and
 closes, and all divs adjust when the viewport is resized)

 My question: How do go about a) getting these dimensions, b) setting
 dimensions based on a,  c) updating when the viewport is resized. Hints are
 appreciated!


 --
 View this message in context: 
 http://www.nabble.com/dimensions.js-lesson-needed-tf3269066.html#a9088452
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] specifying count for rss feed display with each function

2007-02-21 Thread John W

Ahh I see.  THank you guys this really helps.  Jquery is great.



Karl Swedberg-2 wrote:
 
 Hi John,
 
 It works just like a for loop. You can put the i in the anonymous  
 function argument for .each(). For example:
 
 $('p').each(function(index) {
alert('This is paragraph number ' + index);
 });
 
 (I used index instead of i because I'm kind of dense, and it  
 helps to remind me what it is).
 
 
 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com
 
 
 
 On Feb 21, 2007, at 3:11 PM, john smith wrote:
 
 Sorry all Im still a newb to jquery. Ive been messing around with  
 using jquery for grabbing and displaying rss feed info. A lot less  
 code then using straight javascript. what Im not quite clear on is  
 how you grab a specific count from doing an .each

 For example if I grab a feed with the jquery code below

 // count for lines display
 var items_count = 10;

 // feed location
 var feed = my.xml';

 // replace url for link
 var u = 'http://www.mypage.html?txtSearch='

 $(document).ready(function(){
   $.get(feed, function(xml){
   $(item, xml).each(function(){
   $(this).find(item).each(function(){
   html += ;
   }).end().find(title).each(function(){
   html +=  ' + u + this.text +  
  ' + this.text +  br;
   });
   });
   $(#feed).html(html).slideDown(slow);

   });
 });

 Using jquery how do I do a for each count like:
 for(var i=0; iitems_count; i++) {

 Access over 1 million songs - Yahoo! Music Unlimited.
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/specifying-count-for-rss-feed-display-with-each-function-tf3269015.html#a9089093
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions.js lesson needed

2007-02-21 Thread rolfsf

Thanks Brandon, I'll look through the YUI grids...
While much of it can be done with css, I just don't see how I can get the
autoscroll to function properly unless I've set a fixed height and width,
which I can't think of how to do accurately with css on a flexible height
and width page. But... I'll go dig...



Brandon Aaron wrote:
 
 I believe you are better off letting CSS deal with this. The
 performance of the CSS is going to greatly outweigh the JavaScript in
 this scenario. You should check out the YUI Grids CSS [1], maybe it
 can help you get what you need without too much overhead.
 
 [1]: http://developer.yahoo.com/yui/grids/
 
 --
 Brandon Aaron
 
 On 2/21/07, rolfsf [EMAIL PROTECTED] wrote:

 I've got a basic layout that looks like this:

 div id=wrapper
 div id=top/div
 div id=container
   div id=leftPane/div
   div id=rightPane/div
 /div
 /div

 All divs are flexible in height and width depending on the viewport,
 except
 #leftPane, which has a fixed width.
 I want to set:
 #container width to be equal to viewport width
 #container height to be equal to (viewport height - #top height)
 #leftPane height to be equal to #container height
 #rightPane height to be equal to #container  height
 #leftPane width is equal to 300px;
 #rightPane width to be equal to (#container width - #leftPane width)

 (what I'm trying to get to is to have #leftPane and #rightPane with
 autoscroll, and have #rightPane expand when #leftPane slides left and
 closes, and all divs adjust when the viewport is resized)

 My question: How do go about a) getting these dimensions, b) setting
 dimensions based on a,  c) updating when the viewport is resized. Hints
 are
 appreciated!


 --
 View this message in context:
 http://www.nabble.com/dimensions.js-lesson-needed-tf3269066.html#a9088452
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/dimensions.js-lesson-needed-tf3269066.html#a9089266
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Gmail-style updates

2007-02-21 Thread Daemach

I have a form with which I want to do ajax updates as they type.  If they
stop typing for more than 2 seconds it should update the field.  If the
field blurs before the 2 seconds are up it should update the field.  

I have the ajax side of it worked out, and currently the updates work
properly when the field blurs.  I just need some ideas on how to write the
timer function for the keypresses and how it integrates with the blur
function so the function doesn't get called twice and so there are no memory
leaks from timers set then abandoned because the blur event got to it first.

I'm going for elegance here :)  I could write an outside function that gets
called from both event handlers but that seems cheezy.  There must be a way
to do this with an anonymous function...
-- 
View this message in context: 
http://www.nabble.com/Gmail-style-updates-tf3269331.html#a9089305
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] blockUI and CPU intensive form processing

2007-02-21 Thread RCS Computers

Felix,

Thank you, that did indeed give blockUI enough time to bring up the 
message.  However, it created another problem.


   // when submitting the form, check the values to make sure they are 
numeric

   $(#lePlanForm).submit(function() {
   var retval;

   // Give the user a processing message

   $.blockUI();
  
   return setTimeout(function()

   {
   *retval = checkForm();*
  
   // Undo the processing message

   $.unblockUI();
   }, 10);
  
   return retval;

   });

Notice that I use the return value of checkForm to stop submission of 
the form if there are invalid values.  Using the timeout function seems 
to break this as the form is always being submitted.  How do I get the 
results of retval back from the setTimeout() function?


Thanks.

--
Randy Syring
RCS Computers  Web Solutions
502-644-4776
http://www.rcs-comp.com

Whether, then, you eat or drink or 
whatever you do, do all to the glory

of God. 1 Cor 10:31



Felix Geisendörfer wrote:
I've just looked at this real quick, but would something like this 
maybe work:



|$.blockUI(messageElement); |

setTimeout(function()
{
|retval = checkForm();

||$.unblockUI(); |
|}, 100);
|
|
|It should give blockUI some time to come up before the current thread 
get's pinned.


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


Mike Alsup wrote:

That's a problem.  I see what you're doing, and I understand why
you're doing it, but I don't know of any way to force the browser to
render changes while you've got the current thread pinned.  You really
need async behavior to make this work, but that's not an option for
you in your use case.

I don't have an answer for this.  Anyone have any ideas?

Mike


On 2/21/07, RCS Computers [EMAIL PROTECTED] wrote:
  

 Basically, I have some CPU intensive form validation that takes about 3
seconds to complete. I would like blockUI to start before the form
processing and stop after the form processing. However, the blockUI message
doesn't ever show up. When I comment out $.unblockUI(), the blockUI message
shows up AFTER the form processing is completed. Code can be found here (57
lines):

 http://sh.nu/p/9301

 I can arrange for the full HTML and JS if needed.
 --
--
Randy Syring
RCS Computers  Web Solutions
502-644-4776
http://www.rcs-comp.com

Whether, then, you eat or drink or
whatever you do, do all to the glory
of God. 1 Cor 10:31


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

  



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
  
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Gmail-style updates

2007-02-21 Thread Jörn Zaefferer
Daemach schrieb:
 I have a form with which I want to do ajax updates as they type.  If they
 stop typing for more than 2 seconds it should update the field.  If the
 field blurs before the 2 seconds are up it should update the field.  

 I have the ajax side of it worked out, and currently the updates work
 properly when the field blurs.  I just need some ideas on how to write the
 timer function for the keypresses and how it integrates with the blur
 function so the function doesn't get called twice and so there are no memory
 leaks from timers set then abandoned because the blur event got to it first.

 I'm going for elegance here :)  I could write an outside function that gets
 called from both event handlers but that seems cheezy.  There must be a way
 to do this with an anonymous function...
   
Well, sounds like you need to start a timeout on keyup/press and clear 
that with the blur function, in case it is still running. So you need 
the timeout id and a updated-flag.

Hope that helps.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Text looks choppy in IE7 with Opacity

2007-02-21 Thread Rey Bango
Hey all,

Have a buddy of mine thats having an issue and he asked if I can help.

Here's what he said:

Only problem I have had with jQuery is regarding opacity changes with 
the hide/show effects in IE7 with cleartype in XP. It makes the text 
look choppy after any sort of opacity change on the parent element. Have
tryed to find a solution but with no success.

You can see it here:

http://down2night.com/seattle

Just click on the What's Down? button to show the slider results.

When you swap between FireFox and IE7 and you'll see how the text is choppy.

Any suggestions?

Rey...

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Gmail-style updates

2007-02-21 Thread Daemach

In what context does the timer run?  Each field will have its own timer/ajax
function.  If I have multiple text fields, and people are typing and tabbing
through them quickly the updates still need to happen reliably.

Currently it works like this:

$(document).ready( function() { 
$('[EMAIL PROTECTED]').each( function() {
$(this).blur( function() {
$.AjaxCFC({url: /namechangedtoprotecttheinnocent.cfc, 
method:
updateAttendee, data:
{fid:this.id,field:this.id.split(_)[0],id:this.id.split(_)[1],value:this.value},
success: function(r){$('#'+r).css(backgroundColor,#ddFFdd);}});
$(this).css(backgroundColor,#FF);
});
});
}); 



Jörn Zaefferer wrote:
 
 Daemach schrieb:
 I have a form with which I want to do ajax updates as they type.  If they
 stop typing for more than 2 seconds it should update the field.  If the
 field blurs before the 2 seconds are up it should update the field.  

 I have the ajax side of it worked out, and currently the updates work
 properly when the field blurs.  I just need some ideas on how to write
 the
 timer function for the keypresses and how it integrates with the blur
 function so the function doesn't get called twice and so there are no
 memory
 leaks from timers set then abandoned because the blur event got to it
 first.

 I'm going for elegance here :)  I could write an outside function that
 gets
 called from both event handlers but that seems cheezy.  There must be a
 way
 to do this with an anonymous function...
   
 Well, sounds like you need to start a timeout on keyup/press and clear 
 that with the blur function, in case it is still running. So you need 
 the timeout id and a updated-flag.
 
 Hope that helps.
 
 -- 
 Jörn Zaefferer
 
 http://bassistance.de
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/Gmail-style-updates-tf3269331.html#a9089663
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Big problem with FF2, flickering on all animate effect

2007-02-21 Thread Sanyi

Hi All,

I would like to make a simple animation effect:
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] blockUI and CPU intensive form processing

2007-02-21 Thread Felix Geisendörfer
Well you are now making your form processing somewhat asynchronous, at 
least to the degree that your submit event handler function will return 
before the actual form validation starts. Fixing this should would 
probably look like this:


---
// when submitting the form, check the values to make sure they are numeric
$(#lePlanForm).submit(function() {
   var retval;
   
   // Give the user a processing message

   $.blockUI();
 
   var form = jQuery(form).unbind('submit')[0];

   var callbackClosure = arguments.callee;
 
   return setTimeout(function()

   {
   retval = checkForm();
 
   // Undo the processing message

   $.unblockUI();
  
   if (retval==true)

   {
   form.submit();
   }
   else
   {
   form.bind('submit', callbackClosure);
   }  
   }, 10);
 
   return false;

});
---

The basic idea is to always cancel the form submition per default. Then 
when the now semi-asynchronous checkForm function has finished we decide 
if we still want to submit the form or if validation has failed. Also 
note that you have to unbind the 'submit' event before manually 
submitting the form after validation as this would probably cause an 
endless loop.


Let me know if this works,
-- Felix
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


RCS Computers wrote:

Felix,

Thank you, that did indeed give blockUI enough time to bring up the 
message.  However, it created another problem.


// when submitting the form, check the values to make sure they 
are numeric

$(#lePlanForm).submit(function() {
var retval;
 
// Give the user a processing message

$.blockUI();
   
return setTimeout(function()

{
*retval = checkForm();*
   
// Undo the processing message

$.unblockUI();
}, 10);
   
return retval;

});

Notice that I use the return value of checkForm to stop submission of 
the form if there are invalid values.  Using the timeout function 
seems to break this as the form is always being submitted.  How do I 
get the results of retval back from the setTimeout() function?


Thanks.
--
Randy Syring
RCS Computers  Web Solutions
502-644-4776
http://www.rcs-comp.com

Whether, then, you eat or drink or 
whatever you do, do all to the glory

of God. 1 Cor 10:31
  



Felix Geisendörfer wrote:
I've just looked at this real quick, but would something like this 
maybe work:



|$.blockUI(messageElement); |

setTimeout(function()
{
|retval = checkForm();

||$.unblockUI(); |
|}, 100);
|
|
|It should give blockUI some time to come up before the current 
thread get's pinned.


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


Mike Alsup wrote:

That's a problem.  I see what you're doing, and I understand why
you're doing it, but I don't know of any way to force the browser to
render changes while you've got the current thread pinned.  You really
need async behavior to make this work, but that's not an option for
you in your use case.

I don't have an answer for this.  Anyone have any ideas?

Mike


On 2/21/07, RCS Computers [EMAIL PROTECTED] wrote:
  

 Basically, I have some CPU intensive form validation that takes about 3
seconds to complete. I would like blockUI to start before the form
processing and stop after the form processing. However, the blockUI message
doesn't ever show up. When I comment out $.unblockUI(), the blockUI message
shows up AFTER the form processing is completed. Code can be found here (57
lines):

 http://sh.nu/p/9301

 I can arrange for the full HTML and JS if needed.
 --
--
Randy Syring
RCS Computers  Web Solutions
502-644-4776
http://www.rcs-comp.com

Whether, then, you eat or drink or
whatever you do, do all to the glory
of God. 1 Cor 10:31


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

  



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
  



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
  
___
jQuery mailing list

  1   2   >