[jQuery] Re: Dynamically Filter List

2008-05-05 Thread Wizzud

Depends what you want the list to finally contain (as opposed to being
visible, that is).
Here's an alternative...

$(document).ready(function() {
  var arr = ['C+
+','D','HTML','CSS','C#','PHP','Python','XML','JavaScript','Photoshop']
, alc = []
, list = $('#list');
  $.each(arr, function(i,v){
  list.append('li'+v+'/li');
  alc[i] = v.toLowerCase();
});
  list = $('li', list);
  $('#filter').keyup(function(){
  var v = this.value ? this.value.toLowerCase() : 0;
  list.each(function(i){
  $(this)[v  alc[i].indexOf(v) == -1 ? 'hide' : 'show']();
});
});
});

This doesn't change the list contents, simply hides those elements not
relevant to the value of the filter input box. It also stores the
lowercase options up front, and stores the object of all the list
elements so that the keyup handler doesn't have to go find them each
time it runs.

Mark wrote:
 Hi... so I'm new to jQuery.  I'm using it to dynamically filter a
 list... I'm wondering if this is the best/most efficient method to go
 about doing it:

 html
 head
 titlejquery test/title
 script type=text/javascript src=js/jquery-1.2.3.min.js/
 script
 script type=text/javascript
 $(document).ready(function() {
 var arr = ['C+
 +','D','HTML','CSS','C#','PHP','Python','XML','JavaScript','Photoshop'];
 for(i=0; iarr.length; ++i) {
 $('#list').append('li'+arr[i]+'/li');
 }
 $('[EMAIL PROTECTED]').keyup(function() {
 $('#list').empty();
 for(i=0; iarr.length; ++i) {
 if($
 ('[EMAIL PROTECTED]').attr('value')==undefined||
 arr[i].toLowerCase().indexOf($
 ('[EMAIL PROTECTED]').attr('value').toLowerCase())!=-1)
 {
 $('#list').append('li'+arr[i]
 +'/li');
 }
 }
 });
 });
 /script
 /head
 body

 ul id=list/ul
 input name='filter' id=filter/

 /body
 /html

 See it in action: http://mechaflora.com/programming/filter

 Any suggestions on how I can do this better would be appreciated :) Or
 feel free to use the code for your own purposes if you think it's good.


[jQuery] Re: jQuery Form Plugin file upload problem

2008-05-05 Thread dtc

Hi Mike,

Thank you for your prompt response!  Unfortunately, I'm still in a
development stage and won't be able to provide you a link to a
publicly accessible page.

However if I may, I'd like to provide some code snippets and hopefully
it might help.  First off, the code for the form is derived from a
JSP, with the form tag as follows:

form id=dialog_form action=refer.do method=POST
enctype=multipart/form-data

The form has a number of hidden fields as well as text fields, and
finally the file input field:

input type=file name=dialogDatafile size=40

And a regular form submit button.

The Javascript code initializes the form to ajaxForm once the DOM is
loaded:

function initReferDialog() {
$('#dialog_form').ajaxForm({
beforeSubmit: validateReferDialog,
success: referDialogSuccess
});
}

My validateReferDialog method is as follows:

function validateReferDialog(formData, jqForm, options) {
if (($('#dialogName').val() ==  || $('#dialogEmpName').val() ==
 || $('#dialogEmpEmail').val() == )) {
$('#dialogMessage').empty().append(span class='red-
bold'Please fill in all required fields (*)/spanbr/br/);
return false;
}
return true;
}

I believe I've utilized your APIs correctly.  The one thing I've
noticed, is that when I don't include a file to be uploaded, the
request does get sent to my servlet, however the enctype is
application x-www-form-urlencoded.  I believe in this case it gets
sent via the XMLHttpRequest object.  It's only if I include the file
that it doesn't even reach my servlet.  To test this, I simply have a
print statement as the first line of my servlet.  This statement
should always print out if the servlet is executed.

Is there anything special I have to do with the iframe?  Or is it
possible that since I'm utilizing the form within a SimpleModal dialog
box, that it's causing the issue?

Again Mike, thank you for helping me out with this.  I'm really very
new to jQuery, but I find the library the best I've ever used, and the
fact that there is a thriving community out there willing to
contribute with people such as yourself, makes it all the more better
to use.

-Dave


On May 4, 8:30 pm, Mike Alsup [EMAIL PROTECTED] wrote:
   I'm attempting to use the jQuery Form Plugin on a page that has
   multiple forms.  The particular form I am using to allow the uploading
   of files is the third form on the page.  I'm also using that form
   within a modal dialog box, using the SimpleModal jQuery plugin.  I
   have a Java Servlet handling the form submission.

   I am having a problem when I try to upload a file.  It looks like the
   request never gets to my servlet.  When I fill out the other fields of
   the form out, leaving the upload blank, it's working fine.  However,
   once I attempt to include a file to upload, the servlet never gets
   invoked.

   I understand that the XMLHttpRequest cannot send files over, but that
   the Forms Plugin utilizes an iFrame to do so.  However, it's not
   working in my case.  I've read a blog in which the person is able to
   address this, found here:  
  http://www.ender.com/2008/04/jquery-the-jquery-form-plugin.html.
   I tried his suggestions of including a hidden field in my form, but
   it's still not reaching my servlet.

   Could the problem actually be the fact that I have more than one form
   on the page?  Any help would be greatly appreciated.  Thanks.

 The Form Plugin fully supports multiple forms on a page so that
 shouldn't be causing your problem.  Can you post a link to your page?


[jQuery] weird DOM/JQ error; elements do not get added/animated

2008-05-05 Thread Rene Veerman
I've got bit of a firefox mystery here:

My photo-album component animates when browsing to the next page, see
http://mediabeez.veerman.ws/mediaBeez/ and press the 'next' button (thats
the one on the right) on the photoalbum you view on that homepage.

You have to use firefox to test this properly, IE wont perform one of the
functions in the chain (yet).

If you're using a browser debugger you'll encounter a debugger stop when you
press the next button; just run past it for now.

The bug occurs when you click on one of the images, then use the 'back'
function of your browser to go to the front-page again. There's a debugger
stop (for your convenience) at the start of the code that re-inserts the
'previous page' html into the DOM. I believe that that code works correctly.

Then, when you click the 'next' button, the debugger stop activates but the
code around that stop doesnt do anything.
I was wondering why, and havent been able to figure it out after two days..
Maybe you have a clue that helps ;)

I did notice that firebug's HTML view doesn't show the node (s2) being added
to .mbCollectionContent, but when you view it's childnodes collection in
it's 'watch variable', it IS added.. i don't get it..


[jQuery] Re: jQuery Form Plugin file upload problem

2008-05-05 Thread dtc

Hi Mike,

To hopefully add some more insight into this, I took the form out of
the SimpleModal jQuery plugin and placed it into its own JSP page, and
when I tried to submit the Form, the browser is reporting an error in
line 334 of the jquery.form.js file, stating that:

form.submit is not a function

This happens in both Firefox 2.0 and IE6.

Regards,
Dave

On May 4, 8:30 pm, Mike Alsup [EMAIL PROTECTED] wrote:
   I'm attempting to use the jQuery Form Plugin on a page that has
   multiple forms.  The particular form I am using to allow the uploading
   of files is the third form on the page.  I'm also using that form
   within a modal dialog box, using the SimpleModal jQuery plugin.  I
   have a Java Servlet handling the form submission.

   I am having a problem when I try to upload a file.  It looks like the
   request never gets to my servlet.  When I fill out the other fields of
   the form out, leaving the upload blank, it's working fine.  However,
   once I attempt to include a file to upload, the servlet never gets
   invoked.

   I understand that the XMLHttpRequest cannot send files over, but that
   the Forms Plugin utilizes an iFrame to do so.  However, it's not
   working in my case.  I've read a blog in which the person is able to
   address this, found here:  
  http://www.ender.com/2008/04/jquery-the-jquery-form-plugin.html.
   I tried his suggestions of including a hidden field in my form, but
   it's still not reaching my servlet.

   Could the problem actually be the fact that I have more than one form
   on the page?  Any help would be greatly appreciated.  Thanks.

 The Form Plugin fully supports multiple forms on a page so that
 shouldn't be causing your problem.  Can you post a link to your page?


[jQuery] Re: Need help on jQuery.browser.version

2008-05-05 Thread chrbar

Thanks a lot Mike, I've tried, it works perfectly!

I would like to add FF 1 and IE 5 which are not supported too.
Could you tell me if my code is correct... I think I did an error:

script type=text/javascript
// See http://developer.apple.com/internet/safari/uamatrix.html for
Safari versions
if(( $.browser.safari$.browser.version  523 ) ||
( $.browser.msie   $.browser.version  6 ) || ( $.browser.mozilla
  $.browser.version  2.0.0.6 ))
