[jQuery] Re: jquery.blockUI: Any way to preload images for the blockUI dialog?

2008-04-07 Thread Sam Collett

You can use this preload plugin and run it as soon as possible:

jQuery.preloadImages = function()
{
for(var i = 0; iarguments.length; i++)
{
jQuery(img).attr(src, arguments[i]);
}
}

$.preloadImages(over.png, out.gif);
$(
function()
{
// do something when page is ready
}
)

On Apr 6, 8:14 am, miCRoSCoPiC^eaRthLinG
[EMAIL PROTECTED] wrote:
 Hi,
   I am loading this animated .gif loader image into the blockUI
 dialog. When the dialog comes up, there's a lag of 2-3 seconds before
 the image appears.. this looks pretty unprofessional. So is there any
 way to pre-load these images so that they appear along with the
 message the moment the dialog pops-up?

 Thanks,
 m^e


[jQuery] Re: trigger an AJAX interrupt

2008-04-07 Thread Tom

Am I really the only one who has issues with this?

Surely there must be some way to tell the browser to stop waiting for
an AJAX response without waiting for the  timeout to kick in.

On Apr 3, 11:23 am, Tom [EMAIL PROTECTED] wrote:
 Hi,

 I have a device status page that pulls some information directly form
 a database and some other information from the device itself.  The
 database content is generated once by the server and displayed in the
 static section of the web page. The information form the device itself
 is generated by am ajax request and the response is  displayed in the
 dynamic section of the web page.

 Sometimes the device may be switched off  or there may be some other
 delay in returning the response.  During this time if a user tries to
 navigate away from the page they are unable to until the AJAX request
 timeout or terminates.

 How can I force an interrupt to the AJAX  request so the user doe snot
 have to wait for the tinmeout?

 I tired this

 $('a').click(function(){
 $.event.trigger('ajaxStop');
 });

 Basically if anyone clicks on a hyperlink (navigation) the ajaxStop
 event should be triggered. This doe snot have the desired effect for
 me. Am I misusing it?

 Any other ideas are most welcome
 Cheers
 Tom


[jQuery] jqGrid 3.1 version

2008-04-07 Thread Tony

Hi all,
A new version of jqGrid is out. This is a bug fix release, but include
a lot of useful features and methods.
The full list of changes (release notes) can be found here:
http://trirand.com/jqgrid/docs/
Demo page here: http://trirand.com/jqgrid/jqgrid.html
Home page: http://www.trirand.com/blog/

Enjoy
Tony



[jQuery] Re: jEditable issue in Firefox 2.0.0.13

2008-04-07 Thread [EMAIL PROTECTED]

Do you have test page online? Just tested with 2.0.0.13 and did
not
encounter any problems.

I don't have an online test. Our dev servers are locked away, and it's
a royal pain moving this to a public server. However, I will build one
if I can't get to the bottom of the problem.

After removing stuff systematically I've found the problem to be some
compatibility issue between jEditable and UI tabsl; the editable
element is the text of a user-definable tab. Still works in non-
Firefox browsers though, which is weird.

I'll keep digging and let you know the result.

--
(and is jEditable the best edit-in-place plugin for jQuery anyway?)
Yes.
Cheers :)

Steve


[jQuery] Fwd: [jQuery] Re: Validator plugin submit with HREF

2008-04-07 Thread Paul Collins

Sorry to bump, just wanted to see if anyone can help me with this?

Cheers



 This is all working now, the only issue I have left is how could I use
 the Validation plugin with multiple forms? They would need different
 ID's, which I can grab with a variable, but I can't seem to submit to
 a specific form ID. Here is the line of code to validate:

 $(form).validate();

 I would like to change form to a variable, within a function. Here is
 my complete code, can anyone tell me how to specify the variable
 formID in the validate() call? Thanks for any help.


$(document).ready(function(){
$(:submit[id$='_replace']).each(function() {
var submitID = $(this).attr(id);
var submitValue = $(this).attr(value);

var formID = $(this).parents(form).attr(id);

$(this).replaceWith( [ 'a class=replace '
, submitID
, ' id='
, submitID

, ' href=#em/em'
, submitValue
, '/a'
].join('')
);
$('#'+submitID).click(function() {
$('#'+formID).submit();
return false;
});
});
$(form).validate();
});

 Cheers

Paul



 On 01/04/2008, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 
   Paul Collins schrieb:
 
 
   Hi all,
  
   I am trying to use an anchor link to submit my form using the
   Validator plugin, (so I can change the button to a graphic). I would
   like to know what to put into the HREF to submit to the Validator
   code.
  
   Currently I have:
  
   href=javascript:$(this).validate();
  
   This doesn't seem to work correctly, here is my full block of code in
   case you would like to check. I would greatly appreciate any help or
   links.
  
   $(document).ready(function(){
 $(:submit[id$='_replace']).each(function() {
 var submitID = $(this).attr(id);
 var submitValue = $(this).attr(value);
 $(this).replaceWith( [ 'a class=replace '
 , submitID
 , ' id='
 , submitID
 , '
   href=javascript:$(this).validate();em/em'
 , submitValue
 , '/a'
 ].join('') );
 });
return false;
   });
  
   Thanks again
  
  
  
   Try this:
 
   a href=# id=clicksubmitSubmit/a
 
   $(function() {
$(#clicksubmit).click(function() {
 $(form).submit();
 return false;
});
   });
 
 
   There is no need to put javascript inside hrefs when using jQuery.
 
   Jörn
 


[jQuery] Re: jEditable issue in Firefox 2.0.0.13

2008-04-07 Thread [EMAIL PROTECTED]

Well, I still can't figure out what the problem is. The issue seems to
be an incompatibility between jEditable and UI tabs. Here is an
example:

http://www.rymix.co.uk/jquery/d15/inline.html

The standard unordered list at the top and the table beneath use the
same jQuery/jEditable code, but only the standard list works. BTW,
only the third items in each list are editable.

Here's the code:

$(.tabEdit).editable(ok.php, {
event: dblclick,
indicator: Saving...,
tooltip: Double-click to edit,
callback : function(value, settings) {
alert('success!');
}
});
$('#tabs  ul').tabs();

ul
liItem 1/li
liItem 2/li
li class=tabEditEditable item/li
/ul
div id=tabs class=flora
ul
lia href=#tab1spanTab 1/span/a/li
lia href=#tab2spanTab 2/span/a/li
lia href=#tab3span class=tabEditEditable tab 
3/span/a/
li
/ul
/div
div id=tab1Tab 1/div
div id=tab2Tab 2/div
div id=tab3Tab 3/div


[jQuery] Re: Remove script

2008-04-07 Thread Virendra

i want to remove all the functions and variables that the script
defines.

On Apr 4, 12:08 am, hj [EMAIL PROTECTED] wrote:
  I have added a js file in my html file.
  script src=test.js language=JavaScript/script

  I want to remove the script from my file using jQuery.
  I have tried using the following
   jQuery('script[src=test.js]').remove();
  But the script is not getting removed.

 Do you want to remove the script, or the functions and variables
 that it defines? To remove the script element, try:

   jQuery('script[src*=test.js]').remove();

 But that will only remove the element from the DOM; all the functions
 and variables it defines will still exists.

 --

 hj


[jQuery] Re: Remove script

2008-04-07 Thread Karl Rudd

You'll need a record of every function and variable that a script
defines. Perhaps a function that does the clean up. For instance
(untested):

var blah = 3;
var blahblah = { 'f': 12 };

function aFunc() { };
function aFunc2() { }

function cleanUp() {
  blah = undefined;
  blahblah = undefined;
  aFunc = undefined;
  aFunc2 = undefined;
}

Karl Rudd

On Mon, Apr 7, 2008 at 7:19 PM, Virendra [EMAIL PROTECTED] wrote:

  i want to remove all the functions and variables that the script
  defines.

  On Apr 4, 12:08 am, hj [EMAIL PROTECTED] wrote:
I have added a js file in my html file.
script src=test.js language=JavaScript/script
  
I want to remove the script from my file using jQuery.
I have tried using the following
 jQuery('script[src=test.js]').remove();
But the script is not getting removed.
  
   Do you want to remove the script, or the functions and variables
   that it defines? To remove the script element, try:
  
 jQuery('script[src*=test.js]').remove();
  
   But that will only remove the element from the DOM; all the functions
   and variables it defines will still exists.
  
   --
  
   hj



[jQuery] Re: jqGrid 3.1 version

2008-04-07 Thread Alexandre Plennevaux

that's impressive !

On Mon, Apr 7, 2008 at 11:50 AM, Tony [EMAIL PROTECTED] wrote:

  Hi all,
  A new version of jqGrid is out. This is a bug fix release, but include
  a lot of useful features and methods.
  The full list of changes (release notes) can be found here:
  http://trirand.com/jqgrid/docs/
  Demo page here: http://trirand.com/jqgrid/jqgrid.html
  Home page: http://www.trirand.com/blog/

  Enjoy
  Tony





-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: Comet Technique - possible with jQuery? Plugin?

2008-04-07 Thread coughlinsmyalias

Thank you! With the Bayeux implementation, what will that allow me to
do? I am already using ajax calls in my page to get my words and to
keep the x/y for each element, you can see by going to the site.

Then a comet server? What is the real advantage there?

Thanks

On Apr 6, 4:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 coughlinsmyalias schrieb: Hey,

  I have been doing some research on Comet to use on my site:
 http://rksdesignstudios.com/magnet/- To try to keep it live as
  possible almost to push the content to see other changes and keep the
  page constantly updated.

  I did a search here on the group but really didn't find anything, any
  ideas on what I can do? Is there a plugin or other technologies I can
  do using jQuery to achieve my goal?

 Implementing long-polling Comet with jQuery doesn't need a plugin. Just
 use jQuery's ajax methods.

 If you are looking for a Bayeux 
 implementation:http://plugins.jquery.com/project/Comet

 In any case implementing the serverside is the more difficult part,
 though there are plenty options for Comet servers. A great resource for
 that ishttp://cometdaily.com/

 Jörn


[jQuery] displaying content after certain amount of time?

2008-04-07 Thread rudgr

Hi,

I'm relatively new to jquery and was wondering if there's a way to
display a div after x milliseconds?

Thanks in advance,

rudgr


[jQuery] Same code structure to affect two elements, but one doesn't work

2008-04-07 Thread Cristian

Hi guys,
I created some code, but it doesn't seem to work and I don't know why?

I have a UL list surrounded by a DIV that has a 3px solid
LightSteelBlue border.

I created code to change the text color and background color of each
LI element and the border color of the DIV while the mouse is over any
LI element, when the mouse is out, these styles are removed. The
effects for the LI elements work perfectly, but the effect for the DIV
doesn't. What am I doing wrong?

Here's the code for the custom.js file:

jQuery(document).ready(function() {
$(li).mouseover(function() {
$(this).addClass(li-hover);
$(#maindiv).addClass(maindiv-hover-effect);
});
$(li).mouseout(function() {
$(this).removeClass(li-hover);
$(#maindiv).removeClass(maindiv-hover-effect);
});
});

-

And here's the HTML and CSS code:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;
head
titlejQuery Starterkit/title
script src=jquery.js type=text/javascript/script
script src=custom.js type=text/javascript/script
style rel=stylesheet type=text/css
#maindiv {
border: 3px solid lightsteelblue;
height: 300px;
width: 600px;
margin: 50px;
padding:20px;
}
.maindiv-hover-effect {
border: 3px solid red;
}
.li-hover {
color: white;
background-color: blue;
}
/style
/head
body
div id=maindiv
pThis is an unordered list/p
ul
liList 1/li
liList 2/li
liList 3/li
liList 3/li
/ul
/div
/body
/html




[jQuery] Question about jQuery Tabs

2008-04-07 Thread dogdayafternoon


Hello, I have 3 tabs in the footer of my website using the jQuery tabs
script. I have a link at the very top of the page, and I've attached an
anchor to the link.

When the link is clicked, it is supposed to go to the anchor at the bottom
of the page, and then the jQuery code in the head is supposed to trigger the
link.

Here is the code in the head:

script type=text/javascript
$(function() {
$('#containerFooter').tabs({ fxFade: true, fxSpeed: 'fast' });
});
$(a.callToActionAskJames).bind(click, function(){
$('#containerFooter').tabs('select', 3)
});
/script

When the link is clicked, it goes to the anchor in the footer; however,
instead of activating the tab, it does nothing. I have to manually change
it. 

I've worked on this all day and can't get it. I have no clue what to do.

Thanks so much in advance...
-- 
View this message in context: 
http://www.nabble.com/Question-about-jQuery-Tabs-tp16534151s27240p16534151.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: displaying content after certain amount of time?

2008-04-07 Thread Roncioso

setTimeout($('#myDiv').show(),1000) ?

On 7 Apr, 11:47, rudgr [EMAIL PROTECTED] wrote:
 Hi,

 I'm relatively new to jquery and was wondering if there's a way to
 display a div after x milliseconds?

 Thanks in advance,

 rudgr


[jQuery] [feature request] blockUI. To have a cancel button appeared after n seconds if the blockUI not unblocked

2008-04-07 Thread Jiming

Dear sir,

From time to time, we might have code which using blockUI that cannot
unblock-ed properly. In that case, user can do nothing but refresh the
whole page and which is not what we expected at all.

I suggest the following options
  1. cancel_dealy: which will appear a close button, such as an
element within the blockui div and have class .blockui_close. When
click it, unblock will be called.
  2. cancelCallback: an call back function if cancel clicked
  3. successCallback: an call back function if blockui called instead
of canceled



Thanks!

Jiming


[jQuery] Re: Remove script

2008-04-07 Thread Virendra

i want to remove all the functions and variables that the script
defines.

On Apr 4, 12:08 am, hj [EMAIL PROTECTED] wrote:
  I have added a js file in my html file.
  script src=test.js language=JavaScript/script

  I want to remove the script from my file using jQuery.
  I have tried using the following
   jQuery('script[src=test.js]').remove();
  But the script is not getting removed.

 Do you want to remove the script, or the functions and variables
 that it defines? To remove the script element, try:

   jQuery('script[src*=test.js]').remove();

 But that will only remove the element from the DOM; all the functions
 and variables it defines will still exists.

 --

 hj


[jQuery] Re: Can you poll a database with jQuery or do I just use plain ajax?

2008-04-07 Thread marr.adam

As with any js, since it runs client-side, you cannot use it to query
a Db, only to call something else that will, such as making a request
to a PHP script or server-side java. PHP is the simplest way. You can
either have the php return the markup to display or maybe have it
return  json object and create the page with js. Either way, jquery or
mootools both have already taken care the complexities, so I would
recommend using them for your requests.


[jQuery] slow and jerky slide on Firefox 2.0.0.13 (Ubuntu/ Core-2 : 1.8GHz)

2008-04-07 Thread myst3rious

Hi,
I started using Jquery 1.2.3 (uncompressed) for development and
learning/.
Just one simple effect in whole page using the Jquery tutorials, a div
is toggled (slideUp/slideDown) when a button's is click.
This runs smoothly on Opera (Ubuntu), but very sluggish on Firefox
(Ubuntu). For sake of precaution initially firebug, and at last all
the Addons in Firefox were uninstalled. Still the performance is same
unchanged.

Here is the code:

$(document).ready(function(){
var $box = $('#userPanel');
  $('#UserPanelButton').click(function() {
$box.blindToggle(500);
  });
$box.blindToggle(500);  // To show the animations automatically on-
load
});


jQuery.fn.blindToggle = function(speed, easing, callback) {
  var h = this.height() + parseInt(this.css('paddingTop')) +
parseInt(this.css('paddingBottom'));
  return this.animate({marginTop: parseInt(this.css('marginTop')) 
0 ? 0 : -h}, speed, easing, callback);
};



Please guide me where is the problem?


[jQuery] Re: displaying content after certain amount of time?

2008-04-07 Thread rudgr

ah great, thanks!

On Apr 7, 1:05 pm, Roncioso [EMAIL PROTECTED] wrote:
 setTimeout($('#myDiv').show(),1000) ?

 On 7 Apr, 11:47, rudgr [EMAIL PROTECTED] wrote:



  Hi,

  I'm relatively new to jquery and was wondering if there's a way to
  display a div after x milliseconds?

  Thanks in advance,

  rudgr- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)