document.write( 'a href=test.html target=_blanktest/a' );
else
document.write( 'a href=test.html?height=300width=300 title=add
a caption to title attribute / or leave blank class=thickboxtest/
a' );
/script


On 4 mai, 20:48, Michael Geary [EMAIL PROTECTED] wrote:
 Like this?

 // Seehttp://developer.apple.com/internet/safari/uamatrix.htmlfor
 Safari versions

 if( $.browser.safari$.browser.version  523 )
 document.write( 'a href=test.html target=_parenttest/a' );
 else
 document.write( 'a href=test.html?height=300width=300 title=add
 a caption to title attribute / or leave blank class=thickboxtest/a' );

 As an aside, note how the use of single quotes for the strings avoids the
 need of escaping the double quotes inside the strings.

 -Mike

  I saw there were a Browser Detect included with jQuery.

  I would like to use two different code line in my Web page depending
  of the browser version:

  If the browser is Safari and the version is older than 3, the code
  line is:
  a href=test.html target=_parenttest/a
  Else (for all other browsers including Safari 3), the code line is:
  a href=test.html?height=300width=300 title=add a caption to title
  attribute / or leave blank class=thickboxtest/a

  I would like to use ThickBox script in my Web page, but this script
  runs correctly on Safari 2.0.4+ and my Web page has to be compatible
  with older version of Safari too!

  I'm not really a Web Developper... I learn how to!
  Could you help me to write a script which can detect the Safari
  version and apply the good code in the page?

  I've tried the code below, but it doesn't look good!

  SCRIPT language=JavaScript
  !--
  var browserName=navigator.appName;
  var browserVer=parseInt(navigator.appVersion);
  if ((browserName==Safari  browserVer=1) || (browserName==Safari
   browserVer=2))
  {
  document.write(a href=\test.html\ target=\_parent\test/a);
  }
  else
  {
  document.write(a href=\test.html?height=300width=300\ title=\add
  a caption to title attribute / or leave blank\ class=\thickbox
  \test/a);
  }
  //--
  /SCRIPT

  Thanks a lot for your help :)
  Chris


[jQuery] .filter() and .not() approximately worthless - Table issue perhaps?

2008-05-05 Thread {ajh}

My experiences today with .filter() and .not() showed them to be
extremely buggy in my case.  For example, .not(.foo + .foo) would
leave me with an empty set (though nothing should have been matching).

Is this because I was using them to select tr elements? Is there a
known issue with .filter() and tables?

If not, I could post an example if it breaking soon. I came up with a
workaround, but it was annoying.


[jQuery] Re: jQuery Form Plugin file upload problem

2008-05-05 Thread Mike Alsup

  form.submit is not a function

  This happens in both Firefox 2.0 and IE6.


That error is usually the result of having a form element with an id
or name of 'submit'.  That is not a valid name for a form element (at
least not when using JavaScript).

Dave, have you tried removing the plugin from the equation to see if
submitting the form via the browser gets the data to your servlet?
When uploading a file that essentially what is happening.  The form
plugin simply submits the form using form.submit() and redirects the
response to an iframe.

Mike


[jQuery] Re: jQuery Form Plugin file upload problem

2008-05-05 Thread dtc

Mike,

That was it!  Indeed there was a form element with the name submit
and like you said, was causing that error.  Renaming it allowed the
plugin to do its job.

Thank you again!

Best,
Dave

On May 5, 7:03 am, Mike Alsup [EMAIL PROTECTED] wrote:
   form.submit is not a function

   This happens in both Firefox 2.0 and IE6.

 That error is usually the result of having a form element with an id
 or name of 'submit'.  That is not a valid name for a form element (at
 least not when using JavaScript).

 Dave, have you tried removing the plugin from the equation to see if
 submitting the form via the browser gets the data to your servlet?
 When uploading a file that essentially what is happening.  The form
 plugin simply submits the form using form.submit() and redirects the
 response to an iframe.

 Mike


[jQuery] Re: jquery tabs: removing old loaded content from DOM

2008-05-05 Thread Leanan

There are a lot of different tabs plugins but I'm guessing you're
using the jquery UI tabs?  You should try using firefox w/ firebug,
and take a look at the classes the tabs are given when they are
selected / hidden (or read the docs on that plugin as they should have
that info as well).  I don't remember what they are.

Basically however you'd do something like this:

$
(selector_for_all_hidden_tabs).remove([selector_for_what_you_want_to_remove]).

So for example, if your hidden tab class was hidden-tab and you had
a div in there id'd content which contained all your content, I
believe you'd use the following:

$(.hidden-tab).remove(#content);



[jQuery] localscroll plugin

2008-05-05 Thread piro


Hi everyone, I try to explain my problem simply:
how can I avoid that the entire window goes down at the end of the scroll??
I am using the plugin localscroll and I want to avoid the final step that
moves the entire window below.
this happens with the screens 1024/768.
someone could help me?
this is the link http://www.pirolab.it/diego/

Tnx 

Diego
-- 
View this message in context: 
http://www.nabble.com/localscroll-plugin-tp17060646s27240p17060646.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jCarousel Firefox issue

2008-05-05 Thread dramsay

I just added a carousel to http://www.humormegraphics.com. The
carousel looks and works great in Safari and IE. However, using
Firefox there seems to be a weird jump in the easing when you click on
the right arrow.

It's possible that I missed setting a value somewhere, but I'm
stumped.

Any suggestions/tips would be welcome.

Thanks,
Doug


[jQuery] strange behaviour: multiple selectors responding

2008-05-05 Thread bobh

hi,

I'm trying to change the innerHtml of an anchor to loading for the
duration of an ajax load with this code:

$(#contests ul li span a).toggle(
function(){
var url_title = $(this).html();
$(this).ajaxStart(function(){$
(this).html(loading...);}).ajaxStop(function(){$
(this).html(url_title);});
$(.contest-form- + this.name).load(this.href).show();
return false;
},
function(){
$(.contest-form- + this.name).hide(fast);
return false;
}
);

both the ajax load and the text replacing work fine. the problem
however is that all links that have been clicked are getting the
loading innerHtml. in stead of only the one that is clicked on. for
clarification I've put an example page online here: http://allnighters.net/jq/.
try clicking a few different links.

thanks


[jQuery] Re: jCarousel Firefox issue

2008-05-05 Thread Ray Mckoy

dramsay escribió:
 I just added a carousel to http://www.humormegraphics.com. The
 carousel looks and works great in Safari and IE. However, using
 Firefox there seems to be a weird jump in the easing when you click on
 the right arrow.

 It's possible that I missed setting a value somewhere, but I'm
 stumped.

 Any suggestions/tips would be welcome.

 Thanks,
 Doug

   
I have the same issue here: http://xli.net/brm/htm/index.htm
click in the green arrows in the top of the page, just after the word 
IMÁGENES
works great in IE but in firefox you will see a little weird jump.
Somebody can help?


[jQuery] [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-05 Thread Rey Bango


jQuery UI v1.5b3, the jQuery project's UI  effects library, is now 
available for download. While still in beta, the library is feature 
frozen and the features are in excellent shape.


The jQuery UI team is anxious for your feedback so please join them on 
the UI mailing list found here:


http://groups.google.com/group/jquery-ui?hl=en

Any assistance with testing is greatly appreciated as it will help in 
making UI rock-solid out of the gate.


Also check out the new site for the jQuery UI project at 
http://ui.jquery.com/


Rey


[jQuery] Variable for Google Maps API

2008-05-05 Thread RalphM

Hi,

I have a Website with geocoding meta tags like this:

   meta name=ICBM content=50.1678, -97.133185

With help of jQuery I can extract the content like this:

   var title = $(meta[name=ICBM]).attr(content);

This works fine.

But how can I store the variable to this:

  map.setCenter(new GLatLng( variablemust go here ),5);

I tried in vain to get since two days, so I would appreciate any help.

Thank you

RalphM


[jQuery] Re: Can't set type=search attribute to input fields on Safari 3.0

2008-05-05 Thread claudiopro

On May 2, 12:23 am, Cody [EMAIL PROTECTED] wrote:
 I filed a ticket, but it was marked as nofix. Apparently there are
 inconsistencies in changing the type attribute in input fields and
 they aren't meant to have their type attribute changed. So the
 alternative is to simply remove the input field and create a new one
 of the desired type using jQuery (rather than changing just the
 attribute).

 -Cody

So I'd like to know what is the official / canonical / recommended way
to enable search fields in webkit browsers, without breaking standards
compliance.

If jQuery won't support altering the type attribute, I will use
plain old JS to have it done...

--
Claudio Procida
http://www.emeraldion.it


[jQuery] Re: Giving more parameters to the async load function ?

2008-05-05 Thread Jörn Zaefferer

I discussed the idea of jQuery core supporting dynamic data parameters
with Scott recently - we haven't made progress, but it could solve a
lot of issues like this one. Basically you'd replace static values
with functions that return those values, while the treeview plugin
just passes these through to $.ajax, which then evaluates those
functions while serializing the data. I think every plugin that uses
jQuerys ajax methods could leverage that.

Jörn

On Fri, May 2, 2008 at 11:35 PM, jayg [EMAIL PROTECTED] wrote:

  Excellent thought.  I was thinking of having some sort of parameter
  hash to pass in, maybe I can hook that together with this idea.


  On May 2, 11:39 am, markus.staab [EMAIL PROTECTED] wrote:
   Maybe a callback function (given some usefull context parameters..)
   which produces the url could do the trick..
  
   On 2 Mai, 17:24, jayg [EMAIL PROTECTED] wrote:
  
Thanks Jörn,
I will post code here when I get a good solution.  However, I know the
   treeviewis being worked on in the UI project as well, should I be


   looking at something other than treview.asynch to make these changes
to?  Additionally, I was considering adding a 'custom' persist option,
I can provide a patch if you think it would be useful (and assuming it
is done generically enough).  Probably also going to be looking at
adding a 'loading' spinner option, unless it is there and I have just
missed it.
  
On Apr 30, 11:42 am, Jörn Zaefferer [EMAIL PROTECTED] wrote:
  
 jayg schrieb: I need to set up dynamic urls with async trees as well, 
 though I am
  using rails, so I am looking for something more like 'foo/bar/1', but
  same functionality.  The problem I have with the idea to use
  source.php?id=firsttree or something similar is that I don't know
  how many subtrees I may have - this needs to be built dynamically.  
 If
  I misunderstood, and this is intended to be dynamic, a code snippet
  would be greatly helpful.  If not, my thought was in the getJSON
  function of thetreeview.asynch to have _that_ create the url info for
  the newly returned tree.  We already have this.id and could easily
  return the name of the controller and method to call.  Then, at the
  end when we call $(container).treeview({add:child}), we could insert
  the url we created into ts setting.  I may hack on this until I hear
  another idea, but let me know what you think of that approach.
  
 Ideas, especially in the form of code, are very welcome. The basic
 problem, dynamic arguments and different URL formats, applies now to
 bothtreeviewand autocomplete plugins, so solving it properly would
 help a lot.
  
 Jörn



[jQuery] Re: [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-05 Thread Alexandre Plennevaux
congratulations on this super appetizing release. One request though, or
rather, a supplication, no, a prayer: please, oh please, do not change the
jquery logo, or at least, keep the devo hat, it has become such a
sympathetic icon !



On Mon, May 5, 2008 at 4:20 PM, Rey Bango [EMAIL PROTECTED] wrote:


 jQuery UI v1.5b3, the jQuery project's UI  effects library, is now
 available for download. While still in beta, the library is feature frozen
 and the features are in excellent shape.

 The jQuery UI team is anxious for your feedback so please join them on the
 UI mailing list found here:

 http://groups.google.com/group/jquery-ui?hl=en

 Any assistance with testing is greatly appreciated as it will help in
 making UI rock-solid out of the gate.

 Also check out the new site for the jQuery UI project at
 http://ui.jquery.com/

 Rey




-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-05 Thread Andy Matthews

A few tiny bugs I just noticed. 

Slider demo
When the arrow is selected, it displays a dotted selected line.

Accordion
In IE7, the left and right sides show horns. The end of each
button bar is slide up about 20 pixels.

Tabs
The tabs aren't connected to the box. This might be by design, but
it
looks a little off.

Dialog
Error, missing template.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rey Bango
Sent: Monday, May 05, 2008 9:21 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download
plus New Site


jQuery UI v1.5b3, the jQuery project's UI  effects library, is now
available for download. While still in beta, the library is feature frozen
and the features are in excellent shape.

The jQuery UI team is anxious for your feedback so please join them on the
UI mailing list found here:

http://groups.google.com/group/jquery-ui?hl=en

Any assistance with testing is greatly appreciated as it will help in making
UI rock-solid out of the gate.

Also check out the new site for the jQuery UI project at
http://ui.jquery.com/

Rey




[jQuery] Re: Which jQuery book to choose?

2008-05-05 Thread Rey Bango


Hi Lee,

I think you'll be happy with your choice. The reason that I recommend 
both is because the jQuery In Action book is, I believe, updated to 
version v1.2 of jQuery while the Learning jQuery book is using v1.1.2.


Both books offer their own unique bits of info and both are worth having.

Rey..

Lee O wrote:
You don't think both books is overkill? Not to say that you can ever 
learn too much, but i imagine the books are only 85-90% different from 
eachother (in physical ideas and code). They obviously do things 
slightly different, but i imagine a vast majority of the end content 
learned is the same.


Anyway, i went ahead and ordered the Packt one, they seem comparable and 
i've liked those books in the past.


I'll check out jQuery in Action next time im at a book store, thanks!

On Sun, May 4, 2008 at 5:01 PM, Rey Bango [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



Lee,

Both books are great and offer insight into jQuery. I'm actually
reading Learning jQuery for a review for Packt and while going
through it, I've had a couple of Whoa, I didn't know I could do
that! moments.

The jQuery In Action book is equally awesome and a little more
up-to-date but I would recommend having both books on your shelf.

Rey...


Lee Olayvar wrote:

I'm a beginner to javascript, and am in need of learning Ajax 
jQuery
(mainly ajax in jquery, for now) fast.

With that said, out of the two books listed on http://jquery.com/ ,
can anyone give any insight on which i should choose? I'm having a
heck of a time deciding.. heh.




--
Lee Olayvar
http://www.leeolayvar.com


[jQuery] Re: [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-05 Thread Rey Bango


Andy (and everyone), please post feedback on the jQuery UI mailing list 
found here:


http://groups.google.com/group/jquery-ui?hl=en

Thanks,

Rey

Andy Matthews wrote:
A few tiny bugs I just noticed. 


Slider demo
When the arrow is selected, it displays a dotted selected line.

Accordion
In IE7, the left and right sides show horns. The end of each
button bar is slide up about 20 pixels.

Tabs
The tabs aren't connected to the box. This might be by design, but
it
looks a little off.

Dialog
Error, missing template.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rey Bango
Sent: Monday, May 05, 2008 9:21 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download
plus New Site


jQuery UI v1.5b3, the jQuery project's UI  effects library, is now
available for download. While still in beta, the library is feature frozen
and the features are in excellent shape.

The jQuery UI team is anxious for your feedback so please join them on the
UI mailing list found here:

http://groups.google.com/group/jquery-ui?hl=en

Any assistance with testing is greatly appreciated as it will help in making
UI rock-solid out of the gate.

Also check out the new site for the jQuery UI project at
http://ui.jquery.com/

Rey





[jQuery] Re: [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-05 Thread Rey Bango


Hi Alexandre,

The announcement is for jQuery UI, our UI  effects lib, not jQuery. :)

Rey

Alexandre Plennevaux wrote:
congratulations on this super appetizing release. One request though, or 
rather, a supplication, no, a prayer: please, oh please, do not change 
the jquery logo, or at least, keep the devo hat, it has become such a 
sympathetic icon !




On Mon, May 5, 2008 at 4:20 PM, Rey Bango [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



jQuery UI v1.5b3, the jQuery project's UI  effects library, is now
available for download. While still in beta, the library is feature
frozen and the features are in excellent shape.

The jQuery UI team is anxious for your feedback so please join them
on the UI mailing list found here:

http://groups.google.com/group/jquery-ui?hl=en

Any assistance with testing is greatly appreciated as it will help
in making UI rock-solid out of the gate.

Also check out the new site for the jQuery UI project at
http://ui.jquery.com/

Rey




--
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Does click action not apply to TDs?

2008-05-05 Thread [EMAIL PROTECTED]

Hi,

I'm trying to make a TD, with id = content, clickable.
Unfortunately, it doesn't seem to be working -- the action is not
invoked when I click on the TD.  Here's the code:

$('#content').click(function() {
location = 'zipcodelookup.php';
});

and here's the page (the Just Right Pricing section is supposed to
be clickable)

http://justrightlawns.com/pricing.php

Any ideas where I'm going wrong?  Thanks, - Dave


[jQuery] jQuery Offline Documentation

2008-05-05 Thread Eltjon Metko

Hi,
Can someone tell please where can I find updated offline documentation
about jQuery?
I have used VisualJQuery in the past  but it is old now (for v.1.1.2).
and everything else that i have been able to find now is for jQuery
versions below 1.2

Thanks in advance.


[jQuery] [jQuery.forms] problem when uploading files

2008-05-05 Thread warpdesign

 Hi,

I'm trying to submit a form using Ajax and this plugin. The form has
some simple fields, and a field of type file. When I do not select
any file, everything works correctly. Whenever I select a file, the
success function isn't called, plus the POST do not appear in the
console of Firebug. It appears in the net tab though, but POST
fields are *empty* ! The PHP script called also gets nothing in $_POST
nor $_FILES array.

I'm wondering whats wrong. I have correctly set enctype to multipart/
form-data, and I also set MAX_FILE_SIZE to needed size. What could be
wrong ? And is there any way to debug this correctly ?

I'm using this to prepare the form for AJAX:

$('form.details').ajaxForm( {dataType:'json', url: '/index.php?
ajax=1action=edit_kad_imagerand='+Math.random(), success:
kad_return } );

Any help/hint appreciated ! ;)


[jQuery] Re: Cycle Plugin and IE/FF

2008-05-05 Thread Bo

Thanks for the reply, Mike. Everything works now. I did change the CSS
around a bit, but couldn't really figure out what caused the problem.
Great plugin, by the way. It's a shame that the fonts still don't look
good while fading in IE, even with cleartype on.

Cheers, Bo.


[jQuery] Re: Does click action not apply to TDs?

2008-05-05 Thread Donald J Organ IV





try: (remember jQuwery returns an array)


$('#content')[0].click(function() {
		location = 'zipcodelookup.php';
	});


[EMAIL PROTECTED] wrote:

  Hi,

I'm trying to make a TD, with id = "content", clickable.
Unfortunately, it doesn't seem to be working -- the action is not
invoked when I click on the TD.  Here's the code:

	$('#content').click(function() {
		location = 'zipcodelookup.php';
	});

and here's the page (the "Just Right Pricing" section is supposed to
be clickable)

http://justrightlawns.com/pricing.php

Any ideas where I'm going wrong?  Thanks, - Dave
  





[jQuery] Re: Does click action not apply to TDs?

2008-05-05 Thread Richard D. Worth
Don't forget to put your code in a document.ready block. Your code is
running before the element (#content) exists, because the DOM is not yet
ready:

$(document).ready(function() {
  $('#content').click(function() {
location = 'zipcodelookup.php';
  });
});

or, shortcut:

$(function() {
  $('#content').click(function() {
location = 'zipcodelookup.php';
  });
});

- Richard

On Mon, May 5, 2008 at 11:00 AM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:


 Hi,

 I'm trying to make a TD, with id = content, clickable.
 Unfortunately, it doesn't seem to be working -- the action is not
 invoked when I click on the TD.  Here's the code:

$('#content').click(function() {
location = 'zipcodelookup.php';
});

 and here's the page (the Just Right Pricing section is supposed to
 be clickable)

 http://justrightlawns.com/pricing.php

 Any ideas where I'm going wrong?  Thanks, - Dave



[jQuery] Photo Crop proposal

2008-05-05 Thread LTG

Hi, (pls excuse dbl post)

I would like to get feedback on:
   1)  Would a photo crop plug-in be useful to others?
   2)  How doable is it in JQuery?
   3)  Would anyone be interested in a bounty on it? ($$$)

Please see the video of my prototype here:
http://www.hdgreetings.com/view.aspx?name=JQuery%20Crop%20Prototypevideo=http://download.hdgreetings.com/crop.flv

So the basic features are:
  - Photo cropping with aspect ratio locking
  - Face cropping (elliptical crop)
  - Straighten photo with real time adjustments
  - Real-time preview of result photo

This the prototype is a working application, so all the logic is known
and perfected.  I think I know ways to make all the imaging pieces
fast enough for good performance.

Any feedback on these points would be appreciated.

thank you,
Lee


[jQuery] detecting if a user came back to a page using the browser's back button

2008-05-05 Thread cfdvlpr

Has anyone ever wanted to do something like this?  Is it even
possible?  If not, how might you handle something like this when you
don't want re-load a customer's shopping cart after they have already
confirmed everything and checked out?


[jQuery] Re: detecting if a user came back to a page using the browser's back button

2008-05-05 Thread cfdvlpr

Can you please elaborate more on the use of an indicator?


[jQuery] Re: Photo Crop proposal

2008-05-05 Thread Donald J Organ IV





There are already crop plugins that have
been written. Why would anyone pay for something that is based on
opensource.

LTG wrote:

  Hi, (pls excuse dbl post)

I would like to get feedback on:
   1)  Would a photo crop plug-in be useful to others?
   2)  How doable is it in JQuery?
   3)  Would anyone be interested in a bounty on it? ($$$)

Please see the video of my prototype here:
http://www.hdgreetings.com/view.aspx?name=JQuery%20Crop%20Prototypevideo=http://download.hdgreetings.com/crop.flv

So the basic features are:
  - Photo cropping with aspect ratio locking
  - Face cropping (elliptical crop)
  - Straighten photo with real time adjustments
  - Real-time preview of result photo

This the prototype is a working application, so all the logic is known
and perfected.  I think I know ways to make all the imaging pieces
fast enough for good performance.

Any feedback on these points would be appreciated.

thank you,
Lee
  





[jQuery] Re: [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-05 Thread Rey Bango


I announced it here because Paul Bakaus is doing a blog post and will 
announce it on the UI mailing list. Paul is the UI lead and I would 
rather he have the opportunity to announce it.


Since not everyone on here is on the UI list, I want to make sure people 
are aware of it. :)


Rey...

MorningZ wrote:

Kind of funny how you announced it in this group but not in the UI
group  :-)

Great work on the UI project, i just started messing with the
sortables the other day, very easy to implement



[jQuery] Re: localscroll plugin

2008-05-05 Thread Ariel Flesler

$().localScroll({
   ...
  hash:false,
   ...
});

Actually, just remove the line that says: hash:true.
Check the docs for further information, you can do MUCH more than the
example.

--
Ariel Flesler
http://flesler.blogspot.com

On 5 mayo, 09:31, piro [EMAIL PROTECTED] wrote:
 Hi everyone, I try to explain my problem simply:
 how can I avoid that the entire window goes down at the end of the scroll??
 I am using the plugin localscroll and I want to avoid the final step that
 moves the entire window below.
 this happens with the screens 1024/768.
 someone could help me?
 this is the linkhttp://www.pirolab.it/diego/

 Tnx

 Diego
 --
 View this message in 
 context:http://www.nabble.com/localscroll-plugin-tp17060646s27240p17060646.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Photo Crop proposal

2008-05-05 Thread Steve Blades
Why would anyone pay for something that is based on open source?

In support of an open source initiative, especially if that initiative is
addressing an immediate need that you might have.

-- 
Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com
---
The Past is a Memory
The Future a Dream
But Today is a Gift
That's why they call it
The Present


[jQuery] Re: Variable for Google Maps API

2008-05-05 Thread Ken Robinson

On Mon, May 5, 2008 at 12:08 PM, RalphM [EMAIL PROTECTED] wrote:

  Two hours later ;-)

  When I set a variable like this

 var position = new Array(50.1678, -97.133);

  I can do this:

map.setCenter(new GLatLng(position[0], position[1]),8);

  But when I try something like this:


meta name=ICBM content=50.1678, -97.133185

  script

  
   var geopos = $(meta[name=ICBM]).attr(content);
   var position = new Array(geopos);
   map.setCenter(new GLatLng(position[0], position[1]),8);
  
  /script

You need to turn the string into an array. The easiest way to do that
is to use split():

var geopos = $(meta[name=ICBM]).attr(content).split(',');
map.setCenter(new GLatLng(geopos[0], geopos[1]),8);

Ken


[jQuery] [ANNOUNCE] IMPORTANT: jQuery UI v1.5b4 Up. Addresses issues in v1.5b3

2008-05-05 Thread Rey Bango


IMPORTANT UPDATE:

jQuery UI v1.5b4 is now up and addresses two bugs in v1.5b3 released 
earlier. Please re-download http://ui.jquery.com/


Thanks,

Rey


[jQuery] [NEWS] Blog Posting About jQuery UI v1.5b4

2008-05-05 Thread Rey Bango


The jQuery IU team has put up a new blog posting about jQuery UI v1.5b4.

http://jquery.com/blog/2008/05/05/jquery-ui-15b4-featuring-effects-and-a-new-home/

Rey...


[jQuery] Re: Way to designate links as form submitters?

2008-05-05 Thread real

If you're trying to replicate the functionality of a submit button,
then the link would only submit the form it's contained in. A regular
submit button wouldn't submit any form (unless I'm mistaken) if it's
not within the form tags anyway. So why not something like this?

$(document).ready(function(){
$('a.formlink').click(function(){
$(this).parents('form').submit();
return false;
});
});

This way you can have multiple forms on the page if needed.

On May 2, 12:48 pm, Rick Faircloth [EMAIL PROTECTED] wrote:
 Well... the original plan was to use the pagination links
 on the page to submit the form fields.   That way a user
 could change the search options and just continue clicking the
 pagination links instead of submitting the new options.

 However, I believe this might be confusing, so I created a
 Click here link after making option choices to make it clear
 what the user is supposed to do.

 And yes, Karl, there's only one form on the page...

 This solution (it's different than the example submit link I
 tossed out earlier) is working fine:

 $(document).ready(function() {
 $('.submitLink').click(function() {
 $('form').get(0).submit();
 return false;
 });
 });

 With a text link like this:

 pUncheck the boxes above to remove those property types from the listings 
 and click
 a class=submitLink href=cfoutput#listlast(cgi.script_name,
 '/')#?pagenumber=#pagenumber#/cfoutputhere/a./p

 So, up to this point, everything's working well.

 You can see it in action at:http://c21ar.wsm-dev.com/cfm/browse-properties.cfm

 Let me know if you have any trouble with it if you decide to check it out.

 Thanks for all the help!

 Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hj
  Sent: Friday, May 02, 2008 11:45 AM
  To: jQuery (English)
  Subject: [jQuery] Re: Way to designate links as form submitters?

   Anyway to do that?

   Have certain links, say with an id of link,
   to be programmed to submit a form when clicked?

  Why not mark up the links as buttons, or input type=submit elements,
  and then
  just use CSS to style them appropriately?

  --

  hj