2008-04-07 Thread Diego A.

that should not affect the image because it is in the background (not
affected by text-indent).
it seems to be working for me. do you have a link I can look at?

On Apr 4, 11:08 pm, AsymF [EMAIL PROTECTED] wrote:
 It seems that in IE 7 the DIVs for the stars are in fact being created
 from the radio buttons as expected but the text-indent CSS is set to
 -999em.

 On Apr 4, 8:34 am, AsymF [EMAIL PROTECTED] wrote:

  Yeah, I had thought about doing that. Even overlapping them. Was just
  wondering if I had somehow missed a simpler way of doing it. :)

  One other thing. I can't get this version to work at all in IE 7 when
  the stars are split. The stars don't show up. Even the radio buttons
  won't show up.

  On Apr 4, 4:24 am, Diego A. [EMAIL PROTECTED] wrote:

   Erm.. no.
   What you can do is have 2 controls.

   1. Dummy control to display value (split).
   2. Actual control that takes an input (not split).

   Show/hide at your disclosure and voila!

   On Apr 3, 10:29 pm, AsymF [EMAIL PROTECTED] wrote:

Sorry, nevermind about the metadata. I just noticed it is optional.

New questionis it possible to display the current value with split
stars but only allow whole star voting? In other words, show 3 and
3/4ths stars highlighted and the remainder portion grayed out but on
mouseover show a full star for each one?

On Apr 3, 4:10 pm, AsymF [EMAIL PROTECTED] wrote:

 Any way to get around the need for the metadata plugin? I am trying to
 keep included scripts light.

 On Mar 20, 3:23 pm, Diego A. [EMAIL PROTECTED] wrote:

  For reference: The issue was relative positioning in IE.
  I worked around it with a negative margin.

  On Mar 20, 6:29 pm, Diego A. [EMAIL PROTECTED] wrote:

   I had tried that but it didn't work reliably in IE. It was a CSS
   issue. But hey, I think I've fixed it, in which case the only 
   issue
   with prototype B will be resolved.

   Check it out:http://www.fyneworks.com/jquery/star-rating/

   On Mar 19, 10:08 pm, AsymF [EMAIL PROTECTED] wrote:

Why can't the background-color value just be set to transparent?

On Mar 16, 5:28 pm, timothytoe [EMAIL PROTECTED] wrote:

 B is the more interesting path for development--that's for 
 sure. You
 could always do both. Do B as far as you can take it, then 
 maybe some
 clever solution will occur to you to get the same 
 functionality over
 any background.

 On Mar 16, 11:10 am, Diego A. [EMAIL PROTECTED] wrote:

  Hi Timothy, thanks for the feedback. THAT is exactly the 
  issue.

  Prototype A would work on ANY background, gradient or not, 
  without any
  further requirements - other than 2 separate images that is.

  Prototype B does not require any other images, but you must 
  define the
  background. So, if the background was a gradient, you'd 
  have to define
  the same background image for the rating control in order 
  for it to
  match the background it sits on (ie.: the page background).

  What sways me toward prototype B is that it allows for 
  future
  development. Stars can be easily split into sections, 
  different images
  used, star domensions can be re-defined.

  Prototype A is easier to use (you don't need to think about 
  the
  background it will sit on), but it puts serious constraints 
  on future
  development and customization.

  On Mar 15, 6:42 pm, timothytoe [EMAIL PROTECTED] wrote:

   Would prototype A work on a gradient background? If so, 
   that would be
   useful. If not, B makes more sense to me.

   On Mar 15, 10:11 am, Diego A. [EMAIL PROTECTED] wrote:

To anyone else who might be interested, feel free to 
send your
feedback. I'm going to go ahead with prototype B for 
now so the plugin
will require a background colour.