[jQuery] Re: hover and fade in fade out problems...

2008-05-05 Thread Aaron

Is it possible that the *** might be behind the image??

I copied that exacty and pasted in the script replaced what I had and
still I don't see any *** that appears on the side of the image.


I am doing this to just learn how to manage the function hover.

my main idea is to have the image that when a mouse is over the image
a window/table will fade in kinda like a tool tip but instead of a tip
it's other photos in the users photo album once the mouse goes off the
image and is not on the table or window then the windows/table would
fade out.

That is my goal but for right now I am trying to play with the hover
function and the fadein fadeout fucntions to master how to manipulate
it.

On May 4, 2:16 pm, Alexandre Plennevaux [EMAIL PROTECTED]
wrote:
 hi Aaron,

 your function braces are missing, it should be:

 $(document).ready(function() {

 $(#image).hover(
      function () {
        $(this).append('span ***/span');},

    function () {
  $(this).find(span:last).remove();});



 });- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Photo Crop proposal

2008-05-05 Thread Donald J Organ IV





Not if it already exists for free.



Steve Blades wrote:
"Why would anyone pay for
something that is based on
open source?"
  
In support of an open source initiative, especially if that initiative
is addressing an immediate need that you might have.
  
-- 
Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
  http://blog.cutterscrossing.com
---
The Past is a Memory
The Future a Dream
But Today is a Gift
That's why they call it
The Present





[jQuery] Re: Photo Crop proposal

2008-05-05 Thread Josh Nathanson
 Not if it already exists for free.

It depends...if the free product is a piece of crap, people might pay for 
something better.

-- Josh




[jQuery] Re: Way to designate links as form submitters?

2008-05-05 Thread Rick Faircloth

Thanks for the feedback, Real...

The solution I worked up below, targeting .get(0) (first form
on the page), works fine because there is only one form.

But your solution would probably work as well for one form,
but have the added benefit of working for multiple forms.

I'll file you solution away for future use!  :o)

Thanks,

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of real
 Sent: Monday, May 05, 2008 1:38 PM
 To: jQuery (English)
 Subject: [jQuery] Re: Way to designate links as form submitters?
 
 
 If you're trying to replicate the functionality of a submit button,
 then the link would only submit the form it's contained in. A regular
 submit button wouldn't submit any form (unless I'm mistaken) if it's
 not within the form tags anyway. So why not something like this?
 
 $(document).ready(function(){
 $('a.formlink').click(function(){
 $(this).parents('form').submit();
 return false;
 });
 });
 
 This way you can have multiple forms on the page if needed.
 
 On May 2, 12:48 pm, Rick Faircloth [EMAIL PROTECTED] wrote:
  Well... the original plan was to use the pagination links
  on the page to submit the form fields.   That way a user
  could change the search options and just continue clicking the
  pagination links instead of submitting the new options.
 
  However, I believe this might be confusing, so I created a
  Click here link after making option choices to make it clear
  what the user is supposed to do.
 
  And yes, Karl, there's only one form on the page...
 
  This solution (it's different than the example submit link I
  tossed out earlier) is working fine:
 
  $(document).ready(function() {
  $('.submitLink').click(function() {
  $('form').get(0).submit();
  return false;
  });
  });
 
  With a text link like this:
 
  pUncheck the boxes above to remove those property types from the listings 
  and click
  a class=submitLink href=cfoutput#listlast(cgi.script_name,
  '/')#?pagenumber=#pagenumber#/cfoutputhere/a./p
 
  So, up to this point, everything's working well.
 
  You can see it in action 
  at:http://c21ar.wsm-dev.com/cfm/browse-properties.cfm
 
  Let me know if you have any trouble with it if you decide to check it out.
 
  Thanks for all the help!
 
  Rick
 
   -Original Message-
   From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hj
   Sent: Friday, May 02, 2008 11:45 AM
   To: jQuery (English)
   Subject: [jQuery] Re: Way to designate links as form submitters?
 
Anyway to do that?
 
Have certain links, say with an id of link,
to be programmed to submit a form when clicked?
 
   Why not mark up the links as buttons, or input type=submit elements,
   and then
   just use CSS to style them appropriately?
 
   --
 
   hj




[jQuery] jdMenu 1.4.1 not accepting settings?

2008-05-05 Thread sprak

Have setup jdMenu 1.4.1 successfully but am having one minor issue.
When
I try to override the disableLinks setting, it doesn't seem to take.
Here is the
snippet of code to create my menus:

$(document).ready( function() { $('ul.jdMenu').jdMenu({disableLinks:
false}); } );

The snippet is placed near the bottom of the page, just a few lines
before the
closing body tag.

Using Firebug, I see that the settings parameter to the jdMenu
constructor is
coming in as undefined.  Not sure why this would be; for now, I've
modified the
jdMenu source to set the setting to false.  However, I would prefer to
leave
the source untouched and have it overridden properly.

Don't have a publically visible page to link to, but I'll provide
whatever snippets, etc.
that might be helpful.  I've checked the other JS libraries in use on
the page, and
I don't see any name conflicts.  Here is a list of the various jquery
libs I am using and
their versions:

jquery:  1.2.3, minified distribution
dimensions:  1.2, minified distribution
positionBy 1.0.7
cluetip:  0.9.6
bgiframe:  2.1.1

The remaining libs are other custom, non-jquery based pieces.

Thanks

- Luis


[jQuery] Re: .filter() and .not() approximately worthless - Table issue perhaps?

2008-05-05 Thread motob

It looks like you want to select all .foo elements that are siblings,
but not the first .foo. You could try something like this $
(.foo).gt(0); This will get all .foo elements, then reduce the
collection by dropping off the first element.

On May 5, 4:50 am, {ajh} [EMAIL PROTECTED] wrote:
 My experiences today with .filter() and .not() showed them to be
 extremely buggy in my case.  For example, .not(.foo + .foo) would
 leave me with an empty set (though nothing should have been matching).

 Is this because I was using them to select tr elements? Is there a
 known issue with .filter() and tables?

 If not, I could post an example if it breaking soon. I came up with a
 workaround, but it was annoying.


[jQuery] Re: click(function(select) help

2008-05-05 Thread motob

elle,

Since you're going to have 8 fieldsets, why don't you have some code
that will automatically close all of them when the change function is
called, then you can use a variable as your jQuery selector so you
don't have to use an IF statement. You could do something like this.

$(.product-type).change(function(){
  var $value = $(this).val(); //this would store 'filters' for example
  $(fieldsets.options).slideUp(slow); //close all fieldsets
  $(fieldsets. + $value).slideDown(slow); //this will then show
the fieldset with 'filters' as a class.
});

This example should take care of all of your select option cases
without using an IF statement. You'll just have to make sure that each
one of your fieldsets has a class value of the respective option
value.

On May 2, 5:09 am, elle [EMAIL PROTECTED] wrote:
 @Dave: when I selected the first product it showed me its options.
 Changing an option didn't do a thing.
 Clicking again on first product, hid its options.

 @motob: I used this instead:
 $(.product-type).change(function(){
 if($(this).val() == filters){
 $('fieldset.filters').slideDown(slow);
 } else {
 $('fieldset.filters').slideUp(slow);
 }
 });

 Because I have about 8 products not only 2. It worked for one so, I
 guess it will work for all 8 if I define it separately for each
 product.

 First of all thank you.
 Second, is there anyway to streamline this code instead of repeating
 it 8 times? or should I just bite the bullet?

 What do you reckon?

 Cheers,
 Elle

 On May 2, 12:35 am, motob [EMAIL PROTECTED] wrote:

  Instead of adding click listeners to the option elements, add a change
  listener to the overall select menu. Once the change event is fired,
  determine which value is choosen, then show/hide the appropriate
  option fieldset. NOTE: You may want to change the values of the option
  elements so that they don't contain spaces. I'm not sure if those
  spaces will cause problems or not.

  $(document).ready(function(){
$(#product-type).change(function(){
  if($(this).val() == product a){
$('fieldset.producta').slideDown(slow);
$('fieldset.productb').slideUp(slow);
  }
  else {
$('fieldset.productb').slideDown(slow);
$('fieldset.producta').slideUp(slow);
  }
});

  });

  The above code is untested, but that is the basic idea of what you
  would need to do.
  On May 1, 4:57 am, Waz and Elle [EMAIL PROTECTED] wrote:

   Hi again,

   I have a form with products select menu. I would like to show and hide
   product specific options as the user selects them. Now, I can show the
   product options but I don't know how to hide them if the user selects
   a different product.

   My HTML is:
    snip...
   select id=product-type name=product-type class=product-type
   option value=select 
   selected=selected-Select-/option
   option value=product a 
   class=productaProduct A/option
   option value=product b 
   class=productbProduct B/option
   /select/p
   fieldset class=producta options ... /fieldset
   fieldset class=productb options ... /fieldset
    snip 

   My code at the moment is:

   $('#orderform').find('.options').hide();
   $('.product-type').find('option.producta').click(function(select) {
   $('fieldset.producta').slideDown(slow);
   });
   $('.product-type').find('option.productb').click(function(select) {
   $('fieldset.productb').slideDown(slow);
   });

   So, if I change the user changes his/her mind between product a to
   product b, the options stay visible, and I'm not sure how to hide them
   again.

   Also, if the user already entered information in the fieldset's
   fields, should I reset them when I hide them?

   Any advice will be great.
   Thanks,
   Elle


[jQuery] jQuery Trac unavailable

2008-05-05 Thread Nick Fletcher

I'm trying to look through the tickets in the jQuery Trac but I'm
faced with the following error:

Trac detected an internal error:

IntegrityError: (1062, Duplicate entry 'bf4f39c0467ab22-0-0' for key
1)

Hope you guys sort this out soon.

Thanks,
Nick Fletcher


[jQuery] Treeview async with animation

2008-05-05 Thread jayg

I am trying to figure out what I am doing wrong here, or where I need
to put an updated hook.  I am using the animate option for the
treeview widget with asynchronous data (lazy load).  When I open a new
node that has to fetch data, it does not animate when opening.
However, once the data has arrived at the browser, subsequent opening
and closing of the node animate properly.  It seems that animation
needs to be deferred until after the data has returned, but as the
load call is in the toggle, I am not sure how to adjust this. Any
thoughts?  Thanks,

-j


[jQuery] Re: Does click action not apply to TDs?

2008-05-05 Thread [EMAIL PROTECTED]

Thanks both for your responses.  As it turns out, problem was with
forgetting to put document.ready code.  - Dave

On May 5, 10:16 am, Richard D. Worth [EMAIL PROTECTED] wrote:
 Don't forget to put your code in a document.ready block. Your code is
 running before the element (#content) exists, because the DOM is not yet
 ready:

 $(document).ready(function() {
   $('#content').click(function() {
     location = 'zipcodelookup.php';
   });

 });

 or, shortcut:

 $(function() {
   $('#content').click(function() {
     location = 'zipcodelookup.php';
   });

 });

 - Richard

 On Mon, May 5, 2008 at 11:00 AM, [EMAIL PROTECTED] 



 [EMAIL PROTECTED] wrote:

  Hi,

  I'm trying to make a TD, with id = content, clickable.
  Unfortunately, it doesn't seem to be working -- the action is not
  invoked when I click on the TD.  Here's the code:

         $('#content').click(function() {
                 location = 'zipcodelookup.php';
         });

  and here's the page (the Just Right Pricing section is supposed to
  be clickable)

 http://justrightlawns.com/pricing.php

  Any ideas where I'm going wrong?  Thanks, - Dave- Hide quoted text -

 - Show quoted text -


[jQuery] SELECTOR MADNESS! How To Grab Lowest Child Node's Text?!

2008-05-05 Thread Joe

Last week I had a question on how to traverse the DOM and find all
elements that had some text (p, a, li, h1, etc.) so I could manipulate
it with Google's translation API.  Well with some help from the
community I was able to accomplish this feat.

http://groups.google.com/group/jquery-en/browse_thread/thread/c63da32785cc9be4/a357018b128506d9#a357018b128506d9

However, I have a bigger problem.  Now, when I grab the all proper
elements:

$a = $(' #container  * ').contents();

And parse thru them to find which ones have text, it does just that
BUT if an unordered list is within a div and that UL has text it will
show up not only with the UL, but within the DIV as well.

$a.each(function()
{ ... translate stuff here ..});

So in iteration one, we find the DIV, and then locate any and ALL text
in the DIV.  Quite a bit for the header navigation.

Example Result for Div:
HOME BUSINESS CONTACT ABOUT

Then the next iteration is the UL, and it finds its text, which is
basically the same as the DIV's text result.

Example Result for UL:
HOME BUSINESS CONTACT ABOUT


Then the next iteration is the LI element, which has the proper text
but,

The next iteration is the A element which is finally the text I
actually want to translate.

Example Result for LI and A:
HOME


So my question is how can I traverse down and grab the last child on
that particular branch of the DOM.  Surely there's a way to check if
current node has or does not have a child, but how with jQuery?

Thanks!

BTW, Ariel Fleisler's recommendation from the previous post appears to
be the best approach, but my pure Javascript mixing with jQuery skills
are not quite up to snuff to hash that out...


[jQuery] Re: SELECTOR MADNESS! How To Grab Lowest Child Node's Text?!

2008-05-05 Thread Joe

Typical.  I may have just answered my own question, but haven't tested
whether it is bulletproof or not:

In the .each loop I have placed the following conditional statement:

if ($(this).children().length  0)
{
alert(This node till has children\n\n + $
(this).children().length)
return;
}
else
{
  ...translate it and replace it..
}


This appears to work, but I did find a snag where a p tag had a link
inside it.  Will have to check for that special case maybe...any other
suggestions?

Joe

www.subprint.com

On May 5, 2:32 pm, Joe [EMAIL PROTECTED] wrote:
 Last week I had a question on how to traverse the DOM and find all
 elements that had some text (p, a, li, h1, etc.) so I could manipulate
 it with Google's translation API.  Well with some help from the
 community I was able to accomplish this feat.

 http://groups.google.com/group/jquery-en/browse_thread/thread/c63da32...

 However, I have a bigger problem.  Now, when I grab the all proper
 elements:

 $a = $(' #container  * ').contents();

 And parse thru them to find which ones have text, it does just that
 BUT if an unordered list is within a div and that UL has text it will
 show up not only with the UL, but within the DIV as well.

 $a.each(function()
 { ... translate stuff here ..});

 So in iteration one, we find the DIV, and then locate any and ALL text
 in the DIV.  Quite a bit for the header navigation.

 Example Result for Div:
 HOME BUSINESS CONTACT ABOUT

 Then the next iteration is the UL, and it finds its text, which is
 basically the same as the DIV's text result.

 Example Result for UL:
 HOME BUSINESS CONTACT ABOUT

 Then the next iteration is the LI element, which has the proper text
 but,

 The next iteration is the A element which is finally the text I
 actually want to translate.

 Example Result for LI and A:
 HOME

 So my question is how can I traverse down and grab the last child on
 that particular branch of the DOM.  Surely there's a way to check if
 current node has or does not have a child, but how with jQuery?

 Thanks!

 BTW, Ariel Fleisler's recommendation from the previous post appears to
 be the best approach, but my pure Javascript mixing with jQuery skills
 are not quite up to snuff to hash that out...


[jQuery] Re: jQuery Trac unavailable

2008-05-05 Thread Richard D. Worth
I'm not sure why, but this error comes up when you're not logged in. It
would be wonderful if you could view this report without logging in, and the
error is beyond cryptic, but that's the current state. Sorry about that.

- Richard

On Mon, May 5, 2008 at 2:41 PM, Nick Fletcher [EMAIL PROTECTED]
wrote:


 I'm trying to look through the tickets in the jQuery Trac but I'm
 faced with the following error:

 Trac detected an internal error:

 IntegrityError: (1062, Duplicate entry 'bf4f39c0467ab22-0-0' for key
 1)

 Hope you guys sort this out soon.

 Thanks,
 Nick Fletcher



[jQuery] Expression/Selector question...

2008-05-05 Thread Dan G. Switzer, II

One thing that I've noticed is that the expr attribute is pretty
inconsistent across methods (such as filter, find, parents, parent, etc.)
The documentation is very vague about what an expression is, other than it
just being a selector. However I would assume a valid expression for one
element would be valid for all elements, but I've noticed that an HTML
element is only a valid expression in the find() method.

For example:

$li = $(li);

// returns the first matches for $li
$(body  ul  li).find($li[0]); 

// this actually errors with a t.substring is not a function error
$(body  ul  li).filter($li[0]);

// I would expect this to only return the element which is the first $li,
// but instead it ignores the expression altogether and returns all parents
$(li[rel=45]).parents($li[0]);

Shouldn't expressions work the same across all methods?

Right now I'm having to use this to find only the explicit parent:

$el.parents().filter(function (){ return this === $parent[0]; });

However, if parents() worked like find() I would be able to do:

$el.parents($parent[0]);

(Before you say Why not just use $parent?, it's because I'm checking to
see if an element is a child of a specific element.)

-Dan



[jQuery] Re: need some help with selecting text nodes

2008-05-05 Thread Joe


$(#tln21').text();

This will return the text associated with id=tln21.

http://docs.jquery.com/Attributes/text

Joe

www.subprint.com

On May 5, 2:34 pm, darren [EMAIL PROTECTED] wrote:
 Hi everybody, new member here.

 I have a project with the following snipped of code:

 =start html=
 div class=line
   div name=tln4 id=tln4 class=ln
 tln
  !
   /divAs I remember, Adam, it was upon
 this fashion
   div name=tln5 id=tln5 class=ln
 tln5/divbequeathed me by will but poor a thousand
   div name=tln6 id=tln6 class=ln
 tln
  !
   /divcrowns, and, as thou say'st,
 charged my brother,
   div name=tln7 id=tln7 class=ln
 tln
  !
   /divon his blessing, to breed me well;
 and
   div name=tln8 id=tln8 class=ln
 tln
  !
   /divthere begins my sadness. My
 brother Jaques he keeps
   div name=tln9 id=tln9 class=ln
 tln
  !
   /divat school, and report speaks
 goldenly of his profit.
   div name=tln10 id=tln10 class=ln
 tln10/divFor my part, he keeps me rustically at home, or, to
 speak
   div name=tln11 id=tln11 class=ln
 tln
  !
   /divmore properly, stays me here at
 home unkept; for call
   div name=tln12 id=tln12 class=ln
 tln
  !
   /divyou that keeping for a gentleman
 of my birth that differs
   div name=tln13 id=tln13 class=ln
 tln
  !
   /divnot from the stalling of an ox?
 His horses are bred
   div name=tln14 id=tln14 class=ln
 tln
  !
   /divbetter, for, besides that they are
 fair with their feeding,
   div name=tln15 id=tln15 class=ln
 tln15/divthey are taught their man�ge, and to that end riders
   div name=tln16 id=tln16 class=ln
 tln
  !
   /divdearly hired; but I, his brother,
 gain nothing under
   div name=tln17 id=tln17 class=ln
 tln
  !
   /divhim but growth, for the which his
 animals on his
   div name=tln18 id=tln18 class=ln
 tln
  !
   /divdunghills are as much bound to him
 as I. Besides this nothing
   div name=tln19 id=tln19 class=ln
 tln
  !
   /divthat he so plentifully gives me,
 the something that
   div name=tln20 id=tln20 class=ln
 tln20/divnature gave me his countenance seems to take from
   div name=tln21 id=tln21 class=ln
 tln
  !
   /divme. He lets me feed with his
 hinds, bars me the
   div name=tln22 id=tln22 class=ln
 tln
  !
   /divplace of a brother, and as much as
 in him lies, mines my
   div name=tln23 id=tln23 class=ln
 tln
  !
   /divgentility with my education. This
 is it, Adam, that
   div name=tln24 id=tln24 class=ln
 tln
  !
   /divgrieves me; and the spirit of my
 father, which I think
   div name=tln25 id=tln25 class=ln
 tln25/divis within me, begins to mutiny against this servitude.
   div name=tln26 id=tln26 class=ln
 tln
  !
   /divI will no longer endure it, though
 yet I know no wise
   div name=tln27 id=tln27 class=ln
 tln
  !
   /divremedy how to avoid it.
   !
/div
 End HTML

 I have a short selection of text and a tln that the text should be
 found near.  I wan to use jquery to find this text node so that i can
 manipulate it.  My trouble is that I dont understand how the DOM
 treats text nodes and element nodes.

 So say for 

[jQuery] Re: jQuery Trac unavailable

2008-05-05 Thread Nick Fletcher

Hi Richard,

On May 5, 1:11 pm, Richard D. Worth [EMAIL PROTECTED] wrote:
 I'm not sure why, but this error comes up when you're not logged in. It
 would be wonderful if you could view this report without logging in, and the
 error is beyond cryptic, but that's the current state. Sorry about that.

 - Richard

I've created an account and I'm logged in and I'm still getting this
error.


[jQuery] Re: Photo Crop proposal

2008-05-05 Thread Donald J Organ IV





Yes I understand that, sorry maybe my
comments were a little harsh and not thought out well.we all have
bad days.



LTG wrote:

  Thank you for the replies, perhaps I didn't clarify:

1)  I can find no crop plugins with this level of features.  If there
is a plug-in that comes close, for example with face cropping, by all
means please provide a link.


2)  Donald in case you haven't noticed, paying people to work on open
source projects is done all the time (usually by larger companies).
In fact it can be a very good thing for the community because more
contributions get made more quickly.

I think the open software movement is about more than just "getting
free stuff".


On May 5, 10:32 am, Donald J Organ IV [EMAIL PROTECTED] wrote:
  
  
Why would anyone pay for something that is based on opensource.

  





[jQuery] newbie struggling with JSON

2008-05-05 Thread Stan McFarland

Hi,  newbie here.   Hoping someone can help.  I'm able to successfully
call $.get and then eval() a URL that returns a JSON object:

$.get(myurl,
function(code)  {  eval(code);  alert(code[0]); });

 But if I try to call $.getJSON on the same URL:

$.getJSON (myurl,
   function(code) { alert(code[0]); });

I always get back:code has no properties

Any suggestions?

Thanks,