On Mar 13, 8:45 pm, Diego A. [EMAIL PROTECTED] 
wrote:

 Two things.

 1. v2 now available 
 here:http://www.fyneworks.com/jquery/star-rating/
 - NEW: option to disable the cancel button,
 - NEW: option to make the plugin readOnly
 - NEW: ability to accept any value (anything at all)

 2. half-star prototypes now available
 There are 2 ways of doing it, I need your feedback.

 Prototype A: Using 2 new half-star images (star-left 
 and 
 star-right)http://www.fyneworks.com/jquery/star-rating/half-star-A/
 PROS: works on any background
 CONS: needs extra images

 Prototype B: Uses CSS to slide part of the star out 
 of view (no 

[jQuery] jQuery XSLT plugin question

2008-04-07 Thread hcvitto

hi
i'm using the jQuery XSLT plugin to insert some xml code in a xhtml
page.

how can i use the same function to inject xml data in two different
xhtml blocks?

What i do now is:

 $(document).ready(function(){
$('#leftMenu').xslt({xmlUrl: '../Dati/menuProdotti_jquery.xml',
xslUrl: 'index_xml.xsl'});
$('#topNav').xslt({xmlUrl: '../Dati/menuTop_jquery.xml', xslUrl:
'index_xml.xsl'});
});

but i'd like to call index_xml.xsl only once and use the same xml
file (as you can see i use two of them) for both.

thanks vitto


[jQuery] Re: selectors return type

2008-04-07 Thread deer421

Thanks for all the responses.

So the API doc (http://docs.jquery.com/Selectors) should say all
selectors return Array Element instead of some of them return
Element. Am I correct?


[jQuery] Interface (interface.eyecon.ro) question

2008-04-07 Thread in-sanity

Hi,

I was wondering if this is a known bug or a missing feature if I have
multiple input fields with Autocomplete attached to them.

I have on one page about 10 text input fields and they all have
autocomplete code for them. 8 of them call the same script, and 2 of
them call another script.

In firebug, I get the result back from those scripts, but the drop-
down does not appear. Bellow I'll post the backend script and the js
script for one field, the other ones being identical.

Backend script

?php
header(Content-type: text/xml);
$sql = mysql_connect(localhost, root, satnet?);
mysql_select_db(stoc, $sql);
$xml = ;
if(isset($_REQUEST['value'])) {
$queryString = trim($_REQUEST['value']);
if(strlen($queryString) 0) {
$query = mysql_query(SELECT `cod_produs`,`nume_produs` 
FROM
`produse` WHERE `nume_produs` LIKE '.$queryString.%' LIMIT 0,20);
$xml.=?xml version=\1.0\?\n;
$xml.=ajaxresponse\n;
while($data = mysql_fetch_array($query)){
$xml.=   item\n;
$xml.=  text![CDATA[strong.
$data[nume_produs]./strong]]/text\n;
$xml.=  value![CDATA[.
$data[nume_produs].]]/value\n;
  $xml.=  
cod![CDATA[.$data[cod_produs].]]/cod\n;
$xml.=   /item\n;
}
$xml.=/ajaxresponse\n;
echo $xml;
}
}
?

js code

$(document).ready(function(){
$('#produs_1').Autocomplete({
source: 'includes/html/produse_ajax.php',
delay: 120,
fx: {
type: 'slide',
duration: 150
},
autofill: false,
helperClass: 'autocompleter',
selectClass: 'selectAutocompleter',
minchars: 2,
onShow : fadeInSuggestion,
onHide : fadeOutSuggestion
});
});

Help is very appreciated. Thanks


[jQuery] Re: Two versions alongside each other

2008-04-07 Thread Scott González

Why would you think using two versions of jQuery is any different from
using jQuery with another library?

noConflict is exactly what you want; here's an (old) proof of concept:
http://scottsplayground.com/temp/jquery_versions/

On Apr 6, 1:36 am, Rowan [EMAIL PROTECTED] wrote:
 I'm looking for a way to have two versions of jQuery running side by
 side, I found a page that talks about using noConflict* with other
 libraries, but that doesn't look like the solution for me.

 The versions I want to use are 1.0.4 and 1.2.3. Is there anything I
 can do?

 *http://docs.jquery.com/Using_jQuery_with_Other_Libraries


[jQuery] Re: selectors return type

2008-04-07 Thread Karl Swedberg


Hi,

I definitely see how the documentation can be confusing there. I think  
the distinction was made because the ones that just have Element are  
the ones that only ever return a single element (in the array). I  
wonder if it would make sense to still have a distinction somehow.  
Maybe:


Array Element(s) -- for all the selectors that currently say Array  
Element

Array Element -- for all the selectors that currently say Element

Does this sound reasonable? Would it cause other problems and/or  
confusion?



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



On Apr 7, 2008, at 9:04 AM, deer421 wrote:



Thanks for all the responses.

So the API doc (http://docs.jquery.com/Selectors) should say all
selectors return Array Element instead of some of them return
Element. Am I correct?




[jQuery] Animate to bottom left corner?

2008-04-07 Thread Michael Price


Hi all,
Got an image absolutely positioned inside a relatively positioned DIV. 
When I mouseover it, it stretches via jQ's built in animation functions 
to a wider, taller version.


Awful ASCII art coming up:

-- ON MOUSE OVER, EXPANDS OUTWARD
||
| XX |
||
--
|
|
|
v
ON MOUSE OVER, EXPAND DOWNWARD

So it's going from the top left corner. Is it possible to make the 
animation run from the BOTTOM left corner?


LIKE THIS?
^
|
|
|
--
||
| XX |
||
-- ON MOUSE OVER, EXPANDS OUTWARD

All help gratefully received :)

Regards,
Michael Price



[jQuery] Re: IE7 textarea regression

2008-04-07 Thread Michael Daum

Can anybody reproduce this? Has anybody a workaround how to wrap a
textarea into a div safely?


[jQuery] :first make faster?

2008-04-07 Thread deer421

Does :first make the selection faster? In other words, does it stop
the selection after the first item is found or it filters only after
all selections are found?


[jQuery] Re: Sorting multiple tables by the same criteria

2008-04-07 Thread Jeff

Uhh, nevermind I guess. I'm just combining them into one table and
using CSS to display them in different positions. Not really what I
wanted, but it works.

On Apr 4, 2:01 pm, Jeff [EMAIL PROTECTED] wrote:
 Hi,

 I'm relatively new to jQuery and I'm using jquery.tablesorter to sort
 a table. That works great, except that I need to sort a second table
 in the same way to keep the rows aligned.

 Basically, what I have set up is this. A tabbed interface with two
 tabs. Tab 1 shows a table with computer specifications and Tab 2 shows
 a table with extra information about each computer. As such, I have to
 keep the rows related, and I need to allow users to sort either table
 and their sorts affect the other table.

 It seems that there's probably an easy way to do this. Any ideas?

 Thanks in advance!

 -Jeff


[jQuery] two level tabs + drop-down for 3-rd level

2008-04-07 Thread alexweb

hi... my client wants to have a two level tabs with 3-rd level as drop-
down. Is there any plygin available for that? I know about tabs
plugin, but it don't looks like its possible to make even two level
tabs with it.

Let me know. Thanks.


[jQuery] Re: Animate to bottom left corner?

2008-04-07 Thread Michael Price


Karl Swedberg wrote:
I think this is just a matter of setting the image's CSS properties 
properly. Instead of using a top property, use bottom:


img.someclass {
  position: absolute;
  bottom: 0;
  left: 0;
}


Karl, that's brilliant. Works perfectly!

Regards,
Michael Price



[jQuery] Re: Animate to bottom left corner?

2008-04-07 Thread Karl Swedberg


Hi Michael,

I think this is just a matter of setting the image's CSS properties  
properly. Instead of using a top property, use bottom:


img.someclass {
  position: absolute;
  bottom: 0;
  left: 0;
}

that should do it.

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



On Apr 7, 2008, at 11:02 AM, Michael Price wrote:



Hi all,
Got an image absolutely positioned inside a relatively positioned  
DIV. When I mouseover it, it stretches via jQ's built in animation  
functions to a wider, taller version.


Awful ASCII art coming up:

-- ON MOUSE OVER, EXPANDS OUTWARD
||
| XX |
||
--
|
|
|
v
ON MOUSE OVER, EXPAND DOWNWARD

So it's going from the top left corner. Is it possible to make the  
animation run from the BOTTOM left corner?


LIKE THIS?
^
|
|
|
--
||
| XX |
||
-- ON MOUSE OVER, EXPANDS OUTWARD

All help gratefully received :)

Regards,
Michael Price





[jQuery] $(window).bind(load,function(){ vs onready

2008-04-07 Thread coughlinsmyalias

Hey,

I have a really quick question, what is the difference between doing:

$(window).bind(load,function(){

And

$(document).ready(function(){


Just was on my mind and was curious.

Thanks,

Ryan


[jQuery] Re: :first make faster?

2008-04-07 Thread coughlinsmyalias

That is a very good question, I tried doing a quick search on it and
nothing. When you think about it, you think it would make it faster
because you are saying use :first, so it would stop there, therefore
making the selection faster, because you are telling it which element
to use.

Sounds like it makes sense, maybe someone else has a more factual
answer.

Ryan

On Apr 7, 10:07 am, deer421 [EMAIL PROTECTED] wrote:
 Does :first make the selection faster? In other words, does it stop
 the selection after the first item is found or it filters only after
 all selections are found?


[jQuery] Event delegation: jQuery ready solution for submit/reset in IE/Safari 2? jQuery.Listen?

2008-04-07 Thread Klaus Hartl

Hi all,

I was wondering if there's something ready for jQuery that fixes event
bubbling for submit/reset events in IE? Also in Safari 2 these events
don't seem to bubble.

Does the Listen plugin provide a fix for this?


--Klaus


[jQuery] help with toggling behavior

2008-04-07 Thread clorentzen

I'm new to jquery (and am no javascript pro), and am having trouble
figuring out two things with a behavior that I've put together:

1) how do I simplify this code so that it can be used for numerous
instances on the page, without having to have repeats of the code with
the ids changed out? Can I somehow 'find' partial matches between ids
on the page, based on the id of the item being clicked? (Each 'pair'
of items has similarly named ids -- eg. navProducts and linksProducts)

2) the 'navDim' style needs to toggle off if it's on for any li, but
not toggle if it's not in use. I'm having trouble getting that to
happen properly.

The scripting for #navProducts is the most complete chunk, however it
doesn't work correctly if I duplicate it similarly for my other ids.

Any and all suggestions really appreciated. Thanks! Code below:

jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
  return this.animate({opacity: 'toggle', height: 'toggle'}, speed,
easing, callback);
};
  $(document).ready(function() {

 $('li#navProducts').click(function() {
  $('li#navProducts').removeClass('navDim');
  $('li#navProducts').siblings('li.navSel').removeClass('navSel');
  $('#linksProducts').slideFadeToggle('normal');
  $('li#navProducts').toggleClass('navSel');
  $('li#navProducts').siblings('li').toggleClass('navDim');
  $('#linksProducts').siblings('div:visible').slideUp('fast');
  return false;
 });

 $('li#navBrands').click(function() {
  $('li#navBrands').siblings('li.navSel').removeClass('navSel');
  $('#linksBrands').slideFadeToggle('normal');
  $(this).toggleClass('navSel');
  $('#linksBrands').siblings('div:visible').slideUp('fast');
  return false;
 });

 $('li#navSites').click(function() {
  $('li#navSites').siblings('li.navSel').removeClass('navSel');
  $('#linksSites').slideFadeToggle('normal');
  $(this).toggleClass('navSel');
  $('#linksSites').siblings('div:visible').slideUp('fast');
  return false;
 });

 $('li#navLocations').click(function() {
  $
('li#navLocations').siblings('li.navSel').removeClass('navSel');
  $('#linksLocations').slideFadeToggle('normal');
  $(this).toggleClass('navSel');
  $('#linksLocations').siblings('div:visible').slideUp('fast');
  return false;
 });

   });


[jQuery] setinterval vs. settimeout

2008-04-07 Thread coughlinsmyalias

Hey, I found this article here:
http://www.evolt.org/article/Using_setInterval_to_Make_a_JavaScript_Listener/17/36035/
- to try to clear up my confusion with setInterval and setTimeout, but
still kind of confused, but this is what I got out of it so far:


setInterval: Does X every X ms

setTimeout: Delays X every X ms

Is that close or am I completely off? If someone has a more clear
example could you post it :)

Also, if I want to try to keep my site as live and updated as
possible, which would be better.

Thanks,

Ryan


[jQuery] Re: setinterval vs. settimeout

2008-04-07 Thread Jake McGraw

The following will pop up an alert dialog EVERY 20 (2 milliseconds) seconds:

window.setInterval(function(){alert('Hello!');},2);

The following will pop up an alert dialog ONCE, AFTER 20 (2 ms) seconds:

window.setTimeout(function(){alert('Hello!');},2);

To keep your site updated you would use setInterval, as it will be
called continuously.

- jake



On Mon, Apr 7, 2008 at 11:53 AM, coughlinsmyalias [EMAIL PROTECTED] wrote:

  Hey, I found this article here:
  
 http://www.evolt.org/article/Using_setInterval_to_Make_a_JavaScript_Listener/17/36035/
  - to try to clear up my confusion with setInterval and setTimeout, but
  still kind of confused, but this is what I got out of it so far:


  setInterval: Does X every X ms

  setTimeout: Delays X every X ms

  Is that close or am I completely off? If someone has a more clear
  example could you post it :)

  Also, if I want to try to keep my site as live and updated as
  possible, which would be better.

  Thanks,

  Ryan



[jQuery] Re: Event delegation: jQuery ready solution for submit/reset in IE/Safari 2? jQuery.Listen?

2008-04-07 Thread Ariel Flesler

Hi Klaus

Does the Listen plugin provide a fix for this?

Nope, only for focus and blur. But if you find a cool way, I'd gladly
integrate it into Listen.

Cheers

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

On 7 abr, 13:12, Klaus Hartl [EMAIL PROTECTED] wrote:
 Hi all,

 I was wondering if there's something ready for jQuery that fixes event
 bubbling for submit/reset events in IE? Also in Safari 2 these events
 don't seem to bubble.

 Does the Listen plugin provide a fix for this?

 --Klaus


[jQuery] Re: setinterval vs. settimeout

2008-04-07 Thread Ariel Flesler

http://ejohn.org/blog/how-javascript-timers-work/

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

On 7 abr, 12:53, coughlinsmyalias [EMAIL PROTECTED] wrote:
 Hey, I found this article 
 here:http://www.evolt.org/article/Using_setInterval_to_Make_a_JavaScript_L...
 - to try to clear up my confusion with setInterval and setTimeout, but
 still kind of confused, but this is what I got out of it so far:

 setInterval: Does X every X ms

 setTimeout: Delays X every X ms

 Is that close or am I completely off? If someone has a more clear
 example could you post it :)

 Also, if I want to try to keep my site as live and updated as
 possible, which would be better.

 Thanks,

 Ryan


[jQuery] Re: Event delegation: jQuery ready solution for submit/reset in IE/Safari 2? jQuery.Listen?

2008-04-07 Thread Klaus Hartl

On Apr 7, 6:57 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
 Hi Klaus

 Does the Listen plugin provide a fix for this?

 Nope, only for focus and blur. But if you find a cool way, I'd gladly
 integrate it into Listen.

Sure... having a look at 
http://javascriptmvc.com/learningcenter/controller/index.html,
seems to support it.


-Klaus


[jQuery] Re: Accordion: missing auto-close

2008-04-07 Thread Jörn Zaefferer


[EMAIL PROTECTED] schrieb:

In the menus here: http://vanilla-spa.homeholistics.com/treatments.htm
, only the nested menu at the top auto-closes when you click another
item. The main items remain open until you click them again. I don't
think this is the default behaviour (I want only one item open at a
time) but can't find much documentation for this plugin.

Can anybody spot my mistake, please? [...]
The documentation for the accordion plugin is located here: 
http://docs.jquery.com/UI/Accordion

Including http://docs.jquery.com/UI/Accordion#What_this_isn.27t

Jörn



[jQuery] Re: Event delegation: jQuery ready solution for submit/reset in IE/Safari 2? jQuery.Listen?

2008-04-07 Thread Klaus Hartl

On Apr 7, 6:57 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
 Hi Klaus

 Does the Listen plugin provide a fix for this?

 Nope, only for focus and blur. But if you find a cool way, I'd gladly
 integrate it into Listen.

 Cheers

Seems to be doable (just like replacing focus/blur) by replacing
submit/reset with a pair of events:

submit = click/keypress (check for enter)
reset = click/keypress (check for keypress)

It has been done here:
http://devthatweb.com/view/basic-event-delegation-in-prototype

although in the code examples button elements are not taken into
account and reset isn't at all. I'll put something together, I really
need it. Theoretically the fix should be the same for Safari 2.


--Klaus





[jQuery] Re: Autocomplete and JSON

2008-04-07 Thread dineshv

Jorn / Shawn

In my act.js, I have:

 $(#suggest).autocomplete(/act);

The act.html file displays with the input box.  When I enter, for
example 'a', the following error appears:

 http://127.0.0.1:8080/act?q=alimit=150

and

 line 2723 in http://127.0.0.1:8080/static/js/jquery-autocomplete/lib/jquery.js

Any idea what's going on?

Dinesh


On Apr 6, 11:09 am, Ashley [EMAIL PROTECTED] wrote:
 This is possible but a bit difficult with the plugin. I wish it were
 easier as I don't think there is yet a jQuery autocomplete that
 competes with those from other packages like YUI.

 You have to override the 'parse' and 'formatItem' functions. Here is
 an example of it that I'm using.

   var autocompleteJSON = function(raw) {
  varjson= typeof(raw) === array ? raw : raw.resultSet;
  var parsed = [];
  for (var i=0; i json.length; i++) {
 var row =json[i];
 parsed.push({
 data: row,
value: row[title] + ' [' + row[id] + ']',
   result: row[title]
 });
  }
  return parsed;
   };

   $(input[name='parent_autocomplete']).result(function(event, data,
 formatted){
   $(input[name='parent']).val(data[id]);
   });

   $(input[name='parent_autocomplete'])
 .autocomplete(/cat/admin/page/search,
   { width: inherit
,minChars:3
,extraParams: {id:6 }
,max: 25
,delay: 900
,dataType: json
,parse: autocompleteJSON
,formatItem: function(row) { return row[title] }
,mustMatch: true
,selectFirst: false
  });

 Where theJSONcoming back from the server looks like:

 {resultSet:[{id:3,title:Green Services},
 {id:5,title:Green Living Guides}]}

 You can match up the format against the autocompleteJSON parsing
 function to see what's going on.

 It's always best to wrap yourJSONin an object {} and not just an
 array []. In an array the data can be visible to hacking on certain
 browsers (just FF, I think).

 -Ashley


[jQuery] Re: setinterval vs. settimeout

2008-04-07 Thread coughlinsmyalias

Thank you for this! This is exactly what I needed. Thanks Jake.

Ryan

On Apr 7, 12:51 pm, Jake McGraw [EMAIL PROTECTED] wrote:
 The following will pop up an alert dialog EVERY 20 (2 milliseconds) 
 seconds:

 window.setInterval(function(){alert('Hello!');},2);

 The following will pop up an alert dialog ONCE, AFTER 20 (2 ms) seconds:

 window.setTimeout(function(){alert('Hello!');},2);

 To keep your site updated you would use setInterval, as it will be
 called continuously.

 - jake

 On Mon, Apr 7, 2008 at 11:53 AM, coughlinsmyalias [EMAIL PROTECTED] wrote:

   Hey, I found this article here:
   http://www.evolt.org/article/Using_setInterval_to_Make_a_JavaScript_L...
   - to try to clear up my confusion with setInterval and setTimeout, but
   still kind of confused, but this is what I got out of it so far:

   setInterval: Does X every X ms

   setTimeout: Delays X every X ms

   Is that close or am I completely off? If someone has a more clear
   example could you post it :)

   Also, if I want to try to keep my site as live and updated as
   possible, which would be better.

   Thanks,

   Ryan


[jQuery] Re: setinterval vs. settimeout

2008-04-07 Thread coughlinsmyalias

Hey Ariel, I like this article, its laid out perfectly!

On Apr 7, 1:03 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
 http://ejohn.org/blog/how-javascript-timers-work/

 --
 Ariel Fleslerhttp://flesler.blogspot.com

 On 7 abr, 12:53, coughlinsmyalias [EMAIL PROTECTED] wrote:

  Hey, I found this article 
  here:http://www.evolt.org/article/Using_setInterval_to_Make_a_JavaScript_L...
  - to try to clear up my confusion with setInterval and setTimeout, but
  still kind of confused, but this is what I got out of it so far:

  setInterval: Does X every X ms

  setTimeout: Delays X every X ms

  Is that close or am I completely off? If someone has a more clear
  example could you post it :)

  Also, if I want to try to keep my site as live and updated as
  possible, which would be better.

  Thanks,

  Ryan