Stan McFarland
`


[jQuery] Re: Photo Crop proposal

2008-05-05 Thread motob

Here is a link to the current UI cropper. Maybe you can help
incorporate some additional features.

http://ui.jquery.com/repository/real-world/image-cropper/



On May 5, 4:36 pm, Donald J Organ IV [EMAIL PROTECTED] wrote:
 Yes I understand that, sorry maybe my comments were a little harsh and not 
 thought out well.we all have bad days.
 LTG wrote:Thank you for the replies, perhaps I didn't clarify: 1) I can find 
 no crop plugins with this level of features. If there is a plug-in that comes 
 close, for example with face cropping, by all means please provide a link. 2) 
 Donald in case you haven't noticed, paying people to work on open source 
 projects is done all the time (usually by larger companies). In fact it can 
 be a very good thing for the community because more contributions get made 
 more quickly. I think the open software movement is about more than just 
 getting free stuff. On May 5, 10:32 am, Donald J Organ IV[EMAIL 
 PROTECTED]wrote:Why would anyone pay for something that is based on 
 opensource.


[jQuery] Re: Photo Crop proposal

2008-05-05 Thread Richard D. Worth
And the crop region really should be draggable there. That's a very recent
regression.

- Richard

On Mon, May 5, 2008 at 5:27 PM, motob [EMAIL PROTECTED] wrote:


 Here is a link to the current UI cropper. Maybe you can help
 incorporate some additional features.

 http://ui.jquery.com/repository/real-world/image-cropper/



 On May 5, 4:36 pm, Donald J Organ IV [EMAIL PROTECTED] wrote:
  Yes I understand that, sorry maybe my comments were a little harsh and
 not thought out well.we all have bad days.
  LTG wrote:Thank you for the replies, perhaps I didn't clarify: 1) I can
 find no crop plugins with this level of features. If there is a plug-in that
 comes close, for example with face cropping, by all means please provide a
 link. 2) Donald in case you haven't noticed, paying people to work on open
 source projects is done all the time (usually by larger companies). In fact
 it can be a very good thing for the community because more contributions get
 made more quickly. I think the open software movement is about more than
 just getting free stuff. On May 5, 10:32 am, Donald J Organ IV
 [EMAIL PROTECTED]wrote:Why would anyone pay for something that is
 based on opensource.



[jQuery] Re: strange behaviour: multiple selectors responding

2008-05-05 Thread Wizzud

The problem is the context of 'this' within the ajaxStart() and
ajaxStop() functions.

try this instead...

$(#contests ul li span a).toggle(
function(){
  //store ref to toggling element for use in ajax callbacks...
  var lnk = $(this);
  var url_title = lnk.html();
  lnk.ajaxStart(function(){
  lnk.html(loading...);
}).ajaxStop(function(){
  lnk.html(url_title);
});
  $(.contest-form- + this.name).load(this.href).show();
  return false;
},
function(){
  $(.contest-form- + this.name).hide(fast);
  return false;
}
);


On May 5, 2:26 pm, bobh [EMAIL PROTECTED] wrote:
 hi,

 I'm trying to change the innerHtml of an anchor to loading for the
 duration of an ajax load with this code:

 $(#contests ul li span a).toggle(
 function(){
 var url_title = $(this).html();
 $(this).ajaxStart(function(){$
 (this).html(loading...);}).ajaxStop(function(){$
 (this).html(url_title);});
 $(.contest-form- + this.name).load(this.href).show();
 return false;
 },
 function(){
 $(.contest-form- + this.name).hide(fast);
 return false;
 }
 );

 both the ajax load and the text replacing work fine. the problem
 however is that all links that have been clicked are getting the
 loading innerHtml. in stead of only the one that is clicked on. for
 clarification I've put an example page online here:http://allnighters.net/jq/.
 try clicking a few different links.

 thanks


[jQuery] Re: Photo Crop proposal

2008-05-05 Thread Shawn


Sorry Donald, but your comment suggests you do not really understand 
what Open Source is.


It is more than I can get it for free.  And it is more than I can do 
what I want with it (two very different kinds of free).  It is a mix 
of the two, with a healthy dose of what makes the community better 
view in there.  But nowhere in that (partial) description does it say 
that money cannot change hands.


I would gladly pay someone to take an open source product and make it 
meet my needs - where I am either unable or don't have the time to do so 
myself.  The question isn't about if I can get the product for free. 
It's more about how much effort will it take to implement that free 
product.  And what about support afterwards?  Or if needs change?


There is always a business choice needed whether to do it yourself or 
let someone else do it.  It just so happens that the majority of people 
on this list are developers who can do it themselves.  But a community 
is made up of more than one type of person.  There are business people 
on the list, as well as casual users.  THEY may not want to do it 
themselves, and be willing to pay for something that is based on Open 
Source.


While you may not pay for things you can get for free, don't paint 
everyone with your characteristics.


My Thoughts

Shawn

Donald J Organ IV wrote:
There are already crop plugins that have been written.  Why would anyone 
pay for something that is based on opensource.




[jQuery] Re: need some help with selecting text nodes

2008-05-05 Thread darren

hi Joe, thanks for your comment

If you look closer, you can see that the text is not actually in the
div element.  i basically need to select the text after that node:

div
   div tln=xxx/div
   Some text
   div tln=xxx/div
   some more text
   div tln=xxx3/div
   even more text
/div

So that wouldnt work

On May 5, 2:06 pm, Joe [EMAIL PROTECTED] wrote:
 $(#tln21').text();

 This will return the text associated with id=tln21.

 http://docs.jquery.com/Attributes/text

 Joe

 www.subprint.com

 On May 5, 2:34 pm, darren [EMAIL PROTECTED] wrote:

  Hi everybody, new member here.

  I have a project with the following snipped of code:

  =start html=
  div class=line
div name=tln4 id=tln4 class=ln
  tln
   !
/divAs I remember, Adam, it was upon
  this fashion
div name=tln5 id=tln5 class=ln
  tln5/divbequeathed me by will but poor a thousand
div name=tln6 id=tln6 class=ln
  tln
   !
/divcrowns, and, as thou say'st,
  charged my brother,
div name=tln7 id=tln7 class=ln
  tln
   !
/divon his blessing, to breed me well;
  and
div name=tln8 id=tln8 class=ln
  tln
   !
/divthere begins my sadness. My
  brother Jaques he keeps
div name=tln9 id=tln9 class=ln
  tln
   !
/divat school, and report speaks
  goldenly of his profit.
div name=tln10 id=tln10 class=ln
  tln10/divFor my part, he keeps me rustically at home, or, to
  speak
div name=tln11 id=tln11 class=ln
  tln
   !
/divmore properly, stays me here at
  home unkept; for call
div name=tln12 id=tln12 class=ln
  tln
   !
/divyou that keeping for a gentleman
  of my birth that differs
div name=tln13 id=tln13 class=ln
  tln
   !
/divnot from the stalling of an ox?
  His horses are bred
div name=tln14 id=tln14 class=ln
  tln
   !
/divbetter, for, besides that they are
  fair with their feeding,
div name=tln15 id=tln15 class=ln
  tln15/divthey are taught their man�ge, and to that end riders
div name=tln16 id=tln16 class=ln
  tln
   !
/divdearly hired; but I, his brother,
  gain nothing under
div name=tln17 id=tln17 class=ln
  tln
   !
/divhim but growth, for the which his
  animals on his
div name=tln18 id=tln18 class=ln
  tln
   !
/divdunghills are as much bound to him
  as I. Besides this nothing
div name=tln19 id=tln19 class=ln
  tln
   !
/divthat he so plentifully gives me,
  the something that
div name=tln20 id=tln20 class=ln
  tln20/divnature gave me his countenance seems to take from
div name=tln21 id=tln21 class=ln
  tln
   !
/divme. He lets me feed with his
  hinds, bars me the
div name=tln22 id=tln22 class=ln
  tln
   !
/divplace of a brother, and as much as
  in him lies, mines my
div name=tln23 id=tln23 class=ln
  tln
   !
/divgentility with my education. This
  is it, Adam, that
div name=tln24 id=tln24 class=ln
  tln
   !
/divgrieves me; and the spirit of my
  father, which I think
div name=tln25 id=tln25 class=ln
  tln25/divis within me, begins to mutiny against this servitude.
div name=tln26 id=tln26 class=ln
  tln
   !
/divI will no longer endure it, though
  yet I know no wise
div 

[jQuery] Cycle plugin and Safari 3.1 flickering

2008-05-05 Thread mattv

A few weeks ago, I started to use the Cycle plugin on a site, mostly
with just the 'fade' effect. It worked beautifully.

The site development then stalled until recently as I waited on some
content from my client, and when I returned to the site today, I
noticed that the Cycle fades were now flickering like crazy in Safari.
In between those two moments in time, I didn't change any code, but I
believe that I upgraded my Safari browser to 3.1 on my Mac.

As a troubleshooting step, I upgraded from jQuery 1.2.1 to 1.2.3 and
upgraded to the most recent version of the Cycle plugin, but
experienced no improvement.

When I went to the Cycle plugin site to get the most recent version, I
discovered that several of the demo animations on the site also
flicker in Safari. So it seems like it's not a question of my
implementation of the code.

Anyone else experience this? Is there something that I can do on my
end to fix this, or is it a bug that needs to be sorted out between
jQuery and WebKit?

Any assistance you can offer would be greatly appreciated.


[jQuery] superfish pathclass and joomla

2008-05-05 Thread yourmanstan

first, thanks for superfish... it seems to be the best solution for
search friendly drop down menus!


working on integrating superfish with a joomla website.  here's the
situation.

three level menu structure, organized very much like:
http://users.tpg.com.au/j_birch/plugins/superfish/all-horizontal-example/

however, joomla automatically assigns 'active' class to the top level
menu list item as well as the current list item.  this means the
second level requires a mouse hover to be seen.

since the CMS is generating the list, it would be easier to customize
superfish.js than change the cms

what i would like is for all children of an 'active' item to be
shown.  i tried this tweaking pathClass : 'active',
pathClass : 'active ul',
pathClass : 'active ul li',
pathClass : 'active li',

but, none of those worked.

i also tried tinkering with superfish.js
o.$path = $('li.'+o.pathClass,this).each(function(){
$(this).addClass(o.hoverClass+' '+bcClass)

.filter(hasUl()).removeClass(o.pathClass);
});

something like this:
$('li.'+o.pathClass+' ul li',this)

again, didn't work.  this code is a bit condensed and i'm not sure
what to do to get it working this way i'd like.  any ideas?

THANKS!


[jQuery] location of pop-up ajax response

2008-05-05 Thread pedalpete

Hi All,

I am building a site with a bunch of forms which i retrieve via ajax.
I am trying to do something similar to what google does with maps
where when the user clicks on a specific point, the form displays
relative to the users position, AND most importantly the position
relative to the rest of the screen, so that the returned form does not
cause the user to scroll.

For instance, if the user clicks close to the left of the screen, then
the form will show up to the right. But if they click close to the
right of the screen, then the form would show up to the left.

I currently am just taking the users click location and then appending
some css, but I am hoping their is a nice way to do this. such as
finding the % left and saying 'if % left  50 then x, else...

Below is what I have so far, but I'm pretty sure I'm not on track with
this. Any ideas would be great.

[code]
$(.add).click(function(event) {
var posTop = event.pageY;
var posLeft = event.pageX;
var formID = #addForm;
var id=this.id;
$(formID).css({ position: 'absolute', top: posTop, left: 
posLeft });
$(formID).fadeIn(slow).html(loading);
$.ajax({
url: add.php,
data: cid=+cid,
success: function(response){
$(formID).html(response);

$('.date-pick').datePicker({clickInput:true});
cancelForm(formID);
}
});
});
[/code]


[jQuery] Re: Cycle plugin and Safari 3.1 flickering

2008-05-05 Thread Mike Alsup

  When I went to the Cycle plugin site to get the most recent version, I
  discovered that several of the demo animations on the site also
  flicker in Safari. So it seems like it's not a question of my
  implementation of the code.


Which animations do you seeing flickering?  I'm not seeing any
problems on Safari 3.1.1 (Windows or Mac).


[jQuery] Re: need some help with selecting text nodes

2008-05-05 Thread Glen Lipka
$(#tln21 div).text();

Like that?  By the way, firebug is very helpful to test our selectors and
see what they come up with.
Hmm, it would be nice to have a tutorial on how to do this.  I can try and
whip one up.

Glen

On Mon, May 5, 2008 at 2:47 PM, darren [EMAIL PROTECTED] wrote:


 hi Joe, thanks for your comment

 If you look closer, you can see that the text is not actually in the
 div element.  i basically need to select the text after that node:

 div
   div tln=xxx/div
   Some text
   div tln=xxx/div
   some more text
   div tln=xxx3/div
   even more text
 /div

 So that wouldnt work

 On May 5, 2:06 pm, Joe [EMAIL PROTECTED] wrote:
  $(#tln21').text();
 
  This will return the text associated with id=tln21.
 
  http://docs.jquery.com/Attributes/text
 
  Joe
 
  www.subprint.com
 
  On May 5, 2:34 pm, darren [EMAIL PROTECTED] wrote:
 
   Hi everybody, new member here.
 
   I have a project with the following snipped of code:
 
   =start html=
   div class=line
 div name=tln4 id=tln4 class=ln
   tln
!
 /divAs I remember, Adam, it was upon
   this fashion
 div name=tln5 id=tln5 class=ln
   tln5/divbequeathed me by will but poor a thousand
 div name=tln6 id=tln6 class=ln
   tln
!
 /divcrowns, and, as thou say'st,
   charged my brother,
 div name=tln7 id=tln7 class=ln
   tln
!
 /divon his blessing, to breed me well;
   and
 div name=tln8 id=tln8 class=ln
   tln
!
 /divthere begins my sadness. My
   brother Jaques he keeps
 div name=tln9 id=tln9 class=ln
   tln
!
 /divat school, and report speaks
   goldenly of his profit.
 div name=tln10 id=tln10 class=ln
   tln10/divFor my part, he keeps me rustically at home, or, to
   speak
 div name=tln11 id=tln11 class=ln
   tln
!
 /divmore properly, stays me here at
   home unkept; for call
 div name=tln12 id=tln12 class=ln
   tln
!
 /divyou that keeping for a gentleman
   of my birth that differs
 div name=tln13 id=tln13 class=ln
   tln
!
 /divnot from the stalling of an ox?
   His horses are bred
 div name=tln14 id=tln14 class=ln
   tln
!
 /divbetter, for, besides that they are
   fair with their feeding,
 div name=tln15 id=tln15 class=ln
   tln15/divthey are taught their man�ge, and to that end riders
 div name=tln16 id=tln16 class=ln
   tln
!
 /divdearly hired; but I, his brother,
   gain nothing under
 div name=tln17 id=tln17 class=ln
   tln
!
 /divhim but growth, for the which his
   animals on his
 div name=tln18 id=tln18 class=ln
   tln
!
 /divdunghills are as much bound to him
   as I. Besides this nothing
 div name=tln19 id=tln19 class=ln
   tln
!
 /divthat he so plentifully gives me,
   the something that
 div name=tln20 id=tln20 class=ln
   tln20/divnature gave me his countenance seems to take from
 div name=tln21 id=tln21 class=ln
   tln
!
 /divme. He lets me feed with his
   hinds, bars me the
 div name=tln22 id=tln22 class=ln
   tln
!
 /divplace of a brother, and as much as
   in him lies, mines my
 div name=tln23 id=tln23 class=ln
   tln
!
 /divgentility with my education. This
   is it, Adam, that
 div name=tln24 id=tln24 class=ln
   tln
!
 /divgrieves me; and the spirit of my
 

[jQuery] Re: newbie struggling with JSON

2008-05-05 Thread Josh Nathanson


Stan,

I'd suggest using Firefox with the Firebug extension, and doing a 
console.log(code) in your callback.  This will give you better information 
than is provided by using the alert method.


-- Josh

- Original Message - 
From: Stan McFarland [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Monday, May 05, 2008 2:07 PM
Subject: [jQuery] newbie struggling with JSON




Hi,  newbie here.   Hoping someone can help.  I'm able to successfully
call $.get and then eval() a URL that returns a JSON object:

$.get(myurl,
   function(code)  {  eval(code);  alert(code[0]); });

But if I try to call $.getJSON on the same URL:

$.getJSON (myurl,
  function(code) { alert(code[0]); });

I always get back:code has no properties

Any suggestions?

Thanks,

Stan McFarland
` 