[jQuery] designMode - how to detect changes in the editable iframe

2008-04-07 Thread rolfsf

I've been playing with the jquery designMode plugin, and am trying to
find a way to detect when any change or edit has been made within the
designMode-enabled iframe, so that I can add a class to a containing
element (e.g. class=edited). Even something as simple and imprecise
as adding a click event to the iframe doesn't appear to do anything.
Any suggestions?

thanks
rolfsf


[jQuery] .attr on data returned by ajax loaded content (data)

2008-04-07 Thread Haris

Why won't the pie menu play button link update on AJAX loaded data? It
works on normal static content.

http://bin.cakephp.org/view/1613608944


[jQuery] Re: setinterval vs. settimeout

2008-04-07 Thread ripple
My understanding is that setInterval is use for looping, cause once the time 
expires it executes again. It's a delay.
   
  Whereas setTimeout will not run again once the function is triggered.
   
  

coughlinsmyalias [EMAIL PROTECTED] wrote:
  
Hey, I found this article here:
http://www.evolt.org/article/Using_setInterval_to_Make_a_JavaScript_Listener/17/36035/
- to try to clear up my confusion with setInterval and setTimeout, but
still kind of confused, but this is what I got out of it so far:


setInterval: Does X every X ms

setTimeout: Delays X every X ms