[jQuery] Re: Photo Crop proposal

2008-05-05 Thread Donald Organ

Yes as I stated in the email previous to this i am sorry for the harsh, 
not very well thought out comments(everyone has a bad day).  I fully 
understand Open Source.  And yes sometimes a little bit of money does 
provoke that little bit of innovation needed for an Open Source project 
to take that great leap.

So I retract my earlier comments as they were not thought out and do not 
fully express my views as an Open Source Developer.

Thanks,

Donald Organ




Shawn wrote:

 Sorry Donald, but your comment suggests you do not really understand 
 what Open Source is.

 It is more than I can get it for free.  And it is more than I can 
 do what I want with it (two very different kinds of free).  It is a 
 mix of the two, with a healthy dose of what makes the community 
 better view in there.  But nowhere in that (partial) description does 
 it say that money cannot change hands.

 I would gladly pay someone to take an open source product and make it 
 meet my needs - where I am either unable or don't have the time to do 
 so myself.  The question isn't about if I can get the product for 
 free. It's more about how much effort will it take to implement that 
 free product.  And what about support afterwards?  Or if needs change?

 There is always a business choice needed whether to do it yourself or 
 let someone else do it.  It just so happens that the majority of 
 people on this list are developers who can do it themselves.  But a 
 community is made up of more than one type of person.  There are 
 business people on the list, as well as casual users.  THEY may not 
 want to do it themselves, and be willing to pay for something that 
 is based on Open Source.

 While you may not pay for things you can get for free, don't paint 
 everyone with your characteristics.

 My Thoughts

 Shawn

 Donald J Organ IV wrote:
 There are already crop plugins that have been written.  Why would 
 anyone pay for something that is based on opensource.




[jQuery] superfish - vertical menu, be able to drop left or right

2008-05-05 Thread nateb

Hello - i am trying to use superfish and jQuery to make my dropdown
menus.

I have added each li in the dropdown have its own class,
subMenuAnchor. This allows us to position the next menu to the right
of the previous dropdown.

Now, we want to be able to drop left or right, so on the ones I want
to drop left, I added another class in css, subMenuAnchorLeft.

This drops the menu in the correct spot, but it does not use the
animation for showing the dropdown from superfish.js

Any ideas?

Thanks!


[jQuery] TableSorter + Filtering + Ajax

2008-05-05 Thread patrick davey

Hi,

I am using the tablesorter pluging http://tablesorter.com/ and it
works fine for smallish tables.  However, I need to page through large
result sets (and filter them) - so I am going to use AJAX to
repopulate the table once the options have been selected.

Now, if through filtering / whetever - less than 100 rows are
returned, then I want tablesorter to just sort the table (without
having to make an AJAX call)

To do this I want to edit the tablesorter plugin to call a function
which returns true/false depending on how many records there are to
sort.

So my question (there is one!) is how do I do that with tablesorter.
I have tried using 'sortStart' and returning false but no joy.  I can
edit the source of course - but if there is a simple way I'd love to
know it.

Better still, does anyone have an example of doing filteringsorting
paging of large datasets using  JSON/AJAX and Jquery? :)

Thanks,
Patrick


[jQuery] Need help with easy fix for image gallery

2008-05-05 Thread Jason

Extremely new to jQuery so I am sure this is an easy fix for some of
you advanced players out there.  Thanks in advance.

Creating a photo gallery and want the currently displayed image to
fade away before the new image fades in...this is the code I have thus
far.

$(#imageSelect li a).click(function(){
var imagePath = $(this).attr(href);
$(#mainImg img).animate({opacity: hide}, 500).attr({ src:
imagePath }).animate({opacity: show}, 500);
return false;
});

The main issue is that the new image is grabbed and displayed before
the hide animation can complete, so you see it right away, then it
fades away...and then reappears a half second later.  Any suggestions?


[jQuery] Re: Need help with easy fix for image gallery

2008-05-05 Thread Mike Alsup

  Extremely new to jQuery so I am sure this is an easy fix for some of
  you advanced players out there.  Thanks in advance.

  Creating a photo gallery and want the currently displayed image to
  fade away before the new image fades in...this is the code I have thus
  far.

  $(#imageSelect li a).click(function(){
 var imagePath = $(this).attr(href);
 $(#mainImg img).animate({opacity: hide}, 500).attr({ src:
  imagePath }).animate({opacity: show}, 500);
 return false;
  });

  The main issue is that the new image is grabbed and displayed before
  the hide animation can complete, so you see it right away, then it
  fades away...and then reappears a half second later.  Any suggestions?


The key is the delay the fadeIn until the fadeOut has completed.  You
do that by using a callback method.  Note that I switched from animate
to fadeIn/Out for simplicity:

$(#imageSelect li a).click(function() {
var imagePath = $(this).attr(href);
// pass callback to fadeOut
$(#mainImg img).fadeOut(500, function() {
$(this).attr('src', imagePath).fadeIn(500);
});
return false;
});


[jQuery] Re: Superfish Menu Fade-out

2008-05-05 Thread Reuben

Hi folks

I've been trying to get this little puppy working in IE7 but to no
success (no surprises - I'm no javascript expert).  I'm wondering if
anyone would be up for helping us out on it, paid work?  In short, it
works fine at this URL: http://mga.id.au/test/ in Firefox but IE7
balks...

Thanks!

On Apr 21, 2:43 pm, Reuben [EMAIL PROTECTED] wrote:
 Thanks both,

 This is great - I've implemented it here (I'm just the coder on this
 project):http://mga.id.au/test/where it works really nicely although
 not in IE7.  I checked out the demo on IE7 and didn't have similar
 problems so I'm sure I just need to have a go at debugging it.  So far
 so awesome though - thanks!

 (I was away for a couple days hence late reply :o) )

 On Apr 18, 3:38 pm, Joel Birch [EMAIL PROTECTED] wrote:

  Thanks Stan,

  I have created a test page which includes a link to a zip file
  containing all the related files incase anyone wants to experiment
  further. I found only one or two things that I had to correct from the
  code on the page you linked to above - the one I can remember offhand
  (might be the only one) is that you had onBeforeShow called in
  hideSuperfishUl when it should be onHide.

  If you get chance, please have a look at my test pages as I have
  briefly discussed the results of my quick experimentation with your
  patch. It would be awesome to iron the bugs out of this functionality.
  Thanks again Stan.

  Link to my test page:http://tinyurl.com/5zhno9

  Joel Birch.


[jQuery] Re: php mysql

2008-05-05 Thread John

I have the same question. I have over 20k rows of data in mysql, and
the idea is for there to be an update button beside each row. I don't
see any examples of how to interact with the database here -- in php
it's $sql = ...; in ruby/rails it's Thing.new[...], but what's up
with jquery? I don't think an explanation would be voodoo - it'd be a
lifesaver. I already understand the old ways - school me on the
jquery.
Thanks
John



 This is a pretty big question. What you need to do is learn how to do
 it with regular HTTP interaction with the backend. Once you understand
 that you'll be able to adapt it to Ajax. A firm grounding in HTTP
 makes XHR pretty straightforward.

 Doing this right is not simple. You should probably read up on REST
 and understand which parts should GET and which parts should POST (or
 really even PUT/DELETE but that's often unused due to bad support and
 general lack of understanding).

 The take away point is that if you don't know how to do every part
 with regular forms and backend interaction already, doing it in Ajax
 will seem like insurmountable voodoo.




[jQuery] suggestions for a hover zoom on text...

2008-05-05 Thread gr00vy0ne

I'm trying to come up with a technique for expanding text when you
hover over it. I built a real quick and dirty demo to help explain the
affect I'm trying to achieve:

http://imlocking.com/projects/zoom_text.html

So, in the list of times, I'd like to make them pop when you hover
over. Of course, it would be easy to change the style of the element
directly but then the list would move which I'm trying to avoid.