Is that close or am I completely off? If someone has a more clear
example could you post it :)

Also, if I want to try to keep my site as live and updated as
possible, which would be better.

Thanks,

Ryan


   
-
You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.

[jQuery] Re: :first make faster?

2008-04-07 Thread ripple
It appears that by running a test in the core, there's a for loop that acquires 
all of the related elements and returns the first on a return i == 0;
   
  jquery.extend({ extend: {
   
  first: function(a,i){;return i==0;},
   
  a is selector, i is loop
   
  

deer421 [EMAIL PROTECTED] wrote:
  
Does :first make the selection faster? In other words, does it stop
the selection after the first item is found or it filters only after
all selections are found?


   
-
You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.

[jQuery] Re: Autocomplete and JSON

2008-04-07 Thread dineshv

Sorry, that first error should have said:

 404 - http://127.0.0.1:8080/act?q=alimit=150


Jorn / Shawn

In my act.js, I have:

 $(#suggest).autocomplete(/act);

The act.html file displays with the input box.  When I enter, for
example 'a', the following error appears:

 http://127.0.0.1:8080/act?q=alimit=150

and

 line 2723 in http://127.0.0.1:8080/static/js/jquery-autocomplete/lib/jquery.js

Any idea what's going on?

Dinesh

On Apr 7, 12:27 pm, dineshv [EMAIL PROTECTED] wrote:
 Jorn / Shawn

 In my act.js, I have:

  $(#suggest).autocomplete(/act);

 The act.html file displays with the input box.  When I enter, for
 example 'a', the following error appears:

 http://127.0.0.1:8080/act?q=alimit=150

 and

  line 2723 
  inhttp://127.0.0.1:8080/static/js/jquery-autocomplete/lib/jquery.js

 Any idea what's going on?

 Dinesh

 On Apr 6, 11:09 am, Ashley [EMAIL PROTECTED] wrote:





  This is possible but a bit difficult with the plugin. I wish it were
  easier as I don't think there is yet a jQuery autocomplete that
  competes with those from other packages like YUI.

  You have to override the 'parse' and 'formatItem' functions. Here is
  an example of it that I'm using.

var autocompleteJSON = function(raw) {
   varjson= typeof(raw) === array ? raw : raw.resultSet;
   var parsed = [];
   for (var i=0; i json.length; i++) {
  var row =json[i];
  parsed.push({
  data: row,
 value: row[title] + ' [' + row[id] + ']',
result: row[title]
  });
   }
   return parsed;
};

$(input[name='parent_autocomplete']).result(function(event, data,
  formatted){
$(input[name='parent']).val(data[id]);
});

$(input[name='parent_autocomplete'])
  .autocomplete(/cat/admin/page/search,
{ width: inherit
 ,minChars:3
 ,extraParams: {id:6 }
 ,max: 25
 ,delay: 900
 ,dataType: json
 ,parse: autocompleteJSON
 ,formatItem: function(row) { return row[title] }
 ,mustMatch: true
 ,selectFirst: false
   });

  Where theJSONcoming back from the server looks like:

  {resultSet:[{id:3,title:Green Services},
  {id:5,title:Green Living Guides}]}

  You can match up the format against the autocompleteJSON parsing
  function to see what's going on.

  It's always best to wrap yourJSONin an object {} and not just an
  array []. In an array the data can be visible to hacking on certain
  browsers (just FF, I think).

  J-Ashley


[jQuery] jQuery Image Slideshow likd jdGallery?

2008-04-07 Thread dsizemore

Does anyone know if there is a jQuery image slideshow plugin that will
basically duplicate the functionality of jdGallery:
http://smoothgallery.jondesign.net/showcase/gallery/ ?

I've tried jdGallery alongside jQuery, but it doesn't seem to work
when next to some jQuery plugins.

Really all I'm looking for is an automatic image transition (fading
effect or other) and the ability to write a caption at the buttom of
the image (so I don't have to go in to photoshop and create the
caption into the image).

Thanks



[jQuery] fadeIn performance problem (with images)

2008-04-07 Thread mphilipeit

Anyone?!


[jQuery] corner plugin on Safari

2008-04-07 Thread Derek Allard

Hello All.

I've been using the jQuery corner plugin (version 1.92 (12/18/2007))
quite successfully.  However with the latest versions of Safari (and
Webkit) will render approximately 1 out of every 8-10 pageloads
without rounded corners.  I am unable to find a pattern here, and it
seems largely random.  I've attempted to set background colours for
those elements as I've read elsewhere, but it doesn't seem to affect
the problem.

In hunting around, it seems I'm not the first to notice it.  Has
anyone encountered a reliable solution to this problem?

Thanks,
Derek


[jQuery] Re: tablesort

2008-04-07 Thread Owen Leonard

  I have the id's correct. hOWEVER , it still doesn't sort.
  its seems very easy to use but it will not work.

Do you have the right table markup? You can't forget your thead and tbody.

  -- Owen


Web Developer
Athens County Public Libraries
http://www.myacpl.org


[jQuery] Re: jEditable issue in Firefox 2.0.0.13

2008-04-07 Thread [EMAIL PROTECTED]

If anyone's trying to debug this, I have also tried running a function
rather than loading ok.php. Even if that function contains only an
alert (and a return - or even just a return) it doesn't get run in
Firefox.

HTH
Steve


[jQuery] Re: :first make faster?

2008-04-07 Thread coughlinsmyalias

So is it faster, im confused, haha.

On Apr 7, 12:28 pm, ripple [EMAIL PROTECTED] wrote:
 It appears that by running a test in the core, there's a for loop that 
 acquires all of the related elements and returns the first on a return i == 0;

   jquery.extend({ extend: {

   first: function(a,i){;return i==0;},

   a is selector, i is loop

 deer421 [EMAIL PROTECTED] wrote:

 Does :first make the selection faster? In other words, does it stop
 the selection after the first item is found or it filters only after
 all selections are found?

 -
 You rock. That's why Blockbuster's offering you one month of Blockbuster 
 Total Access, No Cost.


[jQuery] Re: [validate] Validate plugin 1.2.1 + masked input = errors on optional masked fields

2008-04-07 Thread Jörn Zaefferer


Bryce Lohr schrieb:

Hi *,

I've been using an old version of the Validate plugin (1.1.2) along
with the Masked Input plugin. Today, I just upgraded to Validate 1.2.1
and noticed it doesn't behave quite the same with the masked inputs.

For example, I have two date fields, the first is required and the
second is optional. Both are masked (99/99/, if it helps). If I
tab through or click on the optional date field, I get a validation
error (Please enter a valid date; the default message) on the
optional field. I can still successfully submit the form, however.

In version 1.1.2, this did not occur. I could tab or click through the
optional date field without seeing an error. If I remove the input
mask, it also works as expected. It appears that the empty mask (__/
__/) is being passed to the date validation method, which, of
course, fails. Also, I understand from the changelog that there were
some non-trivial changes to how events are handled in the Validate
plugin, starting at 1.2.0. Are these changes perhaps conflicting with
the masked input plugin?

Here is a minimal example form:
http://www.gearheadsoftware.com/validate-masked.html

View source to see the code. Changing this form to use Validate 1.1.2,
with no other changes, gives the behavior I'm after.
  
Since 1.2, the validation plugin uses event delegation for handling 
those events. This effects the order in which events are handled, which 
causes the issue.


The masked-input plugin is part of the marketo demo: 
http://jquery.bassistance.de/validate/demo/marketo/
Worth noting is that the masked input is setup after the validation. In 
addition, handling keyup events is disabled: 
http://jquery.bassistance.de/validate/demo/marketo/mktSignup.js


So for a start, try to reverse the initialization order.

Jörn


[jQuery] Re: :first make faster?

2008-04-07 Thread ripple_27

Not so.

The loop executes before the return. Which is exactly what I thought
it would do cause the other selectors use the same looping construct.
(last, eq, etc)



[jQuery] Re: Cycle plugin an absolute positioning

2008-04-07 Thread flex

thanks ! i was in need for that..



[jQuery] form elements

2008-04-07 Thread Frika

hello all,

I need a bit of help. I want to do the follow function:
$(input.type='button').mouseover(function(){$
(this).css({cursor:pointer});});

but it won´t work. Because I don´t know how I can match the element in
a form. In this case I want make a mouseover effect on the input
type=button but I wrote it in a wrong way. How has it to be?

Thank you


[jQuery] Re: jQuery events on plain old JavaScript objects

2008-04-07 Thread Thom

I want a unified way of raising/handling events in my JavaScript
codebase. As I'm already using jQuery, it'd be nice to reuse its
smarts. :)

On Apr 2, 5:35 pm, chrismarx [EMAIL PROTECTED] wrote:
 interesting, for what purpose would you use this functionality?
 why not just

 var monkey = {name:'Dave',
                      climb:function(){alert(this.name + 'is
 climbing');}
 monkey.climb();

 On Apr 2, 8:02 am,Thom[EMAIL PROTECTED] wrote:

  This works:

  var monkey = { name: 'Dave' }
  $(monkey).bind('climb', function(monkey) { alert(this.name + ' is
  climbing!'); });
  $(monkey).trigger('climb');

  I really just wanted to check that this was expected functionality -
  and isn't going to disappear anytime soon - as I'd like to lean on it
  quite heavily. :)


[jQuery] Re: [validate] URL validation failing on a valid URL.

2008-04-07 Thread Josh Nathanson


Just a guess, but probably because there is no .html or .jsp or whatever 
before the query string.


-- Josh

- Original Message - 
From: js [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Monday, April 07, 2008 2:28 PM
Subject: [jQuery] [validate] URL validation failing on a valid URL.




Is there a reason why URL validation is failing on the following URL?

http://purchase.tickets.com/buy/TicketPurchase?organ_val=22031perfcode=BD0608perfsubcode=2008

It works fine on any other URLs I've tried.
My jQuery code looks like this:

jQuery(document).ready(function($){
   $('#theForm').validate({
   errorClass: 'validationError',
   rules: {
   url: {
   url: true
   },
   email: {
   email: true
   }
   }
   });
}); 




[jQuery] Re: [validate] URL validation failing on a valid URL.

2008-04-07 Thread Jörn Zaefferer


js schrieb:

Is there a reason why URL validation is failing on the following URL?

http://purchase.tickets.com/buy/TicketPurchase?organ_val=22031perfcode=BD0608perfsubcode=2008

It works fine on any other URLs I've tried.
My jQuery code looks like this:

jQuery(document).ready(function($){
$('#theForm').validate({
errorClass: 'validationError',
rules: {
url: {
url: true
},
email: {
email: true
}
}
});
});
  
What version of the validation plugin are you using? The URL you gave 
validates just fine with 1.2.1.


Jörn



[jQuery] Re: Accordion: missing auto-close

2008-04-07 Thread [EMAIL PROTECTED]

Thank you, Jorn - I thought the UI docs had all been stashed in a
secret hideaway!

   An accordion doesn't allow more then one content panel to be open
at the same time

Looks like I've accidentally achieved something clever ;)

Cherry


On Apr 7, 6:39 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] schrieb: In the menus 
 here:http://vanilla-spa.homeholistics.com/treatments.htm
  , only the nested menu at the top auto-closes when you click another
  item. The main items remain open until you click them again. I don't
  think this is the default behaviour (I want only one item open at a
  time) but can't find much documentation for this plugin.

  Can anybody spot my mistake, please? [...]

 The documentation for the accordion plugin is located 
 here:http://docs.jquery.com/UI/Accordion
 Includinghttp://docs.jquery.com/UI/Accordion#What_this_isn.27t

 Jörn


[jQuery] Re: $(window).bind(load,function(){ vs onready

2008-04-07 Thread Nicolas R

well, for example, if you want to do something to your DOM elements
(divs, links, lists etc) and do it as quickly as possible then you
could use document.ready.

if on the other hand you are not in a hurry to change the state of
your DOM elements or the functionality you want to achieve is less
important than the images on your page, then go for window.load.

so if your doing a gallery and your images and all are more important
than having a news ticker or form validation or something like that,
then window.load may be a better choice. it all depends on what you
want to achieve, thats why there are two different events to choose
from


On Apr 8, 12:24 am, coughlinsmyalias [EMAIL PROTECTED] wrote:
 Thank you! What do you think is better to use? And when would you use
 one compared to another?

 Thanks!

 Ryan

 ps, ill check out the docs you supplied

 On Apr 7, 4:55 pm, MorningZ [EMAIL PROTECTED] wrote:

  Your browser window's Load event doesn't fire until the document is
  fully loaded (images and all)

  The Ready event fires when the DOM is ready

  More verbose description of Ready is in the docs

 http://docs.jquery.com/Events/ready


[jQuery] Re: [validate] Validate plugin 1.2.1 + masked input = errors on optional masked fields

2008-04-07 Thread Bryce Lohr

Hi Jörn,

Thanks for the quick suggestion. Unfortunately, simply setting up the
mask after the validation didn't change the behavior on my test form.
Tomorrow, I'll look closely at that Marketo example and see if I can
figure out what's going on. I'll post back with my results.

Thanks!
Bryce Lohr

On Apr 7, 4:53 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Bryce Lohr schrieb:

  Hi *,

  I've been using an old version of the Validate plugin (1.1.2) along
  with the Masked Input plugin. Today, I just upgraded to Validate 1.2.1
  and noticed it doesn't behave quite the same with the masked inputs.

  For example, I have two date fields, the first is required and the
  second is optional. Both are masked (99/99/, if it helps). If I
  tab through or click on the optional date field, I get a validation
  error (Please enter a valid date; the default message) on the
  optional field. I can still successfully submit the form, however.

  In version 1.1.2, this did not occur. I could tab or click through the
  optional date field without seeing an error. If I remove the input
  mask, it also works as expected. It appears that the empty mask (__/
  __/) is being passed to the date validation method, which, of
  course, fails. Also, I understand from the changelog that there were
  some non-trivial changes to how events are handled in the Validate
  plugin, starting at 1.2.0. Are these changes perhaps conflicting with
  the masked input plugin?

  Here is a minimal example form:
 http://www.gearheadsoftware.com/validate-masked.html

  View source to see the code. Changing this form to use Validate 1.1.2,
  with no other changes, gives the behavior I'm after.

 Since 1.2, the validation plugin uses event delegation for handling
 those events. This effects the order in which events are handled, which
 causes the issue.

 The masked-input plugin is part of the marketo 
 demo:http://jquery.bassistance.de/validate/demo/marketo/
 Worth noting is that the masked input is setup after the validation. In
 addition, handling keyup events is 
 disabled:http://jquery.bassistance.de/validate/demo/marketo/mktSignup.js

 So for a start, try to reverse the initialization order.

 Jörn


[jQuery] Select Tab Programatically

2008-04-07 Thread Mic

Hi,

I am a newby to jQuery and have a problem I can not figure out. I want
to be able to select a tab thru a link. In other words when a user
selects a link from a main menu, I want the corresponding tab to be
automatically selected. Suppose I have a menu with five options. If
the user selects the third menu option I would like to have the third
tab selected when the form loads. How is this done.
Thanks in advance for your time and patience.

Mic


[jQuery] Re: [validate] URL validation failing on a valid URL.

2008-04-07 Thread js

You are right.  Further tests show that it's only an issue in Safari
2.0.4.  It works fine in Safari 3+, Firefox 2+, IE6+.  Is Safari 2 in
the list of supported browsers for jquery.validate?

On Apr 7, 3:18 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 js schrieb:

  Is there a reason why URL validation is failing on the following URL?

 http://purchase.tickets.com/buy/TicketPurchase?organ_val=22031perfco...

  It works fine on any other URLs I've tried.
  My jQuery code looks like this:

  jQuery(document).ready(function($){
  $('#theForm').validate({
  errorClass: 'validationError',
  rules: {
  url: {
  url: true
  },
  email: {
  email: true
  }
  }
  });
  });

 What version of the validation plugin are you using? The URL you gave
 validates just fine with 1.2.1.

 Jörn


[jQuery] using jquery to load content of html file in a div

2008-04-07 Thread ktpmm5


My index html file is a nav menu with the following options:

   div class=arrowlistmenu
   h3 class=menuheader expandableParents/h3
   ul class=categoryitems
   li # Game Schedule /li
   li # Field Directions /li

Further on in my php file I have the following:
div id=contentcolumn
   ?php include(sked.html) ?
   ?php include(fielddir.html) ?


In my js file, I have the following:

$(document).ready(function() {
$('#game-sked').click(function(){
$('#sked').toggle('fast');
return false;
})
..   - similar for all my links

This works great for the first item selected - usually the game schedule.  I
have the game sked loading with tabs for Varsity, JV and Freshman.  It
displays using jquery and jtabs no problem.  The issue is after I choose
Game Schedule, I choose Field Directions and I want the appropriate html
file loaded.  It does load,but the jtabs stuff is not right - in other
words, each of the skeds (tables) is displayed one after the other -
obviously something is not being reset in jquery or jtabs.

Is there a better method?  Should I call the html file directly from my
javascript file?  If so, how do I tell it what div to load in?
-- 
View this message in context: 
http://www.nabble.com/using-jquery-to-load-content-of-html-file-in-a-div-tp16540876s27240p16540876.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: $(window).bind(load,function(){ vs onready

2008-04-07 Thread RobG



On Apr 8, 7:24 am, coughlinsmyalias [EMAIL PROTECTED] wrote:
 Thank you! What do you think is better to use? And when would you use
 one compared to another?

There is also the strategy of loading all your script files just
before the closing body tag, at that point you can run whatever script
you want.  It has the added benefits of being compatible in a wider
range of browsers that document.ready and your page will appear to
load faster than loading scripts in the head.


--
Rob


[jQuery] Re: find table column's (td's) header (th) ?

2008-04-07 Thread RobG



On Apr 8, 1:56 pm, R. Rajesh Jeba Anbiah
[EMAIL PROTECTED] wrote:
 I'm just wondering if there is any easy way to find out the header
 (th) of the table column (td)?
 Say,
 --
 | head1 | head2 |
 --
 | r11 |  r12 |
 --
 | r21 |  r22 |
 --

  Here, r22's heading is head2

You need to know what relationship that the header cell has with the
table cell.  In a table with one tbody and the header cells are just
the first row of the table (i.e. the header row is in the same
tableSectionElement as the table cell), then if td is the cell:

var headerCell =
  td.parentNode.parentNode.rows[0].cells[td.cellIndex];

If however the header cell is in a thead (which is a different
tableSectionElement), you will need an extra parentNode:

var headerCell =
  td.parentNode.parentNode.parentNode.rows[0].cells[td.cellIndex];


--
Rob


[jQuery] Re: find table column's (td's) header (th) ?

2008-04-07 Thread R. Rajesh Jeba Anbiah

On Apr 8, 9:56 am, RobG [EMAIL PROTECTED] wrote:
 On Apr 8, 1:56 pm, R. Rajesh Jeba Anbiah

 [EMAIL PROTECTED] wrote:
  I'm just wondering if there is any easy way to find out the header
  (th) of the table column (td)?
  Say,
  --
  | head1 | head2 |
  --
  | r11 |  r12 |
  --
  | r21 |  r22 |
  --

   Here, r22's heading is head2

 You need to know what relationship that the header cell has with the
 table cell.  In a table with one tbody and the header cells are just
 the first row of the table (i.e. the header row is in the same
 tableSectionElement as the table cell), then if td is the cell:

 var headerCell =
   td.parentNode.parentNode.rows[0].cells[td.cellIndex];

 If however the header cell is in a thead (which is a different
 tableSectionElement), you will need an extra parentNode:

 var headerCell =
   td.parentNode.parentNode.parentNode.rows[0].cells[td.cellIndex];

Superb. Thanks.

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