What I'm doing now is creating a hidden positionable container that
moves to the correct location and shows a copy of the hovered element
(with a different style applied). It works but I've noticed on an
actual page with other content, the performance can get horrendous.
Safari is blazing fast. Both Firefox and IE can both go up to 100% CPU
usage.

All the code (HTML/CSS/JS) is inline. So, please take a look and let
me know if there's a better more efficient way to do this. Any
suggestions, tips, comments, etc. are welcome.

Another alternative we've tried is putting hidden spans in the page
that show up on hover (requires little-to-no scripting) but it ends up
marking the markup unnecessarily large.

Many thanks,
victor




[jQuery] Re: need some help with selecting text nodes

2008-05-05 Thread darren

oh and yes, firebug is a Godsend. It is the most useful tool in my
programming environment, by a long shot. I strongly recommend people
learn all of its features like the debugger and the profiler.

On May 5, 4:23 pm, Glen Lipka [EMAIL PROTECTED] wrote:
 $(#tln21 div).text();

 Like that?  By the way, firebug is very helpful to test our selectors and
 see what they come up with.
 Hmm, it would be nice to have a tutorial on how to do this.  I can try and
 whip one up.

 Glen

 On Mon, May 5, 2008 at 2:47 PM, darren [EMAIL PROTECTED] wrote:

  hi Joe, thanks for your comment

  If you look closer, you can see that the text is not actually in the
  div element.  i basically need to select the text after that node:

  div
div tln=xxx/div
Some text
div tln=xxx/div
some more text
div tln=xxx3/div
even more text
  /div

  So that wouldnt work

  On May 5, 2:06 pm, Joe [EMAIL PROTECTED] wrote:
   $(#tln21').text();

   This will return the text associated with id=tln21.

  http://docs.jquery.com/Attributes/text

   Joe

  www.subprint.com

   On May 5, 2:34 pm, darren [EMAIL PROTECTED] wrote:

Hi everybody, new member here.

I have a project with the following snipped of code:

=start html=
div class=line
  div name=tln4 id=tln4 class=ln
tln
 !
  /divAs I remember, Adam, it was upon
this fashion
  div name=tln5 id=tln5 class=ln
tln5/divbequeathed me by will but poor a thousand
  div name=tln6 id=tln6 class=ln
tln
 !
  /divcrowns, and, as thou say'st,
charged my brother,
  div name=tln7 id=tln7 class=ln
tln
 !
  /divon his blessing, to breed me well;
and
  div name=tln8 id=tln8 class=ln
tln
 !
  /divthere begins my sadness. My
brother Jaques he keeps
  div name=tln9 id=tln9 class=ln
tln
 !
  /divat school, and report speaks
goldenly of his profit.
  div name=tln10 id=tln10 class=ln
tln10/divFor my part, he keeps me rustically at home, or, to
speak
  div name=tln11 id=tln11 class=ln
tln
 !
  /divmore properly, stays me here at
home unkept; for call
  div name=tln12 id=tln12 class=ln
tln
 !
  /divyou that keeping for a gentleman
of my birth that differs
  div name=tln13 id=tln13 class=ln
tln
 !
  /divnot from the stalling of an ox?
His horses are bred
  div name=tln14 id=tln14 class=ln
tln
 !
  /divbetter, for, besides that they are
fair with their feeding,
  div name=tln15 id=tln15 class=ln
tln15/divthey are taught their man�ge, and to that end riders
  div name=tln16 id=tln16 class=ln
tln
 !
  /divdearly hired; but I, his brother,
gain nothing under
  div name=tln17 id=tln17 class=ln
tln
 !
  /divhim but growth, for the which his
animals on his
  div name=tln18 id=tln18 class=ln
tln
 !
  /divdunghills are as much bound to him
as I. Besides this nothing
  div name=tln19 id=tln19 class=ln
tln
 !
  /divthat he so plentifully gives me,
the something that
  div name=tln20 id=tln20 class=ln
tln20/divnature gave me his countenance seems to take from
  div name=tln21 id=tln21 class=ln
tln
 !
  /divme. He lets me feed with his
hinds, bars me the
  div name=tln22 id=tln22 class=ln
tln
 !
  /divplace of a brother, and as much as
in him lies, mines my
  

[jQuery] Re: Need help with easy fix for image gallery

2008-05-05 Thread Jason

Rock on, thanks a bunch Mike.  I thought it had something to do with
the callback but I didn't fully understand how to use it; starting to
get the big picture. :-)

Thanks again.

On May 5, 7:53 pm, Mike Alsup [EMAIL PROTECTED] wrote:
   Extremely new to jQuery so I am sure this is an easy fix for some of
   you advanced players out there.  Thanks in advance.

   Creating a photo gallery and want the currently displayed image to
   fade away before the new image fades in...this is the code I have thus
   far.

   $(#imageSelect li a).click(function(){
  var imagePath = $(this).attr(href);
  $(#mainImg img).animate({opacity: hide}, 500).attr({ src:
   imagePath }).animate({opacity: show}, 500);
  return false;
   });

   The main issue is that the new image is grabbed and displayed before
   the hide animation can complete, so you see it right away, then it
   fades away...and then reappears a half second later.  Any suggestions?

 The key is the delay the fadeIn until the fadeOut has completed.  You
 do that by using a callback method.  Note that I switched from animate
 to fadeIn/Out for simplicity:

 $(#imageSelect li a).click(function() {
 var imagePath = $(this).attr(href);
 // pass callback to fadeOut
 $(#mainImg img).fadeOut(500, function() {
 $(this).attr('src', imagePath).fadeIn(500);
 });
 return false;

 });


[jQuery] Re: need some help with selecting text nodes

2008-05-05 Thread darren

hi glen, thanks for replying.

That still wouldn't work. With that you are looking for the text
inside div elements which are descendants of of the id'd element.
What i want to select are certain text elements of the id'd element.
I figured something out, but this is surprisinlgy difficult:

div id=21
div
text node
div
text node
...
/div

I had to use .contains() and [nodeType=3] to pick text nodes.  not
pretty.

On May 5, 4:23 pm, Glen Lipka [EMAIL PROTECTED] wrote:
 $(#tln21 div).text();

 Like that?  By the way, firebug is very helpful to test our selectors and
 see what they come up with.
 Hmm, it would be nice to have a tutorial on how to do this.  I can try and
 whip one up.

 Glen

 On Mon, May 5, 2008 at 2:47 PM, darren [EMAIL PROTECTED] wrote:

  hi Joe, thanks for your comment

  If you look closer, you can see that the text is not actually in the
  div element.  i basically need to select the text after that node:

  div
div tln=xxx/div
Some text
div tln=xxx/div
some more text
div tln=xxx3/div
even more text
  /div

  So that wouldnt work

  On May 5, 2:06 pm, Joe [EMAIL PROTECTED] wrote:
   $(#tln21').text();

   This will return the text associated with id=tln21.

  http://docs.jquery.com/Attributes/text

   Joe

  www.subprint.com

   On May 5, 2:34 pm, darren [EMAIL PROTECTED] wrote:

Hi everybody, new member here.

I have a project with the following snipped of code:

=start html=
div class=line
  div name=tln4 id=tln4 class=ln
tln
 !
  /divAs I remember, Adam, it was upon
this fashion
  div name=tln5 id=tln5 class=ln
tln5/divbequeathed me by will but poor a thousand
  div name=tln6 id=tln6 class=ln
tln
 !
  /divcrowns, and, as thou say'st,
charged my brother,
  div name=tln7 id=tln7 class=ln
tln
 !
  /divon his blessing, to breed me well;
and
  div name=tln8 id=tln8 class=ln
tln
 !
  /divthere begins my sadness. My
brother Jaques he keeps
  div name=tln9 id=tln9 class=ln
tln
 !
  /divat school, and report speaks
goldenly of his profit.
  div name=tln10 id=tln10 class=ln
tln10/divFor my part, he keeps me rustically at home, or, to
speak
  div name=tln11 id=tln11 class=ln
tln
 !
  /divmore properly, stays me here at
home unkept; for call
  div name=tln12 id=tln12 class=ln
tln
 !
  /divyou that keeping for a gentleman
of my birth that differs
  div name=tln13 id=tln13 class=ln
tln
 !
  /divnot from the stalling of an ox?
His horses are bred
  div name=tln14 id=tln14 class=ln
tln
 !
  /divbetter, for, besides that they are
fair with their feeding,
  div name=tln15 id=tln15 class=ln
tln15/divthey are taught their man�ge, and to that end riders
  div name=tln16 id=tln16 class=ln
tln
 !
  /divdearly hired; but I, his brother,
gain nothing under
  div name=tln17 id=tln17 class=ln
tln
 !
  /divhim but growth, for the which his
animals on his
  div name=tln18 id=tln18 class=ln
tln
 !
  /divdunghills are as much bound to him
as I. Besides this nothing
  div name=tln19 id=tln19 class=ln
tln
 !
  /divthat he so plentifully gives me,
the something that
  div name=tln20 id=tln20 class=ln
tln20/divnature gave me his countenance seems to take from
  div name=tln21 id=tln21 class=ln
tln
 !
  /divme. He lets me feed with his
hinds, bars me the
  

[jQuery] Re: processing json object

2008-05-05 Thread JP

thanks !

I only had to add:
 ...   i  records.length; ...

On May 4, 2:14 pm, Nicola Rizzo [EMAIL PROTECTED] wrote:
 success: function(json, status){
 var records = json.Records;
 var str = ;
 if(records){
 for(var i = 0; i  records; records++){
 for(var j in records[i]){
 str += j +  --  + records[i][j] + \n;
 }
 }
 window.alert(str);
 }

 }

 hth,
 Nicola

 On Sun, May 4, 2008 at 8:02 PM, JP [EMAIL PROTECTED] wrote:

   how can I process values from json object without having to use
   indivual reference names?

   using json:

   ( {Records: [ {firstname:Nancy,lastname:Davolio} ],
   RecordCount:1 } )

   instead of  :

   $.ajax({ ..

  success: function(json, status) {
if(json.Records){alert(Records=+json.Records[0].firstname );}
   ...

   is there a way to numerically reference values --something like :

   $.ajax({ ..

  success: function(json, status) {
if(json.Records){alert(Records=+json.Records[0].0);}
   ...

   only it should work :)

   thanks in advance


[jQuery] Re: suggestions for a hover zoom on text...

2008-05-05 Thread Josh Nathanson


In your code, it looks like you use many calls to $(this) and 
$(#times_zoom).  You'll get much better performance if you set variables 
and use those instead, i.e in your mouseover function:


var th = $(this), tz = $(#times_zoom);

Then you would use those references like so:

// change the contents
tz.html(th.html());

This will improve performance because you are not calling the jQuery 
function as many times.


-- Josh

- Original Message - 
From: gr00vy0ne [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Monday, May 05, 2008 6:15 PM
Subject: [jQuery] suggestions for a hover zoom on text...




I'm trying to come up with a technique for expanding text when you
hover over it. I built a real quick and dirty demo to help explain the
affect I'm trying to achieve:

http://imlocking.com/projects/zoom_text.html

So, in the list of times, I'd like to make them pop when you hover
over. Of course, it would be easy to change the style of the element
directly but then the list would move which I'm trying to avoid.

What I'm doing now is creating a hidden positionable container that
moves to the correct location and shows a copy of the hovered element
(with a different style applied). It works but I've noticed on an
actual page with other content, the performance can get horrendous.
Safari is blazing fast. Both Firefox and IE can both go up to 100% CPU
usage.

All the code (HTML/CSS/JS) is inline. So, please take a look and let
me know if there's a better more efficient way to do this. Any
suggestions, tips, comments, etc. are welcome.

Another alternative we've tried is putting hidden spans in the page
that show up on hover (requires little-to-no scripting) but it ends up
marking the markup unnecessarily large.

Many thanks,
victor