[jQuery] Re: Comparing Arrays

2007-11-01 Thread Michael Geary

Your first paragraph and second paragraph sound like two different
specifications.

Let's try a concrete example. Assume you have these two arrays:

[4,7,9,3,6]

[3,6,9,3,7]

What should the output be?

> Is there a function that exists for the purpose of comparing 
> two arrays and returning the values that are different? The 
> arrays I'm comparing are likely to contain all the same 
> values but in a different order. From what I read in the 
> jQuery docs there is no function to compare array orders.
> 
> I can think of a solution where I make a function to loop 
> through both arrays sequentially and simultaneously, 
> comparing each value pair and spitting out the ones that are 
> different. Does anyone know of a function that already does 
> this? If not, would it make a helpful plugin for jQuery?



[jQuery] Re: Comparing Arrays

2007-11-01 Thread Yehuda Katz


This is undocumented but try $(arr1).not(arr2).get()

Sent from my iPhone

On Nov 1, 2007, at 9:38 PM, Flesler <[EMAIL PROTECTED]> wrote:



Well.. you have jQuery.inArray, that will do part of the job. It gives
you the index of the given value in one array or -1.
jQuery.inArray( 1, [8,3,2,1,2] ) == 3. You must iterate and ask each
time whether the function returns -1.

No existing function that I know about.

On 1 nov, 18:26, rgrwkmn <[EMAIL PROTECTED]> wrote:

Is there a function that exists for the purpose of comparing two
arrays and returning the values that are different? The arrays I'm
comparing are likely to contain all the same values but in a  
different

order. From what I read in the jQuery docs there is no function to
compare array orders.

I can think of a solution where I make a function to loop through  
both

arrays sequentially and simultaneously, comparing each value pair and
spitting out the ones that are different. Does anyone know of a
function that already does this? If not, would it make a helpful
plugin for jQuery?




[jQuery] Re: Comparing Arrays

2007-11-01 Thread Flesler

Well.. you have jQuery.inArray, that will do part of the job. It gives
you the index of the given value in one array or -1.
jQuery.inArray( 1, [8,3,2,1,2] ) == 3. You must iterate and ask each
time whether the function returns -1.

No existing function that I know about.

On 1 nov, 18:26, rgrwkmn <[EMAIL PROTECTED]> wrote:
> Is there a function that exists for the purpose of comparing two
> arrays and returning the values that are different? The arrays I'm
> comparing are likely to contain all the same values but in a different
> order. From what I read in the jQuery docs there is no function to
> compare array orders.
>
> I can think of a solution where I make a function to loop through both
> arrays sequentially and simultaneously, comparing each value pair and
> spitting out the ones that are different. Does anyone know of a
> function that already does this? If not, would it make a helpful
> plugin for jQuery?



[jQuery] Re: Re[jQuery] sizing iframe

2007-11-01 Thread Karl Swedberg
I ran across this blog post a while back, showing how to resize  
iframes using jQuery. Maybe this one will work:


http://jbscdev.blogspot.com/2007/08/automatic-iframe-height-sizing- 
using.html



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



On Nov 1, 2007, at 7:23 PM, randomuser wrote:




Hey guys, im looking to dynamically resize an iframe to fit  
properly into a
page without scrolling. The iframe height is different page to page  
so the
iframe needs to be able to get bigger or smaller. Theres a thread  
over on
the  http://drupal.org/node/180625 Drupal forums  with the  
following code
that claims to resize the iframe but unfortunetly we've not been  
able to get

it to work.

Does this code work or is there a better way to do it?

We want to resize other websites pages so theres the cross domain  
security
issue but im assuming jquery can bypass this by retrieving the full  
page,

manipulating it and then displaying it.

We've been stuck on this problem for awhile now so any input would  
be great.



function doIframe(){
o = document.getElementsByTagName('iframe');
for(i=0;iView this message in context: http://www.nabble.com/Resizing-iframe- 
tf4730424s27240.html#a13526216
Sent from the jQuery General Discussion mailing list archive at  
Nabble.com.






[jQuery] Re: Alternatives to dom ready() for running Jquery code

2007-11-01 Thread Erik Beeson
Move your javascript to the bottom of the page, right before , or use
$(window).load(...) instead, if you can handle your javascript not running
until all of your external resources (read: images) have loaded.

I think this should be fixed "soon".

--Erik


On 11/1/07, Brett <[EMAIL PROTECTED]> wrote:
>
>
> Hey all, I've ran into a problem where I get code that runs
> occasionally on IE6 and IE7.  It's working fine in Firefox, of
> course :/
>
> The code I have is:
>
> $(document).ready(function(){
> //$(function()
>headline_count = $("div.headline").size();
>$("div.headline:eq("+current_headline+")").css('top','5px');
>
>headline_interval = setInterval(headline_rotate,9000); //time in
> milliseconds
>$('#scrollup').hover(function() {
>  clearInterval(headline_interval);
>}, function() {
>  headline_interval = setInterval(headline_rotate,9000); //time in
> milliseconds
>  headline_rotate();
>});
>
> function headline_rotate() {
>
>current_headline = (old_headline + 1) % headline_count;
>$("div.headline:eq(" + old_headline + ")").animate({top:
> -205},"slow", function() {
>  $(this).css('top','210px');
>});
>$("div.headline:eq(" + current_headline + ")").show().animate({top:
> 5},"slow");
>old_headline = current_headline;
> }
>
> // End of headline code
>
>
> });
>
> but I guess the important part is:
>
> $(document).ready(function(){   });
>
> Ready just doesn't seem to fire correctly for me all the time.
>
> Looking at a previous post which kind of covered this :
>
> http://groups.google.com/group/jquery-en/browse_thread/thread/ae511652b94433fa/819f718c882c9ba2?lnk=gst&q=ready()#819f718c882c9ba2
> They couldn't get a definate answer neither.
>
> I just want to ensure that the headlines do appear all the time, at
> the moment I'm left with a white box sometimes.
>
> live link to test is:
> http://cressaid.brettjamesonline.com/bvci/
>
>


[jQuery] Alternatives to dom ready() for running Jquery code

2007-11-01 Thread Brett

Hey all, I've ran into a problem where I get code that runs
occasionally on IE6 and IE7.  It's working fine in Firefox, of
course :/

 The code I have is:

$(document).ready(function(){
//$(function()
   headline_count = $("div.headline").size();
   $("div.headline:eq("+current_headline+")").css('top','5px');

   headline_interval = setInterval(headline_rotate,9000); //time in
milliseconds
   $('#scrollup').hover(function() {
 clearInterval(headline_interval);
   }, function() {
 headline_interval = setInterval(headline_rotate,9000); //time in
milliseconds
 headline_rotate();
   });

 function headline_rotate() {

   current_headline = (old_headline + 1) % headline_count;
   $("div.headline:eq(" + old_headline + ")").animate({top:
-205},"slow", function() {
 $(this).css('top','210px');
   });
   $("div.headline:eq(" + current_headline + ")").show().animate({top:
5},"slow");
   old_headline = current_headline;
 }

 // End of headline code


 });

but I guess the important part is:

$(document).ready(function(){   });

Ready just doesn't seem to fire correctly for me all the time.

Looking at a previous post which kind of covered this :
http://groups.google.com/group/jquery-en/browse_thread/thread/ae511652b94433fa/819f718c882c9ba2?lnk=gst&q=ready()#819f718c882c9ba2
They couldn't get a definate answer neither.

I just want to ensure that the headlines do appear all the time, at
the moment I'm left with a white box sometimes.

live link to test is:
http://cressaid.brettjamesonline.com/bvci/



[jQuery] Re: passing this

2007-11-01 Thread Jean-Sébastien

i just test it, it is just nice! and really usefull.

On Nov 2, 2:43 am, Danny <[EMAIL PROTECTED]> wrote:
> I played with this (and was inspired by the code 
> inhttp://blog.jcoglan.com/2007/10/30/asynchronous-function-chaining-in-...)
> and created a namespacing plugin:
>
> (function($){
>   $.namespace = function(ns, functions){
> $.fn[ns] = function() {return this.extend(functions)};
>   };
>   $.namespace('$', $.fn); // the default namespace
>
> })(jQuery);
>
> So now you can have a plugin:
> $.fn.func = function(){alert('plugin'); return this'};
>
> and create plugins in a namespace:
> $.namespace ('mynamespace', {
>   func: function() {alert('namespaced plugin'); return this;},
>   otherfunc: function() {return this.css('color', 'yellow');}
>
> });
>
> And if you do
> $('div').func(); // alerts 'plugin' -- no namespace
> But
> $('div').mynamespace().func(); // alerts 'namespaced plugin'
> And
> $('div').mynamespace().func().$().func(); // alerts 'namespaced
> plugin', then resets to the normal jquery and alerts 'plugin'
>
> Danny
>
> On Oct 28, 5:50 pm, Jean-Sébastien <[EMAIL PROTECTED]>
> wrote:
>
> > sorry, james i didn't see someone answer me.
> > what i want to do is ('div').set_of_plugins.choosen_plugin(). where
> > the first level (set_of_plugins) is kind of container (namespace) of
> > all my plugins. is it possible to do it?
>
> > On Oct 28, 5:20 pm, James Dempster <[EMAIL PROTECTED]> wrote:



[jQuery] Correct way to init functions? (jquery not always loading)

2007-11-01 Thread Brett

Here is some code here:


 $(function(){
 $('a.choicelist').bind(
'click',
'click',
function()
{
var targetElementSelectorString = 
$(this).attr('rel');
//alert(targetElementSelectorString)  
-- it returns the right
code

//$("#rightboxdiv:visible").slideUp("slow");
$("dd:visible").slideUp("slow");

$(targetElementSelectorString).parent().slideDown("fast");   //
the meat of it - how can I target using this?

//$pane4[0].scrollTo(targetElementSelectorString);
return false;

})
 });




Of that the first two lines are important:
 $(function(){
 $('a.choicelist').bind(

Sometimes this does not start in internet explorer 7 - Am I starting
it in the right way? I'm still getting confused about the right way to
Start jQuery up that works in all browsers all the time.

I've got a live link (will be up soon) if you'd like to try it, it is
to do with the navigation in the large left box.
http://cressaid.brettjamesonline.com/bvci/BVCI/products.html



[jQuery] Re: passing this

2007-11-01 Thread Danny

I played with this (and was inspired by the code in
http://blog.jcoglan.com/2007/10/30/asynchronous-function-chaining-in-javascript)
and created a namespacing plugin:

(function($){
  $.namespace = function(ns, functions){
$.fn[ns] = function() {return this.extend(functions)};
  };
  $.namespace('$', $.fn); // the default namespace
})(jQuery);

So now you can have a plugin:
$.fn.func = function(){alert('plugin'); return this'};

and create plugins in a namespace:
$.namespace ('mynamespace', {
  func: function() {alert('namespaced plugin'); return this;},
  otherfunc: function() {return this.css('color', 'yellow');}
});

And if you do
$('div').func(); // alerts 'plugin' -- no namespace
But
$('div').mynamespace().func(); // alerts 'namespaced plugin'
And
$('div').mynamespace().func().$().func(); // alerts 'namespaced
plugin', then resets to the normal jquery and alerts 'plugin'

Danny


On Oct 28, 5:50 pm, Jean-Sébastien <[EMAIL PROTECTED]>
wrote:
> sorry, james i didn't see someone answer me.
> what i want to do is ('div').set_of_plugins.choosen_plugin(). where
> the first level (set_of_plugins) is kind of container (namespace) of
> all my plugins. is it possible to do it?
>
> On Oct 28, 5:20 pm, James Dempster <[EMAIL PROTECTED]> wrote:
>





[jQuery] Re: doc type error when using corner plugin

2007-11-01 Thread Danny

I always get error when the server returns my 404 (page not found)
error page instead of the javascript file. Make sure the script file
with that name exists; I suspect you really want
'jquery.corner.js' (standard way to name plugins) rather than 'jquery-
corner.js'

On Oct 31, 11:24 pm, iain duncan <[EMAIL PROTECTED]> wrote:
> Hoping someone who knows about doctypes can help me out here. I am using
> kid templates with turbogears, so my html file has the following as it's
> first line.
>
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>
> Using Jquery and the jquery calendar plugin have been no problem, and I
> am also using MochiKit without problems. However, when I add in the
> jquery corner plugin I get this error:
>
> syntax error
> jquery-corner.js (line 1)
>  "http://www.w3.org/TR/html4/loose.dtd";>
>
> Any clues, much appreciated!
> Iain



[jQuery] Re: How to pull details info into master page (php/mysql)

2007-11-01 Thread Yehuda Katz




Sent from my iPhone

On Nov 1, 2007, at 5:29 PM, "Dave Buchholz - I-CRE8" <[EMAIL PROTECTED] 
> wrote:




I now have this working using the following code:

$(document).ready(function() {
 $('#view a').click(function() {
 $('#show-details').hide();
 $.get($(this).attr("href"), {}, function(data) {
   $('#show-details').html(data).fadeIn("slow");
   });
   return false;
 });
});


$("#show-details").load(this.href, function() { $(this).fadeIn 
("slow") });





Are there any glaring errors in my implementation that in my lack of
experience I would not see ?

Regards,


Dave Buchholz
I-CRE8
http://www.i-cre8.co.uk
Skype ID: I-CRE8


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]  
On

Behalf Of Dave Buchholz - I-CRE8
Sent: 31 October 2007 23:58
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to pull details info into master page (php/ 
mysql)




Adrian,

Yes manID will be different for each link, I have put up a page
http://www.i-cre8.co.uk/webassist/dataassist-master-detail-page-using-jquery
/manufacturer_Results.php showing what happens which is basically a  
blank

page after I click the view link containing the manID link.

I must be doing something wrong somewhere

Regards,


Dave Buchholz
I-CRE8
http://www.i-cre8.co.uk
Skype ID: I-CRE8



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]  
On

Behalf Of Adrian Lynch
Sent: 31 October 2007 21:51
To: jQuery (English)
Subject: [jQuery] Re: How to pull details info into master page (php/ 
mysql)



manID will be different for each link? Then don't put any PHP code  
in the

jQuery code, instead just access the links href:

$(document).ready(function () {
   $(".view-man").click(function () {
   $("#show-detail").load($(this).attr("href"));
   return false;
   });
});

Adrian



[jQuery] Re: Autoselect specific checkboxes based on select dropdown

2007-11-01 Thread Wizzud

Here's an alternative - and bear in mind that's all it is ... one
alternative.

var levels = { a6 : [1119,1123,1099] // bottom
 , a5 : [1086,1083,1079] // medium
 , a4 : [1081,1084,1082] // top
 }
   , boxes = $('input[name=permissionid]')
   ;
$('#accesslevel').change(function(){
var chk = levels['a'+$(':selected',this).val()] || [];
boxes.filter(function(){
return (this.checked ^ $.inArray(this.value, chk) >= 0);
  })
  .each(function(){ this.checked = !this.checked; });
  });

Couple of changes:
1. I'm using the option's value, purely because I could see no reason
not to when the value should be as unique as the bit you are
extracting from the text. If there is a specific reason for extracting
from the text then change the levels array accordingly and use $
(':selected',this).text().split(' / ')[0] in place of $
(':selected',this).val()
2. Your code excludes any processing on selection of the first option,
which is fine, but it leaves the checkboxes checked according to the
previous selection. My alternative doesn't. If you want to leave the
previously checked boxes on display if the first option is selected,
then simply change $(':selected',this) to $
(':not(:first):selected',this).


On Nov 1, 3:57 pm, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> A coworker needed to be able to select a series of checkboxes based on the
> value of a select dropdown. Here's what I came up with...I'm wondering how
> it could be improved.
>
> The dropdown:
>
> 
> select an access level
> 25 / Low Dealer
> 50 / Medium-High Dealer
> 75 / High Dealer
> 
>
> One of 40 or 50 checkboxes:
>  // value is the
> only thing that changes.
>
> Here's my code:
> // permission arrays
> var arr25 = [1119,1123,1099]; // bottom permission level
> var arr50 = [1086,1083,1079]; // medium permission level
> var arr75 = [1081,1084,1082]; // top permission level
>
> // assign change handler
> $('#accesslevel').change(function(){
>// get the TEXT of the selected option, not it's value
>var option = $(':selected',this).text().split(' / ')[0];
>// make sure the user didn't select the first option
>if (option != 'select an access level') {
>   // deselect all checkboxes
>   $('input[name=permissionid]').removeAttr("checked");
>   // use the array for the selected permission level
>   var curArr = eval('arr'+option);
>   // loop over the array
>   for (o=0;o < curArr.length; o++) {
>  // check every checkbox whose value is in this array
>  $('input[value=' + curArr[o] + ']').attr('checked','checked');
>   }
>}
>
> });
>
> 
>
> Andy Matthews
> Senior ColdFusion Developer
> Office:  877.707.5467 x747
> Direct:  615.627.9747
> Fax:  615.467.6249
> [EMAIL PROTECTED]



[jQuery] Re: How do you do Client/Server interaction? (CakePHP/JSON/jQuery)

2007-11-01 Thread McFadly

Hey Tane - check out cake's JavascriptHelper::object()

On Nov 1, 6:00 pm, "Tane Piper" <[EMAIL PROTECTED]>
wrote:
> Well, what would you know!  Having written out what I wanted to get,
> and by simply applying a little brainpower, I came up with the
> solution.  What I did was write a CakePHP component and helper.  First
> off, here is the component:
>
>  class JsonComponent extends Component {
> var $json_for_layout = array();
> function addToJSON($add = array()){
> $this->json_for_layout = array_merge($this->json_for_layout, 
> $add);
> }
> function getJSON() {
> return $this->json_for_layout;
> }}
>
> ?>
>
> What this component does is allows me to pass in arrays to a global
> array in the controller, json_for_layout.  Every time I call this from
> a controller, it add's to the array.  The next step is in my
> beforeRender() function in my AppController, I do this:
>
> $this->set('json_for_layout', $this->Json->getJSON());
>
> This sets my view variable.  I then need to actually generate the JSON
> and output it to a var:
>
>  class JsonHelper extends JavascriptHelper {
> function renderJSON($data, $varname = 'Pastemonkey'){
> $json = json_encode($data);
> $output = $this->codeBlock('var ' . $varname . ' = ' . $json 
> . ';');
> return $output;
> }}
>
> ?>
>
> Now, what I do is inside my header, I echo this out to the view:
>
> renderJSON($json_for_layout));?>
>
> And thats it!  Check your DOM tab in firebug to see the global object
> now available.
>
> For example, if I pass in my sitename, I can simply call it with:
>
> Pastemonkey.sitename
>
> Hope this helps out a few people, and I intend to write a more
> thorough blog about it tomorrow.
>
> On 01/11/2007, Tane Piper <[EMAIL PROTECTED]> wrote:
>
>
>
> > Apologies for the cross posting here, but I myself am at a bit of a
> > crossroads in my applications development, and I'd like to take the
> > time to put out this email in the hopes that it generates some good
> > discussion, and can maybe teach me a few things.
>
> > A little background first to my issues.  I am developing my
> > application at the moment (pastemonkey.org) and it's being built on
> > CakePHP and jQuery.  At the moment, I'm using a lot of CakePHP's built
> > in stuff to generate my HTML, and I'm using jQuery to do some simple
> > Ajax stuff and some DOM manipulation.
>
> > Where I am at a crossroads is how to do my client/server interaction
> > with JSON.  For example, I have the facility in place for inline
> > comments.  When you see a paste, you can double click on each line to
> > create and view the comments.  When you create one, there is code that
> > generates the comment and enters the line number and paste ID.
>
> > To display this, what I do is create an array of the line numbers, and
> > generate JSON using PHP's inbuilt functions.  So an array like this
> > ('1', '2', '10', '15') becomes ["1", "2", "10", "15"].  What I then do
> > is pass this to the view, and do this:
>
> > codeBlock('var lines = eval(' . $comment_lines . 
> > ')'));?>
>
> > So what this does is it outputs
>
> > var lines = eval( ["1", "2", "10", "15"]);
>
> > I then have this function in my core javascript file:
>
> > $('.geshi-output-view ol li').each(function(i){
> > i++;
> > $(this).attr('id', i);
> > if ($.inArray(i, lines) != -1) {
> > $(this).attr('style','').addClass('hasComment');
> > }
> > });
>
> > What I am doing here is expecting there to already be a variable set
> > called lines, and I check each line's ID (based on offset + 1) to see
> > if it's in the JSON array, and if it does apply the class.
>
> > It presents two issues - first it's ugly.  It means I always have to
> > have the javascript helper line above in any view I want to use it in,
> > and I also expect the variable to be there (in the case of the view it
> > always should be).  I'm wondering if anyone know a much nicer, more
> > global way to handle this?
>
> > For example, Is there any way in PHP to generate a global object?  For
> > example a Pastemonkey object that I can attach to.  e.g:
>
> > Pastemonkey.Settings.sitename
> > Pastemonkey.Comments[0]
> > Pastemonkey.User.Colour.Header
> > etc
>
> > I'm basically looking for the cleanest way to handle persistent data
> > from my server side that I can use client side with jQuery.
>
> > Thanks
>
> > --
> > Tane Piper
> > Blog -http://digitalspaghetti.me.uk
> > AJAX Pastebin -http://pastemonkey.org
>
> > This email is: [ ] blogable [ x ] ask first [ ] private
>
> --
> Tane Piper
> Blog -http://digitalspaghetti.me.uk
> AJAX Pastebin -http://pastemonkey.org
>
> This email is: [ ] blogable [ x ] ask first [ ] private



[jQuery] Re: How to pull details info into master page (php/mysql)

2007-11-01 Thread Dave Buchholz - I-CRE8

I now have this working using the following code:

$(document).ready(function() {
  $('#view a').click(function() {
  $('#show-details').hide();
$.get($(this).attr("href"), {}, function(data) {
$('#show-details').html(data).fadeIn("slow");
});
return false;
  });
});

Are there any glaring errors in my implementation that in my lack of
experience I would not see ?

Regards,


Dave Buchholz
I-CRE8
http://www.i-cre8.co.uk
Skype ID: I-CRE8


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Buchholz - I-CRE8
Sent: 31 October 2007 23:58
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to pull details info into master page (php/mysql)


 
Adrian,

Yes manID will be different for each link, I have put up a page
http://www.i-cre8.co.uk/webassist/dataassist-master-detail-page-using-jquery
/manufacturer_Results.php showing what happens which is basically a blank
page after I click the view link containing the manID link.

I must be doing something wrong somewhere

Regards,


Dave Buchholz
I-CRE8
http://www.i-cre8.co.uk
Skype ID: I-CRE8



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Adrian Lynch
Sent: 31 October 2007 21:51
To: jQuery (English)
Subject: [jQuery] Re: How to pull details info into master page (php/mysql)


manID will be different for each link? Then don't put any PHP code in the
jQuery code, instead just access the links href:

$(document).ready(function () {
$(".view-man").click(function () {
$("#show-detail").load($(this).attr("href"));
return false;
});
});

Adrian



[jQuery] Re: jQuery AJAX Docs

2007-11-01 Thread Dave Buchholz - I-CRE8

Thanks Bil

Regards,


Dave Buchholz
I-CRE8
http://www.i-cre8.co.uk
Skype ID: I-CRE8


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bil 
Corry
Sent: 01 November 2007 15:38
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery AJAX Docs


Dave Buchholz wrote on 10/31/2007 4:39 PM: 
> Are there any resources for newbies that explain how to do AJAX calls
> with jQuery ?

Go here:  

Follow the "Tutorials" link in the upper menu bar.  Scroll down to the section 
labeled "AJAX".


- Bil





[jQuery] Re: [NEWS] Site Using jQuery: TurboTax.com

2007-11-01 Thread Guy Fraser

polyrhythmic wrote:
> I think they just change the text size - I don't see an animation with
> firefox, the text is either large or small.  Note that the button does
> not change size, so I don't think it's an actual 'zoom'. ...Unless you
> guys see something different?
>   

Ah, you are correct, it's just setting different classes on the panels 
and they snap to the larger size as a result - no zooming involved.


[jQuery] simple table row pager

2007-11-01 Thread Korijn

I've been working on a simple pager function but it's incredibly
lengthy and I can imagine that it should be possible to do this much,
much more simpler and shorter. So I decided to post it up here and see
if anyone could give me some pointers. Thanks.

function pageMe(which, page, pager) {

// get vars
var those = "table."+which+" tbody tr";
var show = 10;
var total = Math.ceil(those.length / show);
var hideLs = page * show; // hide everything below this value
var hideLs2 = page * show - 1;
var hideEqGt = ( page + 1 ) * show; // hide everything equal to and
above this value
var pageShow = page + 1;

// get selectors
var first = those+":lt("+hideLs+")";
var second = those+":gt("+hideEqGt+")";
var third = those+":eq("+hideEqGt+")";
var fourth = those+":gt("+hideLs2+"):lt("+hideEqGt+")";

// show the correct rows and hide all other rows
$(fourth).show();
$(first).hide();
$(second).hide();
$(third).hide();

// build the pager
var pagerHTML = "Vorige "+pageShow+"/"+total+" Volgende ("+show+" rijen per pagina)";
$("#"+pager).empty().append(pagerHTML);

// actions
$("#pagerBack").click(function() {
if((page - 1) > -1) {
page -= 1;
var hideLs = page * show; // hide everything below this 
value
var hideLs2 = page * show - 1;
var hideEqGt = ( page + 1 ) * show; // hide everything 
equal to and
above this value
var pageShow = page + 1;

// get selectors
var first = those+":lt("+hideLs+")";
var second = those+":gt("+hideEqGt+")";
var third = those+":eq("+hideEqGt+")";
var fourth = those+":gt("+hideLs2+"):lt("+hideEqGt+")";

// show the correct rows and hide all other rows
$(fourth).show();
$(first).hide();
$(second).hide();
$(third).hide();

// adjust page counter
$("#pagerPage").empty().append(pageShow+"/"+total);
}
});
$("#pagerNext").click(function() {
if((page + 1) < total) {
page += 1;
var hideLs = page * show; // hide everything below this 
value
var hideLs2 = page * show - 1;
var hideEqGt = ( page + 1 ) * show; // hide everything 
equal to and
above this value
var pageShow = page + 1;

// get selectors
var first = those+":lt("+hideLs+")";
var second = those+":gt("+hideEqGt+")";
var third = those+":eq("+hideEqGt+")";
var fourth = those+":gt("+hideLs2+"):lt("+hideEqGt+")";

// show the correct rows and hide all other rows
$(fourth).show();
$(first).hide();
$(second).hide();
$(third).hide();

// adjust page counter
$("#pagerPage").empty().append(pageShow+"/"+total);
}
});

}

HTML example:


  
  

  
  
  
  

  
  

  
  

  
  n-rows
  




[jQuery] Re: Canceling an animation

2007-11-01 Thread Yehuda Katz


You can cancel an animation via $().stop

Sent from my iPhone

On Nov 1, 2007, at 5:17 PM, "S. Robert James" <[EMAIL PROTECTED]>  
wrote:




I have an animation that runs after a delay:

setTimeout(function(){$(".mbox").fadeIn('slow');},500);

If I need to cancel it, how do I this?
I would like to cancel it regardless of whether it is still in the
initial setTimeout of 500ms, or has already started to fadeIn.



[jQuery] Canceling an animation

2007-11-01 Thread S. Robert James

I have an animation that runs after a delay:

setTimeout(function(){$(".mbox").fadeIn('slow');},500);

If I need to cancel it, how do I this?
I would like to cancel it regardless of whether it is still in the
initial setTimeout of 500ms, or has already started to fadeIn.



[jQuery] Re: How do you do Client/Server interaction? (CakePHP/JSON/jQuery)

2007-11-01 Thread Tane Piper

Well, what would you know!  Having written out what I wanted to get,
and by simply applying a little brainpower, I came up with the
solution.  What I did was write a CakePHP component and helper.  First
off, here is the component:

json_for_layout = array_merge($this->json_for_layout, 
$add);
}
function getJSON() {
return $this->json_for_layout;
}
}
?>

What this component does is allows me to pass in arrays to a global
array in the controller, json_for_layout.  Every time I call this from
a controller, it add's to the array.  The next step is in my
beforeRender() function in my AppController, I do this:

$this->set('json_for_layout', $this->Json->getJSON());

This sets my view variable.  I then need to actually generate the JSON
and output it to a var:

codeBlock('var ' . $varname . ' = ' . $json . 
';');
return $output;
}
}
?>

Now, what I do is inside my header, I echo this out to the view:

renderJSON($json_for_layout));?>

And thats it!  Check your DOM tab in firebug to see the global object
now available.

For example, if I pass in my sitename, I can simply call it with:

Pastemonkey.sitename

Hope this helps out a few people, and I intend to write a more
thorough blog about it tomorrow.

On 01/11/2007, Tane Piper <[EMAIL PROTECTED]> wrote:
> Apologies for the cross posting here, but I myself am at a bit of a
> crossroads in my applications development, and I'd like to take the
> time to put out this email in the hopes that it generates some good
> discussion, and can maybe teach me a few things.
>
> A little background first to my issues.  I am developing my
> application at the moment (pastemonkey.org) and it's being built on
> CakePHP and jQuery.  At the moment, I'm using a lot of CakePHP's built
> in stuff to generate my HTML, and I'm using jQuery to do some simple
> Ajax stuff and some DOM manipulation.
>
> Where I am at a crossroads is how to do my client/server interaction
> with JSON.  For example, I have the facility in place for inline
> comments.  When you see a paste, you can double click on each line to
> create and view the comments.  When you create one, there is code that
> generates the comment and enters the line number and paste ID.
>
> To display this, what I do is create an array of the line numbers, and
> generate JSON using PHP's inbuilt functions.  So an array like this
> ('1', '2', '10', '15') becomes ["1", "2", "10", "15"].  What I then do
> is pass this to the view, and do this:
>
> codeBlock('var lines = eval(' . $comment_lines . ')'));?>
>
> So what this does is it outputs
>
> var lines = eval( ["1", "2", "10", "15"]);
>
> I then have this function in my core javascript file:
>
> $('.geshi-output-view ol li').each(function(i){
> i++;
> $(this).attr('id', i);
> if ($.inArray(i, lines) != -1) {
> $(this).attr('style','').addClass('hasComment');
> }
> });
>
> What I am doing here is expecting there to already be a variable set
> called lines, and I check each line's ID (based on offset + 1) to see
> if it's in the JSON array, and if it does apply the class.
>
> It presents two issues - first it's ugly.  It means I always have to
> have the javascript helper line above in any view I want to use it in,
> and I also expect the variable to be there (in the case of the view it
> always should be).  I'm wondering if anyone know a much nicer, more
> global way to handle this?
>
> For example, Is there any way in PHP to generate a global object?  For
> example a Pastemonkey object that I can attach to.  e.g:
>
> Pastemonkey.Settings.sitename
> Pastemonkey.Comments[0]
> Pastemonkey.User.Colour.Header
> etc
>
> I'm basically looking for the cleanest way to handle persistent data
> from my server side that I can use client side with jQuery.
>
> Thanks
>
> --
> Tane Piper
> Blog - http://digitalspaghetti.me.uk
> AJAX Pastebin - http://pastemonkey.org
>
> This email is: [ ] blogable [ x ] ask first [ ] private
>


-- 
Tane Piper
Blog - http://digitalspaghetti.me.uk
AJAX Pastebin - http://pastemonkey.org

This email is: [ ] blogable [ x ] ask first [ ] private


[jQuery] Re: Submit event

2007-11-01 Thread Wizzud

function checkRadio() {
  var rtn = ($('input.amount:checked').length > 0);
  $("#billing").css( { color : (rtn ? '#658300' :
'#C60006') } ).show();
  return rtn;
};

On Nov 1, 2:57 pm, choffman <[EMAIL PROTECTED]> wrote:
> Hi There,
> I could use some jquery help here.  This probably something very
> simple that I'm missing.  I started using jquery a few weeks ago so
> please bear with me.
>
> In a nut shell, when a user submits the form (form id="register"), I
> want it check to make sure they have selected a radio button
> (class="amount").  If they forgot, I want it turn the #billing id ( id="billing>) red.   I have server side validation working using PHP.
> This is more of a visual indicator. I'm using the validate.js plug-in
> and jquery 1.2.1.  Any help would be great!
>
> $(document).ready(function() {
> $("#register").submit( function() {
> checkRadio();
> });
>
> function checkRadio() {
> $('input.amount').each(function() {
> if ($('input:unchecked')) {
> $("#billing").css('color', '#658300').show();
> return true;
> } else {
> $("#billing").css('color', '#C60006').show();
> return false;
> }
> });
> //close function
> };
>
> });



[jQuery] Using Firefox's pageshow with jQuery

2007-11-01 Thread S. Robert James

Firefox provides pageshow and pagehide events, to handle page being
refereshed from cache: quite useful! 
http://developer.mozilla.org/en/docs/Using_Firefox_1.5_caching

Unfortunately, as far as I can tell, jQuery simply won't bind to them!

  Anyone know of a way to bind to those events with jQuery?

See also 
http://my.opera.com/hallvors/blog/2007/03/14/firefoxs-pageshow-and-pagehide-events-not-dom2-events-compatible
which seems to note the problem.



[jQuery] Re[jQuery] sizing iframe

2007-11-01 Thread randomuser


Hey guys, im looking to dynamically resize an iframe to fit properly into a
page without scrolling. The iframe height is different page to page so the
iframe needs to be able to get bigger or smaller. Theres a thread over on
the  http://drupal.org/node/180625 Drupal forums  with the following code
that claims to resize the iframe but unfortunetly we've not been able to get
it to work.

Does this code work or is there a better way to do it?

We want to resize other websites pages so theres the cross domain security
issue but im assuming jquery can bypass this by retrieving the full page,
manipulating it and then displaying it.

We've been stuck on this problem for awhile now so any input would be great.


function doIframe(){
o = document.getElementsByTagName('iframe');
for(i=0;ihttp://www.nabble.com/Resizing-iframe-tf4730424s27240.html#a13526216
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Slickspeed from Mootools

2007-11-01 Thread prit

Thanks for the guidelines. I should have searched here and also
google. But your comments helped me. :)

On Nov 1, 4:03 pm, Pops <[EMAIL PROTECTED]> wrote:
> Whoa! Rey, what a different between IE and FF.
>
> I am not interested in the half-truths in any of this, but rather what
> does the test show to improve jQuery, if anything?
>
> --
> HLS
>
> On Nov 1, 1:59 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
>
> > Hi Prit,
>
> > Please do a search in the archives for this topic. Just as early as last
> > week, I posted a response to this.
>
> > Also, be sure to run the same test in IE so you can see totally
> > different results. My post goes into detail about that as well.
>
> > Thanks,
>
> > Rey...
>
> > prit wrote:
> > > I have tried different javascript frameworks and I finally decided to
> > > use jQuery because of the ease of use and all the good plugins
> > > available.
>
> > > But recently I noticed a websitehttp://mootools.net/slickspeed/which
> > > compares 3 frameworks including jQuery. I ran the tests on that site
> > > and noticed that they show jQuery as the slowest performer out of the
> > > 3 frameworks (Mootools, Prototype and jQuery).
>
> > > Does anybody have comments on this ?
>
> > > Thanks,
> > > Prit



[jQuery] Re: Slickspeed from Mootools

2007-11-01 Thread Pops

Whoa! Rey, what a different between IE and FF.

I am not interested in the half-truths in any of this, but rather what
does the test show to improve jQuery, if anything?

--
HLS

On Nov 1, 1:59 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> Hi Prit,
>
> Please do a search in the archives for this topic. Just as early as last
> week, I posted a response to this.
>
> Also, be sure to run the same test in IE so you can see totally
> different results. My post goes into detail about that as well.
>
> Thanks,
>
> Rey...
>
> prit wrote:
> > I have tried different javascript frameworks and I finally decided to
> > use jQuery because of the ease of use and all the good plugins
> > available.
>
> > But recently I noticed a websitehttp://mootools.net/slickspeed/which
> > compares 3 frameworks including jQuery. I ran the tests on that site
> > and noticed that they show jQuery as the slowest performer out of the
> > 3 frameworks (Mootools, Prototype and jQuery).
>
> > Does anybody have comments on this ?
>
> > Thanks,
> > Prit



[jQuery] Re: Scrolling a div area without scrolling the page?

2007-11-01 Thread marcmesa

Josh, take a look at http://jquery.com/plugins/project/Coda-Slider

On 25 Oct, 05:38, Josh V <[EMAIL PROTECTED]> wrote:
> guys, any horizontal scrolling? just 
> like,www.panic.com/codaandhttp://www.hbcweb.com/
>
> On Sep 11, 10:23 am, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
> wrote:
>
> > Checkjscrollpane, it has a very nice
> > $('#anchorlink").scrollTo('#anchorTarget'); functionality
>
> >http://kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> > Behalf Of Steve Browett
> > Sent: mardi 11 septembre 2007 10:59
> > To: jQuery (English)
> > Subject: [jQuery] Re: Scrolling a div area without scrolling the page?
>
> > Hi,
>
> > I'm looking for a similar thing and found 
> > this:http://www.ajaxdaddy.com/demo-jquery-carousel.html
>
> > Hope it helps!
>
> > On Aug 10, 3:21 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
> > > Hi,
>
> > > I don't know if jquery will be able to address this but I thought I
> > > would try anyway.
>
> > > Is there a way to scroll a div area (which has an overflow:auto) to an
> > > anchor point within the div without scrolling the page (i.e., the page
> > > should remain stationary)?  In other words, is there a way to use
> > > jquery to animate the div when an anchor tag is clicked?
>
> > > I've coded a basic html example
> > athttp://matthewmoore.info/jquery/example.html.
> > > You'll see the page scroll when you click on a letter at the top of
> > > the div.
>
> > > Any ideas?
>
> > > Thanks in advance,
> > > Matthew
>
> > Ce message Envoi est certifié sans virus connu.
> > Analyse effectuée par AVG.
> > Version: 7.5.485 / Base de données virus: 269.13.14/999 - Date: 10/09/2007
> > 17:43



[jQuery] Re: manipulation on content results in text you can't trigger events with

2007-11-01 Thread MajorXP

I figured out a solution and wanted to run it by some other eyes
Essentially the solution was to re-call the popup function.  Since
that worked, I had to also test adding future rows and ran into double
popups, so I changed the class and jquery magically remembered the old
class (as I had hoped).   Pretty cool.




  Test Pop
  



  $(document).ready(function(){
var i=10;
for (i;i>=1;i--) {
 $('#start').after("");
}

  test();
  $('.popup').addClass('newpopup').removeClass('popup');
  test2();
  });

  function test(){
i=10;
for (i;i>=5;i--) {
  $('#'+i).after("").remove();
}
  pop();
  }

  function test2(){
i=15;
for (i;i>=11;i--) {
  $('#10').after("");
}
  pop();
  }

  function pop(){
$('.popup').click(function(){
  alert(this.id);
  return false;
});
  }


Hard code #1
Hard code #2




On Nov 1, 3:25 pm, Tobias Parent <[EMAIL PROTECTED]> wrote:
> Well, you've attached the event, then gone ahead and created more divs
> and expect them to be forward-attached. You may want to look at
> something like LiveQuery.
>
> Regards,
>  -Toby P.
>



[jQuery] Re: .mouseover performance

2007-11-01 Thread Tony

Insert .stop() before .animate(...) :

$("div").stop().animate({
width: $(this).width(),
marginLeft: $(this).offset().left
}
,"slow"
);

--Tony

On 10月31日, 下午4�r32分, Cloudream <[EMAIL PROTECTED]> wrote:
> http://labs.cloudream.name/jquery/move.html
>
> executes slowly in every browser i tested,IE7/FF2/OP9/SA3...
>
> any error in my code?



[jQuery] Comparing Arrays

2007-11-01 Thread rgrwkmn

Is there a function that exists for the purpose of comparing two
arrays and returning the values that are different? The arrays I'm
comparing are likely to contain all the same values but in a different
order. From what I read in the jQuery docs there is no function to
compare array orders.

I can think of a solution where I make a function to loop through both
arrays sequentially and simultaneously, comparing each value pair and
spitting out the ones that are different. Does anyone know of a
function that already does this? If not, would it make a helpful
plugin for jQuery?



[jQuery] clueTips hangs on FF with $ signs in the ajax data.

2007-11-01 Thread vwRiver

I am playing the clueTips  and get this problem:

I tried to get the content via ajax, but there are $ signs in the
content. The clueTip works fine on IE+XP and Konqueror+Linux, but it
hangs if there are $ signs in the ajax data. otherwise, it is just
fine.

How to deal with this? Thanks a lot.

VW



[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread MorningZ

I just have a small usuability suggestion for a future release

In the "Date Range" implementation, make it so you could pick the
either start or end date at any time...

so just say a user choses "Nov 20th" first, then selects "Nov
5th" (whcih currently isn't possible as it "locks out" previous
dates), it should be an easy check to flip-flop the dates so the first
selection is the end date and the second selection is the begin

Just a suggestion to a top notch date picker



[jQuery] Re: Custom function called in toogle()

2007-11-01 Thread Wizzud

Calling toggle() runs event.preventDefault.
Whatever you want the click to do, you need to code it yourself.

On Nov 1, 9:44 am, Snook <[EMAIL PROTECTED]> wrote:
> Thanks a lot Wizzud. This works fine.
>
> But did you have an idea why the checkbox didn't display the check
> mark when there are checked ?
>
> The checkbox are used to run the toggle function.
>
> Damien



[jQuery] Re: Is it possible to alter internal CSS properties?

2007-11-01 Thread Danny

I actually wrote a plugin that may be helpful (worked with jQuery 1.1,
Firefox and Internet Explorer. I haven't updated it since)
See http://www.nabble.com/Creating-stylesheets-in-jQuery-tf3298905.html#a9176651
Lets you write $.style('.someClass').css('background-color',
'yellow');

On Nov 1, 5:17 pm, Danny <[EMAIL PROTECTED]> wrote:
> You can manipulate stylesheets, though it's not pretty (or built-in to
> jQuery; you could write plugins to do it).
> Seehttp://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript
>
> On Nov 1, 4:24 am, "Jesse Klaasse" <[EMAIL PROTECTED]> wrote:
>
>
>
> > As we all know, we can do the following using jQuery:
>
> > $('.someClass').css("background-color: yellow");
>
> > This first matches all elements which have the class someClass, and then
> > alters the css of the matched elements.
> > This won't work when the class is dynamically added somewhere in the
> > page, for example on a mouseover.
>
> > Is it somehow possible to really alter the internal style sheet
> > definition, in order to reflect the wanted changes when a class is
> > dynamically added?
>
> > My guess is that this is not possible at all, but I'm not sure.. Any
> > ideas? Thanks!- Hide quoted text -
>
> - Show quoted text -



[jQuery] How do you do Client/Server interaction? (CakePHP/JSON/jQuery)

2007-11-01 Thread Tane Piper

Apologies for the cross posting here, but I myself am at a bit of a
crossroads in my applications development, and I'd like to take the
time to put out this email in the hopes that it generates some good
discussion, and can maybe teach me a few things.

A little background first to my issues.  I am developing my
application at the moment (pastemonkey.org) and it's being built on
CakePHP and jQuery.  At the moment, I'm using a lot of CakePHP's built
in stuff to generate my HTML, and I'm using jQuery to do some simple
Ajax stuff and some DOM manipulation.

Where I am at a crossroads is how to do my client/server interaction
with JSON.  For example, I have the facility in place for inline
comments.  When you see a paste, you can double click on each line to
create and view the comments.  When you create one, there is code that
generates the comment and enters the line number and paste ID.

To display this, what I do is create an array of the line numbers, and
generate JSON using PHP's inbuilt functions.  So an array like this
('1', '2', '10', '15') becomes ["1", "2", "10", "15"].  What I then do
is pass this to the view, and do this:

codeBlock('var lines = eval(' . $comment_lines . ')'));?>

So what this does is it outputs

var lines = eval( ["1", "2", "10", "15"]);

I then have this function in my core javascript file:

$('.geshi-output-view ol li').each(function(i){
i++;
$(this).attr('id', i);
if ($.inArray(i, lines) != -1) {
$(this).attr('style','').addClass('hasComment');
}
});

What I am doing here is expecting there to already be a variable set
called lines, and I check each line's ID (based on offset + 1) to see
if it's in the JSON array, and if it does apply the class.

It presents two issues - first it's ugly.  It means I always have to
have the javascript helper line above in any view I want to use it in,
and I also expect the variable to be there (in the case of the view it
always should be).  I'm wondering if anyone know a much nicer, more
global way to handle this?

For example, Is there any way in PHP to generate a global object?  For
example a Pastemonkey object that I can attach to.  e.g:

Pastemonkey.Settings.sitename
Pastemonkey.Comments[0]
Pastemonkey.User.Colour.Header
etc

I'm basically looking for the cleanest way to handle persistent data
from my server side that I can use client side with jQuery.

Thanks

-- 
Tane Piper
Blog - http://digitalspaghetti.me.uk
AJAX Pastebin - http://pastemonkey.org

This email is: [ ] blogable [ x ] ask first [ ] private


[jQuery] Re: Is it possible to alter internal CSS properties?

2007-11-01 Thread Danny

You can manipulate stylesheets, though it's not pretty (or built-in to
jQuery; you could write plugins to do it).
See http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript

On Nov 1, 4:24 am, "Jesse Klaasse" <[EMAIL PROTECTED]> wrote:
> As we all know, we can do the following using jQuery:
>
> $('.someClass').css("background-color: yellow");
>
> This first matches all elements which have the class someClass, and then
> alters the css of the matched elements.
> This won't work when the class is dynamically added somewhere in the
> page, for example on a mouseover.
>
> Is it somehow possible to really alter the internal style sheet
> definition, in order to reflect the wanted changes when a class is
> dynamically added?
>
> My guess is that this is not possible at all, but I'm not sure.. Any
> ideas? Thanks!



[jQuery] Re: Defining and using of JSON defaults/options

2007-11-01 Thread Danny

I believe the syntax is (not tested):

$(e).parent().next()[utoggle.animationType](uToggle.speed);
Javascript objects are associative arrays.
Danny

On Nov 1, 3:29 am, Olaf Gleba <[EMAIL PROTECTED]> wrote:
> Little Correction for the second example (needless '()' in chain).
>
> Am 01.11.2007 um 09:22 schrieb Olaf Gleba:
>
> > Example (doesn't works):
>
> > var uToggle = {
> >animationType: 'fadeIn',
> >speed: 'fast'
> >...
>
> >xxx: function(e) {
> >$(e).parent().next().uToggle.animationType()(uToggle.speed);
> >}
> > };
>
> ...
> xxx: function(e) {
> $(e).parent().next().uToggle.animationType(uToggle.speed);
> ...
>
> --
> Olaf Gleba : creatics media.systems
> tel. +49 (0)212 38 32 94 30 : fax. +49 (0)212 38 32 94 31
> [EMAIL PROTECTED] :http://www.creatics.dehttp://www.creatics.de/keys/



[jQuery] Re: Slickspeed from Mootools

2007-11-01 Thread Benjamin Sterling
Karl,
Very well put, someone would think you were a English teacher at one point.
:)

On 11/1/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> In addition to Rey's points, it's worth noting that the test is pretty
> flawed for a number of reasons, not the least of which is that the DOM
> structure of the test page is ridiculous and not at all similar to what you
> might see on a typical commercial site or blog. I should know, because I'm
> the one who put the test page together (the one the test is run against, not
> the test itself). I just grabbed a section of Act I, Scene 3 ,of
> Shakespeare's As You Like It and wrapped a bunch of divs around the
> dialogue, etc. Hardly representative. I think you might be able to customize
> the test to run on other pages, and I would recommend you do so on your own
> site if you want anything resembling a "real-world" scenario. Another
> problem, at least last time I checked, is the way it handles errors. In a
> way, it "prefers" errors by giving them a time somewhere between 0ms and
> 15ms, which would obviously benefit the particular library that fails.
> The slickspeed test has been discussed on a number of blogs as well,
> including a good dissection of it over at Jack Slocum's blog (back in
> February? April maybe?. Anyway, a quick Google search should make any
> reasonable person uneasy about relying on that test too much, especially in
> a single browser.
>
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
> On Nov 1, 2007, at 1:59 PM, Rey Bango wrote:
>
>
> Hi Prit,
>
> Please do a search in the archives for this topic. Just as early as last
> week, I posted a response to this.
>
> Also, be sure to run the same test in IE so you can see totally different
> results. My post goes into detail about that as well.
>
> Thanks,
>
> Rey...
>
> prit wrote:
>
> I have tried different javascript frameworks and I finally decided to
> use jQuery because of the ease of use and all the good plugins
> available.
> But recently I noticed a website http://mootools.net/slickspeed/ which
> compares 3 frameworks including jQuery. I ran the tests on that site
> and noticed that they show jQuery as the slowest performer out of the
> 3 frameworks (Mootools, Prototype and jQuery).
> Does anybody have comments on this ?
> Thanks,
> Prit
>
>
>


-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com


[jQuery] Treeview and IE "object doesn't support this object or method"

2007-11-01 Thread cfdvlpr

I'm getting this error in IE, but not Firefox.
It borks on this line: $("#pageNav").Treeview({speed: "fast",
collapsed: true, openurl: true});



$(function(){
$("#pageNav").Treeview({speed: "fast", collapsed: true, 
openurl:
true});
$("#pageNav").show();
});
});


Any idea what causes this error?



[jQuery] Re: Form function no firing

2007-11-01 Thread Josh Nathanson


I see the problem.  This line:
if ( $(this).attr("checked", true) )

Should be:
if( $(this).attr("checked") )
or, similarly
if( $(this).is(":checked") )

What you are doing with your current code is actually setting the radio to 
checked=true -- when the "attr" method has two arguments, the first argument 
is set to the value of the second.  When the "attr" method has one argument, 
it returns the value of the argument.


- Josh


- Original Message - 
From: "choffman" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Thursday, November 01, 2007 12:52 PM
Subject: [jQuery] Re: Form function no firing




Hi Josh,
Thanks for getting back to me.  I'm not going to be using the Validate
plug-in.  I think this can be done with jquery alone.  It doesn't seem
all that complex.  The main issue at the moment is getting the event-
handler to run the function (checkRadio) when the submit button is
pressed.  I changed the script a little bit since the original post.
I'm open to any advisement and code snippets.  Mentioned earlier, I
started using jquery a few weeks ago so please bear with me.  The main
goal of the script is make the  tag red if they skip
the radio buttons. Thanks - CH

$("#register").submit( function() {
checkRadio();
});

function checkRadio () {
$('input.amount').each(function() {
if ($(this).attr("checked", true)) {
return true;
} else {
$("#billing").css('color', '#C60006').show();
return false;
}
//close function
}



On Nov 1, 12:57 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:

It doesn't look like you are using the Validate plugin in the way it's
intended.  You might want to have a look at the plugin's home page for 
more

information on its usage.

Your submit function should look something like:
$("#register").submit(function() {
$(this).validate(options);

});

...where options contains the Validation configuration object, which is
where validation rules, messages, and error placements are set up.

-- Josh

- Original Message -
From: "choffman" <[EMAIL PROTECTED]>
To: "jQuery (English)" 
Sent: Thursday, November 01, 2007 9:58 AM
Subject: [jQuery] Form function no firing

> Hi There,
> I could use some jquery help here.  Its probably something very simple
> that I'm missing.  I started using jquery a few weeks ago so please
> bear with me.

> In a nut shell, when a user submits the form (form id="register"), I
> want it check to make sure they have selected a radio button
> (class="amount").  If they forgot, I want it turn the #billing id ( id="billing>) red.   I have server side validation working using PHP.
> This is more of a visual indicator. I'm using the validate.js plug-in
> and jquery 1.2.1.  Any help would be great!

> $(document).ready(function() {
> $("#register").submit( function() {
> checkRadio();
> });

> function checkRadio() {
> $('input.amount').each(function() {
> if ($('input:unchecked')) {
> $("#billing").css('color', '#658300').show();
> return true;
> } else {
> $("#billing").css('color', '#C60006').show();
> return false;
> }
> });
> //close function
> };
> });






[jQuery] Re: having issues with getJSON

2007-11-01 Thread Benjamin Sterling
MF,
Thanks for the response, yeah, that was the case and I have since fixed it.
Thanks again.

Benjamin Sterling

On 11/1/07, MF <[EMAIL PROTECTED]> wrote:
>
>
> It looks like jquery populates the "_" parameter with a timestamp to
> defeat any request-caching, and google/picasa does not like extra
> parameters in its requests.  As a workaround, you can disable this by
> setting jQuery.ajaxSettings.cache = true before calling $.getJSON, and
> restore its original value after the call if desired.
>
> I am pretty sure that the jsonp callback name which is generated for
> anonymous functions (i.e. those passed inline to the getJSON call) is
> unique, so you should not see any caching of the requests even with
> the "_" parameter removed.
>
> - MF
>
>


-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com


[jQuery] Re: manipulation on content results in text you can't trigger events with

2007-11-01 Thread Tobias Parent


Well, you've attached the event, then gone ahead and created more divs 
and expect them to be forward-attached. You may want to look at 
something like LiveQuery.


Regards,
-Toby P.

MajorXP wrote:

I'm sure this was covered somewhere, but I can't find it.  I'm
struggling with some code and rather than try to explain it, first
look at this code.  It should be simple to follow, but when you run it
- it doesn't work as intended.

--


  Pop Test
  



  $(document).ready(function(){
var i=10;
for (i;i>=1;i--) {
 $('#start').after("");
}

$('.popup').click(function(){
  alert(this.id);
  return false;
});

i=10;
for (i;i>=5;i--) {
 $('#'+i).after("").remove();
}
  });


Hard code #1
Hard code #2


--

As you can see, the new text does not fire the click event when
clicked.  I'm sure it is because it is located after the popup alert
code.

All that said, how would you generate new text and allow events to be
fired?  I'm grabbing text from a database and updating it.  I'd like
to have a popup on click.


  




[jQuery] Re: Selector for Toggled Element

2007-11-01 Thread motob

try $("table:hidden") or some form of that.

On Nov 1, 2:30 pm, studiobl <[EMAIL PROTECTED]> wrote:
> I'm trying to write an if statement based on the toggled state of an
> element (a table, in this case).  Attempting to select the table by
> any combination of id, class, and/or element type doesn't work.  Using
> Firefox, I can see that the table is toggled between display:table and
> display:hidden.  The selector that jQuery appears do be using is
> element.style.  This selector is apparently built on-the-fly, as it's
> not one of mine.
>
> I thought 'aha, select it by using $("element.style")!'  This didn't
> work.
>
> Any suggestions on how to retrieve the display attribute of a toggled
> element?



[jQuery] manipulation on content results in text you can't trigger events with

2007-11-01 Thread MajorXP

I'm sure this was covered somewhere, but I can't find it.  I'm
struggling with some code and rather than try to explain it, first
look at this code.  It should be simple to follow, but when you run it
- it doesn't work as intended.

--


  Pop Test
  



  $(document).ready(function(){
var i=10;
for (i;i>=1;i--) {
 $('#start').after("");
}

$('.popup').click(function(){
  alert(this.id);
  return false;
});

i=10;
for (i;i>=5;i--) {
 $('#'+i).after("").remove();
}
  });


Hard code #1
Hard code #2


--

As you can see, the new text does not fire the click event when
clicked.  I'm sure it is because it is located after the popup alert
code.

All that said, how would you generate new text and allow events to be
fired?  I'm grabbing text from a database and updating it.  I'd like
to have a popup on click.



[jQuery] Re: Form function no firing

2007-11-01 Thread choffman

Hi Josh,
Thanks for getting back to me.  I'm not going to be using the Validate
plug-in.  I think this can be done with jquery alone.  It doesn't seem
all that complex.  The main issue at the moment is getting the event-
handler to run the function (checkRadio) when the submit button is
pressed.  I changed the script a little bit since the original post.
I'm open to any advisement and code snippets.  Mentioned earlier, I
started using jquery a few weeks ago so please bear with me.  The main
goal of the script is make the  tag red if they skip
the radio buttons. Thanks - CH

$("#register").submit( function() {
 checkRadio();
});

function checkRadio () {
$('input.amount').each(function() {
if ($(this).attr("checked", true)) {
return true;
} else {
$("#billing").css('color', '#C60006').show();
return false;
}
//close function
}



On Nov 1, 12:57 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> It doesn't look like you are using the Validate plugin in the way it's
> intended.  You might want to have a look at the plugin's home page for more
> information on its usage.
>
> Your submit function should look something like:
> $("#register").submit(function() {
> $(this).validate(options);
>
> });
>
> ...where options contains the Validation configuration object, which is
> where validation rules, messages, and error placements are set up.
>
> -- Josh
>
> - Original Message -
> From: "choffman" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Thursday, November 01, 2007 9:58 AM
> Subject: [jQuery] Form function no firing
>
> > Hi There,
> > I could use some jquery help here.  Its probably something very simple
> > that I'm missing.  I started using jquery a few weeks ago so please
> > bear with me.
>
> > In a nut shell, when a user submits the form (form id="register"), I
> > want it check to make sure they have selected a radio button
> > (class="amount").  If they forgot, I want it turn the #billing id ( > id="billing>) red.   I have server side validation working using PHP.
> > This is more of a visual indicator. I'm using the validate.js plug-in
> > and jquery 1.2.1.  Any help would be great!
>
> > $(document).ready(function() {
> > $("#register").submit( function() {
> > checkRadio();
> > });
>
> > function checkRadio() {
> > $('input.amount').each(function() {
> > if ($('input:unchecked')) {
> > $("#billing").css('color', '#658300').show();
> > return true;
> > } else {
> > $("#billing").css('color', '#C60006').show();
> > return false;
> > }
> > });
> > //close function
> > };
> > });



[jQuery] Re: For Brazilians jQuery Developers

2007-11-01 Thread Alexsandro_xpt

Ae galera
bom saber que tem brasileiro por aqui..

Aproveitando, vcs viram meu post?
http://groups.google.com/group/jquery-en/browse_thread/thread/76e9db9b322b951e/52f8a46d50a57f87?#52f8a46d50a57f87

tem ideia de como resolver?

valew

On 1 nov, 15:44, "Web Specialist" <[EMAIL PROTECTED]> wrote:
> Alexandre
>
> legal hein?
>
> O único problema: a validação não é feita com o Validation Plugin do Jorn,
> né? Com isso para mim fica meio difícil usar a sua estratégia.
>
> Marco Antonio
>
> Em 01/11/07, alexanmtz <[EMAIL PROTECTED]> escreveu:
>
>
>
> > Sorry everyone, the right link is
> >http://www.alexandremagno.net/portfolio_dev/site/contato
>
> > there is a complete form validation send via ajax.
>
> > On Oct 31, 10:32 pm, alexanmtz <[EMAIL PROTECTED]> wrote:
> > > O que vocês estavam querendo é isso:
> >http://www.alexandremagno.net/portfolio_dev/contato
> > > ?
>
> > > Tente postar violando alguma regra de validação e depois enviem...
>
> > > Eu tinha desenvolvido um script assim e estou escrevendo ele para o
> > > blog...
>
> > > On 31 out, 08:25, Jean <[EMAIL PROTECTED]> wrote:
>
> > > > Bom eu tinha um questionario que deixava uma mensagem de Aguarde
> > > > enquanto validava, mas não era pa nenhuma faculdade, apesar que o
> > > > questionario era p/ pos do meu chefe =p
>
> > > > On 10/30/07, Web Specialist <[EMAIL PROTECTED]> wrote:
>
> > > > > Abacaxi,
>
> > > > > obrigado pelo comentário mas no caso daquela mensagem o
> > desenvolvedor
> > > > > comentava sobre outra coisa. Fui descobrir o esquema da mensagem
> > > > > bisbilhotando o código fonte dele.
>
> > > > > Marco Antonio
>
> > > > >  Em 30/10/07, abacaxi <[EMAIL PROTECTED]> escreveu:
>
> > > > > > Antonio, pesquise por loading message aqui ou em
> > > > > >http://jquerybrasil.com/forum/lofiversion/index.php
>
> > > > > > ph
>
> > > > > > On Oct 30, 2:50 pm, "Web Specialist" < [EMAIL PROTECTED]>
> > > > > > wrote:
> > > > > > > I'm here to ask to a brazilian jQuery developer about a form
> > validation
> > > > > > > example published here days ago.
>
> > > > > > > Outro dia um desenvolvedor brasileiro nos mostrou um exemplo
> > aqui de uma
> > > > > > > validação onde ele apresenta uma tela de "AGUARDE..." no momento
> > da
> > > > > chamada
> > > > > > > da validação do formulário(usando Jorn Form Validation). Alguém
> > se
> > > > > lembra
> > > > > > > desse post? Eu queria ver novamente aquele exemplo que achei
> > bastante
> > > > > > > interessante. Se não me falha a memória era um form de uma
> > universidade
> > > > > do
> > > > > > > estado do Paraná.
>
> > > > > > > Obrigado.
>
> > > > > > > Marco Antonio
>
> > > > --
>
> > > > []´s Jeanwww.suissa.info
>
> > > >Ethereal Agencywww.etherealagency.com



[jQuery] Re: Slickspeed from Mootools

2007-11-01 Thread Karl Swedberg
In addition to Rey's points, it's worth noting that the test is  
pretty flawed for a number of reasons, not the least of which is that  
the DOM structure of the test page is ridiculous and not at all  
similar to what you might see on a typical commercial site or blog. I  
should know, because I'm the one who put the test page together (the  
one the test is run against, not the test itself). I just grabbed a  
section of Act I, Scene 3 ,of Shakespeare's As You Like It and  
wrapped a bunch of divs around the dialogue, etc. Hardly  
representative. I think you might be able to customize the test to  
run on other pages, and I would recommend you do so on your own site  
if you want anything resembling a "real-world" scenario. Another  
problem, at least last time I checked, is the way it handles errors.  
In a way, it "prefers" errors by giving them a time somewhere between  
0ms and 15ms, which would obviously benefit the particular library  
that fails.


The slickspeed test has been discussed on a number of blogs as well,  
including a good dissection of it over at Jack Slocum's blog (back in  
February? April maybe?. Anyway, a quick Google search should make any  
reasonable person uneasy about relying on that test too much,  
especially in a single browser.



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



On Nov 1, 2007, at 1:59 PM, Rey Bango wrote:



Hi Prit,

Please do a search in the archives for this topic. Just as early as  
last week, I posted a response to this.


Also, be sure to run the same test in IE so you can see totally  
different results. My post goes into detail about that as well.


Thanks,

Rey...

prit wrote:

I have tried different javascript frameworks and I finally decided to
use jQuery because of the ease of use and all the good plugins
available.
But recently I noticed a website http://mootools.net/slickspeed/  
which

compares 3 frameworks including jQuery. I ran the tests on that site
and noticed that they show jQuery as the slowest performer out of the
3 frameworks (Mootools, Prototype and jQuery).
Does anybody have comments on this ?
Thanks,
Prit




[jQuery] Re: having issues with getJSON

2007-11-01 Thread MF

It looks like jquery populates the "_" parameter with a timestamp to
defeat any request-caching, and google/picasa does not like extra
parameters in its requests.  As a workaround, you can disable this by
setting jQuery.ajaxSettings.cache = true before calling $.getJSON, and
restore its original value after the call if desired.

I am pretty sure that the jsonp callback name which is generated for
anonymous functions (i.e. those passed inline to the getJSON call) is
unique, so you should not see any caching of the requests even with
the "_" parameter removed.

- MF



[jQuery] Effects Issue

2007-11-01 Thread dacoder

I am working on an overlay that has a timer associated with it. when
you mouseover it, it triggers the toggleOn method and when you hover
out it triggers my timer depending on whether you have clicked the
close button or not. I was accidently working on my local which had
both 1.1.2 and 1.1.4. I was doing all the work on a page pointing to
the 1.1.2 version, but our site is using 1.1.4 currently. When I made
the change all of a sudden none of my fadIn(); and fadeOut(); effects
are working

here is the code of the objects I am having the problems with

toggleOn: function(){
if (otherStores.timer == null) {
$('#stores-
overlay').css("display","block").fadeIn("normal");
resetOverlaySize();
}else{
return false;
   }
},
setTimer : function() {
   otherStores.stopTimer();
if (otherStores.isClicked == false){
   otherStores.timer = setTimeout(function(){
$('#stores-
overlay').css("display","none").fadeOut("normal",function(){
otherStores.timer = null;
});
},2000);
}else {
otherStores.timer = setTimeout(function(){
$('#stores-
overlay').css("display","none").fadeOut("normal",function(){
otherStores.timer = null;
});
},200);
}
   }



[jQuery] Re: Form function no firing

2007-11-01 Thread Josh Nathanson


It doesn't look like you are using the Validate plugin in the way it's 
intended.  You might want to have a look at the plugin's home page for more 
information on its usage.


Your submit function should look something like:
$("#register").submit(function() {
   $(this).validate(options);
});

...where options contains the Validation configuration object, which is 
where validation rules, messages, and error placements are set up.


-- Josh

- Original Message - 
From: "choffman" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Thursday, November 01, 2007 9:58 AM
Subject: [jQuery] Form function no firing




Hi There,
I could use some jquery help here.  Its probably something very simple
that I'm missing.  I started using jquery a few weeks ago so please
bear with me.

In a nut shell, when a user submits the form (form id="register"), I
want it check to make sure they have selected a radio button
(class="amount").  If they forgot, I want it turn the #billing id (



[jQuery] Re: Slickspeed from Mootools

2007-11-01 Thread Guy Fraser

prit wrote:
> But recently I noticed a website http://mootools.net/slickspeed/ which
> compares 3 frameworks including jQuery. I ran the tests on that site
> and noticed that they show jQuery as the slowest performer out of the
> 3 frameworks (Mootools, Prototype and jQuery).
>
> Does anybody have comments on this ?
>   

jQuery isn't the fastest library (although it's getting faster all the 
time). The things to bear in mind:

1. It's the smallest library = pages download faster so even if the JS 
is a fraction of a second slower, you won't notice the difference

2. Code that uses jQuery is generally very concise = smaller pages = 
faster downloads

3. In real-world use the effects of most normal JS is negligible 
compared to the time it takes to download images, etc.


[jQuery] transparentCorners plugins

2007-11-01 Thread Alexsandro_xpt

Hellow all

I get from http://illandril.net/jQuery/transparentCorners/, and I try
using it within Extjs ( www.extjs.com ) adapter jquery, but while
include:




The produce $("#teste1").transparentCorners(); don't work.

Why that happen?


Thank's



[jQuery] Re: For Brazilians jQuery Developers

2007-11-01 Thread Web Specialist
Alexandre

legal hein?

O único problema: a validação não é feita com o Validation Plugin do Jorn,
né? Com isso para mim fica meio difícil usar a sua estratégia.

Marco Antonio

Em 01/11/07, alexanmtz <[EMAIL PROTECTED]> escreveu:
>
>
> Sorry everyone, the right link is
> http://www.alexandremagno.net/portfolio_dev/site/contato
>
> there is a complete form validation send via ajax.
>
> On Oct 31, 10:32 pm, alexanmtz <[EMAIL PROTECTED]> wrote:
> > O que vocês estavam querendo é isso:
> http://www.alexandremagno.net/portfolio_dev/contato
> > ?
> >
> > Tente postar violando alguma regra de validação e depois enviem...
> >
> > Eu tinha desenvolvido um script assim e estou escrevendo ele para o
> > blog...
> >
> > On 31 out, 08:25, Jean <[EMAIL PROTECTED]> wrote:
> >
> > > Bom eu tinha um questionario que deixava uma mensagem de Aguarde
> > > enquanto validava, mas não era pa nenhuma faculdade, apesar que o
> > > questionario era p/ pos do meu chefe =p
> >
> > > On 10/30/07, Web Specialist <[EMAIL PROTECTED]> wrote:
> >
> > > > Abacaxi,
> >
> > > > obrigado pelo comentário mas no caso daquela mensagem o
> desenvolvedor
> > > > comentava sobre outra coisa. Fui descobrir o esquema da mensagem
> > > > bisbilhotando o código fonte dele.
> >
> > > > Marco Antonio
> >
> > > >  Em 30/10/07, abacaxi <[EMAIL PROTECTED]> escreveu:
> >
> > > > > Antonio, pesquise por loading message aqui ou em
> > > > >http://jquerybrasil.com/forum/lofiversion/index.php
> >
> > > > > ph
> >
> > > > > On Oct 30, 2:50 pm, "Web Specialist" < [EMAIL PROTECTED]>
> > > > > wrote:
> > > > > > I'm here to ask to a brazilian jQuery developer about a form
> validation
> > > > > > example published here days ago.
> >
> > > > > > Outro dia um desenvolvedor brasileiro nos mostrou um exemplo
> aqui de uma
> > > > > > validação onde ele apresenta uma tela de "AGUARDE..." no momento
> da
> > > > chamada
> > > > > > da validação do formulário(usando Jorn Form Validation). Alguém
> se
> > > > lembra
> > > > > > desse post? Eu queria ver novamente aquele exemplo que achei
> bastante
> > > > > > interessante. Se não me falha a memória era um form de uma
> universidade
> > > > do
> > > > > > estado do Paraná.
> >
> > > > > > Obrigado.
> >
> > > > > > Marco Antonio
> >
> > > --
> >
> > > []´s Jeanwww.suissa.info
> >
> > >Ethereal Agencywww.etherealagency.com
>
>


[jQuery] Selector for Toggled Element

2007-11-01 Thread studiobl

I'm trying to write an if statement based on the toggled state of an
element (a table, in this case).  Attempting to select the table by
any combination of id, class, and/or element type doesn't work.  Using
Firefox, I can see that the table is toggled between display:table and
display:hidden.  The selector that jQuery appears do be using is
element.style.  This selector is apparently built on-the-fly, as it's
not one of mine.

I thought 'aha, select it by using $("element.style")!'  This didn't
work.

Any suggestions on how to retrieve the display attribute of a toggled
element?



[jQuery] Form function no firing

2007-11-01 Thread choffman

Hi There,
I could use some jquery help here.  Its probably something very simple
that I'm missing.  I started using jquery a few weeks ago so please
bear with me.

In a nut shell, when a user submits the form (form id="register"), I
want it check to make sure they have selected a radio button
(class="amount").  If they forgot, I want it turn the #billing id (

[jQuery] Re: Slickspeed from Mootools

2007-11-01 Thread Rey Bango


Hi Prit,

Please do a search in the archives for this topic. Just as early as last 
week, I posted a response to this.


Also, be sure to run the same test in IE so you can see totally 
different results. My post goes into detail about that as well.


Thanks,

Rey...

prit wrote:

I have tried different javascript frameworks and I finally decided to
use jQuery because of the ease of use and all the good plugins
available.

But recently I noticed a website http://mootools.net/slickspeed/ which
compares 3 frameworks including jQuery. I ran the tests on that site
and noticed that they show jQuery as the slowest performer out of the
3 frameworks (Mootools, Prototype and jQuery).

Does anybody have comments on this ?

Thanks,
Prit




[jQuery] Site using jQuery and Plugins: deals.hardkap.com

2007-11-01 Thread prit

Hello,

I am a beginner with Javascript frameworks. I used jQuery and some of
the plugins to create a small deals website. Visit the site at
http://deals.hardkap.com.

I am not a good site designer. I am a programmer though. :) The look
of my site should explain my poor site design.

Thanks,
Prit



[jQuery] Form Valdation Issues

2007-11-01 Thread [EMAIL PROTECTED]

Hi There,
I could use some jquery help here.  This probably something very
simple that I'm missing.  I started using jquery a few weeks ago so
please bear with me.

In a nut shell, when a user submits the form (form id="register"), I
want it check to make sure they have selected a radio button
(class="amount").  If they forgot, I want it turn the #billing id (

[jQuery] Re: slideViewer 1.1

2007-11-01 Thread jim_t

Hi,

Really cool slideviewer!

How easy would it be to allow it to use a common class name rather
than a unique ID, this would work better for multiple slideshows on a
page.

On Oct 8, 8:48 am, GianCarlo Mingati <[EMAIL PROTECTED]>
wrote:
> http://www.gcmingati.net/wordpress/2007/09/12/seeing-it-burn-gives-me...
>
> integrated in a post, as it was invented for.
> ;-))
> GC



[jQuery] Slickspeed from Mootools

2007-11-01 Thread prit

I have tried different javascript frameworks and I finally decided to
use jQuery because of the ease of use and all the good plugins
available.

But recently I noticed a website http://mootools.net/slickspeed/ which
compares 3 frameworks including jQuery. I ran the tests on that site
and noticed that they show jQuery as the slowest performer out of the
3 frameworks (Mootools, Prototype and jQuery).

Does anybody have comments on this ?

Thanks,
Prit



[jQuery] RE: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread Marc Grabanski
@Stefan: datepicker({ firstDay: 1 });

http://docs.jquery.com/UI/Datepicker/datepicker#options
Click the options tab here to see the 30+ customization option:

@Dan: The animation snap back occurs when you have drastically different
datepickers on the same page.  Typically this wouldn't happen because you
would only use one type of datepicker on most applications.

@Graeme: Click the stylesheet tab on the demo - the datepicker is easy to
style with CSS.


[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread 1Marc

@Stefan: datepicker({ firstDay: 1 });

http://docs.jquery.com/UI/Datepicker/datepicker#options
Click the options tab here to see the 30+ customization option:

@Dan: The animation snap back occurs when you have drastically
different datepickers on the same page.  Typically this wouldn't
happen because you would only use one type of datepicker on most
applications.

@Graeme: Click the stylesheet tab on the demo - the datepicker is easy
to style with CSS.

On Nov 1, 11:08 am, Michael Stuhr <[EMAIL PROTECTED]> wrote:
> Graeme B. Davis schrieb:> Is there a way to apply a style it so that it looks 
> a bit "better"?  Perhaps
> > like this calendar I've been using on my sites for ~6yrs:
>
> >http://www.ssw.com.au/ssw/Standards/DeveloperGeneral/Images/popupCale...
> > f
> >http://www.peterbe.com/plog/blogitem-20031017-1526/popwincal
>
> > I like the jquery calendar, but feel it doesn't look as good as it could...
>
> no offense, but:
> have you even looked at the example site ?
>
> there's a tab that says "Stylesheets". I guess that's (nearly) all you need.
>
> micha



[jQuery] Submit event

2007-11-01 Thread choffman

Hi There,
I could use some jquery help here.  This probably something very
simple that I'm missing.  I started using jquery a few weeks ago so
please bear with me.

In a nut shell, when a user submits the form (form id="register"), I
want it check to make sure they have selected a radio button
(class="amount").  If they forgot, I want it turn the #billing id (

[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread 1Marc

@Stefan: datepicker({ firstDay: 1 });
For a complete list of customization options go here and click the
options tab:
http://docs.jquery.com/UI/Datepicker/datepicker#options

@Dan:  That happens when you render multiple months datepicker and
only one month in the next datepicker.  Typically you would only have
one type of datepicker on the page and you wouldn't ever see the
animation "snap back".

On Nov 1, 8:45 am, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> Marc,
>
> One thing I noticed is that in FF 2.0.0.8 there's a little "resize" jump
> when the datepicker opens. As the open animation is occurring, it does some
> kind of weird little "snap back" at the end of the animation.
>
> -Dan
>
> >-Original Message-
> >From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> >Behalf Of 1Marc
> >Sent: Thursday, November 01, 2007 12:35 AM
> >To: jQuery (English)
> >Subject: [jQuery] jQuery UI Datepicker v3.0 Released! (Previously named
> >jQuery Calendar)
>
> >jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)
>
> >I am happy to announce that UI Datepicker version 3 has been released
> >today.
> >http://marcgrabanski.com/code/ui-datepicker/
>
> >Highlight New Features:
> >Included in the official jQuery User Interface library (http://
> >ui.jquery.com)
> >Date range selection
> >Display multiple months at a time
> >More customization options
> >License changed to reflect jQuery
> >Compatibility option to use existing code
>
> >UI Datepicker was presented at jQuery Camp in Boston at Harvard. Here
> >are the slides from the presentation:
> >http://marcgrabanski.com/presentations/jQuery-Datepicker-Success.html
>
> >Mods based on jQuery Calendar:
> >West Wind created an ASP.NET control out of jQuery Calendar
> >http://www.west-wind.com/jqueryweb/jquerycalendar.aspx
>
> >PHP Framework Symfony Plugin (ddJQueryCalendar)
> >http://trac.symfony-project.com/wiki/ddJQueryCalendar
>
> >Drupal jQuery Calendar Plugin
> >http://drupal.org/project/jquery_calendar
>
> >Featured on Smashing Magazine Date Pickers
> >http://www.smashingmagazine.com/2007/10/23/online-calendars-and-date-
> >pickers/
>
> >Thank you all for your great feedback which has made this Datepicker
> >so successful!
>
> >Marc Grabanski
> >Interactive Developer
> >http://marcgrabanski.com
> >Minnesota, US



[jQuery] Re: Request for comments on code snippet.

2007-11-01 Thread Klaus Hartl

On Nov 1, 2:21 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> >i've just started using jQuery, and I'm having lots of fun.
>
> >I have the following code snippet. What it does is looks for all
> >instances of a true and false and replaces the
> >content with an image of a tick and cross.
>
> >The snippet is
>
> >$("td").each(function(){
> >if (this.innerHTML == 'true') {
> >this.innerHTML = ' >src="$base/images/true.png">';
> >}
> >if (this.innerHTML == 'false') {
> >this.innerHTML = ' >src="$base/images/false.png">';
> >}
> >});
>
> >I would just like to throw it out there, is there a neater way of
> >using jQuery to perform the same function ? I tried
>
> >$("td:contains('true')")
>
> >, but the  can be nested, which causes the parent  to be
> >replaced.
>
> A couple of notes:
>
> 1) I'd try to use a more specific selector in order to reduce the number of
> possible matches. The number of cells in a table can quickly get very large,
> so parsing over every single  tag in a DOM can start to get slow. So, if
> your table looked like:
>
> 
> 
> Product X
> true
> 
> 
> Product Y
> false
> 
> 
>
> I'd use a selector like: $("#features tr > td.boolean")
>
> This would limit the results to only the table cells with a class of
> "boolean". That will drastically reduce your match set.
>
> 2) I'd use the html() method instead of innerHTML. If you're going to use
> jQuery, take advantage of all it's cross browser goodness.
>
> So, the revised code might look something like:
>
> $("#features tr > td.boolean").each(function(){
> // cache reference to current element as a jQuery object
> var $el = $(this);
> // get the trimmed value in the cell
> var sValue = $.trim($el.html());
> // if the value is true or false, then replace the content with
> image
> if( sValue == "true" || sValue == "false" )
> $el.html('');
>
> });
>
> -Dan

There's some room for optimization, why not leave away the if
condition if the value is always true or false and the value is
inserted as-is anyway:

var $td = $("#features td.boolean"), value = $.trim($td.text());
$td.html('');

I added the missing alt attribute, because that td must always be a
child of a row I think the selector can be simplified a bit as well.
Maybe the text() method does an trim already, not sure...



--Klaus



[jQuery] Re: googlyx.com going too boom nice webiste

2007-11-01 Thread Jonathan Sharp
SPAM -- please ignore this post, banning user...




On 11/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> http://googlyx.com/
>
> hi
>   i get this website and i joined here its realy cool give a look
> http://googlyx.com/
>
>


[jQuery] Re: PHP jsoner ver 0.9

2007-11-01 Thread polyrhythmic

FYI, the extension is fully compatible with PHP 4, and you can load it
with dl() if you can obtain the right binary.

I agree with you on the is_numeric, I had to write that into my JSON
php fn before I had the extension loaded.

Charles

On Oct 31, 6:35 pm, resetstudio <[EMAIL PROTECTED]> wrote:
> I know it, but my hoster does not support php 5 and to install
> extension.
> I have triedhttp://mike.teczno.com/json.html and worked for a while.
> It seems that this phpclass has some issues with accent and some other
> special chars.
> this function is short and easy to use, i will add the check
> is_numeric so i can return int and float as values without parsing int/
> float in Js...



[jQuery] googlyx.com going too boom nice webiste

2007-11-01 Thread sauravh2006

http://googlyx.com/

hi
   i get this website and i joined here its realy cool give a look
http://googlyx.com/



[jQuery] Re: My first plugin, criticisms please

2007-11-01 Thread polyrhythmic

I've found that writing my code with a modular OOP plugin mentality,
it's a lot easier to reuse my own code and trade snippets with others,
since it's already abstracted into a plugin.

I don't know if you've seen Mike Alsup's recent Learning jQuery post
about Plugin Dev, but it's a good read about good plugin practices:
http://www.learningjquery.com/2007/10/a-plugin-development-pattern

Keep it up, it'll be good to see how the code turns out.

Charles


On Oct 31, 2:53 pm, Adrian Lynch <[EMAIL PROTECTED]> wrote:
> Thanks all. I did have a think about which way around I wanted it to
> work. Thinking about what will be returned is also handy.
>
> I can see me wrting more plugins now.
>
> Thanks again.
>
> Adrian
>
> On Oct 30, 2:51 am, Dave Methvin <[EMAIL PROTECTED]> wrote:
>
> > > $(ELEMENTS_TO_CHANGE).syncValue(ELEMENT_I_WISH_TO_COPY).show();
> > > That way your focus is on the changing element.
>
> > I tend to agree; if that's what you want then it's pretty short
> > already.
>
> > $(syncElements).val(formatter(elementToCopy.val())).show();
>
> > The other way around isn't a lot longer but it's uglier.
>
> > $(elementToCopy).each(function(){$(syncElements).val(formatter($
> > (this).val(}).show();
>
> > So the plugin could just encapsulate the ugliness:
>
> >  jQuery.fn.syncValue = function(syncElements, formatter) {
> >return this.each(function(){
> >   $(syncElements).val(
> >  (formatter || function(x){return x}}($(this).val()))
> >   );
> >});
>
> > };
>
> > $(elementToCopy).syncValue(syncElements, formatter).show();



[jQuery] Re: LiveQuery (Discuss Please)

2007-11-01 Thread Josh Nathanson



LiveQuery is a staple in my list of plugins. No matter how much I mess
with the DOM, my events always fire. Leave the core lean, but this
plugin deserves more recognition for sure.


Given the dispersed nature of the jQuery community, what are some 
suggestions to get the plugin more recognition?


On the old plugins Wiki section of the jQuery site, there is still an 
"Official" plugins section, maybe it could be put there;  although it seems 
that page is deprecated, as the main plugins link now goes to the repository 
browser.


I also think it should not be in the core;  it is a great plugin but not 
used so often that it would be worth the 3K or so it would add.


-- Josh



- Original Message - 
From: "Shaun Kester" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Thursday, November 01, 2007 9:40 AM
Subject: [jQuery] Re: LiveQuery (Discuss Please)





On Oct 31, 7:04 pm, "Yehuda Katz" <[EMAIL PROTECTED]> wrote:
So as far as I'm concerned, livequery is the biggest advance in jQuery 
since
its inception (no, I am not its author). I'm trying to understand why 
it's

having such a slow rate of adoption.

it solves this problem:
$("div.klass").draggable();
$("#foo").load("url", function() { $("div.klass").draggable(); });

beautifully, as you now only need to do:

$("div.klass").livequery(function() { $(this).draggable() });
$("#foo").load("url");

Obviously, that was only a simple example. The more general case, wanting 
to
bind some event handler to a selector regardless of when it appears on 
the
page, is extremely common. So again, I'm trying to understand why the 
rate

of adoption has been so slow. Any thoughts?

--
Yehuda Katz
Web Developer | Procore Technologies
(ph)  718.877.1325






[jQuery] Re: LiveQuery (Discuss Please)

2007-11-01 Thread Shaun Kester

LiveQuery is a staple in my list of plugins. No matter how much I mess
with the DOM, my events always fire. Leave the core lean, but this
plugin deserves more recognition for sure.

On Oct 31, 7:04 pm, "Yehuda Katz" <[EMAIL PROTECTED]> wrote:
> So as far as I'm concerned, livequery is the biggest advance in jQuery since
> its inception (no, I am not its author). I'm trying to understand why it's
> having such a slow rate of adoption.
>
> it solves this problem:
> $("div.klass").draggable();
> $("#foo").load("url", function() { $("div.klass").draggable(); });
>
> beautifully, as you now only need to do:
>
> $("div.klass").livequery(function() { $(this).draggable() });
> $("#foo").load("url");
>
> Obviously, that was only a simple example. The more general case, wanting to
> bind some event handler to a selector regardless of when it appears on the
> page, is extremely common. So again, I'm trying to understand why the rate
> of adoption has been so slow. Any thoughts?
>
> --
> Yehuda Katz
> Web Developer | Procore Technologies
> (ph)  718.877.1325



[jQuery] Re: [NEWS] Site Using jQuery: TurboTax.com

2007-11-01 Thread polyrhythmic

I think they just change the text size - I don't see an animation with
firefox, the text is either large or small.  Note that the button does
not change size, so I don't think it's an actual 'zoom'. ...Unless you
guys see something different?

Charles


On Nov 1, 4:46 am, Tobias Parent <[EMAIL PROTECTED]> wrote:
> WLee Hinde wrote:
> > On 10/31/07, Guy Fraser <[EMAIL PROTECTED]> wrote:
>
> >> Lee Hinde wrote:
>
> >>>http://cherne.net/brian/resources/jquery.hoverIntent.html
>
> >>> On 10/31/07, Guy Fraser <[EMAIL PROTECTED]> wrote:
>
>   That rocks! I love the use of hover intent on the basic/delux/etc 
>  panels -
>  which plugin was used to do that?
>
> >> Oops - I should have been more specific - what plugin is used to "zoom
> >> out" the panels when you hover over them? I particularly like the way
> >> the text scales smoothly. There's so much JS used on that site that I
> >> can't see the college for the fish :s
>
> > My skill set ends at reading the html source. :-)
>
> If you have Firebug installed (and you should, if you're a developer at
> ANY level!), click on the 'Script' tab, then just above the 'Script' you
> should see jQuery.js&session_id=XX... Click on that and switch to
> events_global.js - that shows what you're looking for, I think.
>  -Toby P.



[jQuery] Re: LiveQuery (Discuss Please)

2007-11-01 Thread Brandon Aaron

Perhaps you didn't see the example page:
http://brandonaaron.net/jquery/plugins/livequery/test/test.html

Doing those same two examples without Live Query would require you to
write other helper functions to bind those events and to manually
monitor when an element is added or removed. Hardly just two lines of
code. Feel free to add an element to the list via firebug as well to
see how it works.

I personally feel that Live Query should not be put in the core. To
many people seem to think it is a replacement for bind and perhaps
that is my fault for making it a little to easy. Remember that the
power comes at the price of performance. Live Query is best used on a
section of your web site that changes via AJAX calls and you need to
bind events or even just know when the change took place. There will
be absolutely no noticeable performance hit when using it this way. It
is when you start using Live Query in place of your regular bind calls
that you will start to see performance drop.

Live Query should not interfere with any Ajax history manager nor any
hijax methodologies. Live Query is only calling .bind for you.

Also Live Query doesn't make you lazy ... it simply abstracts a more
difficult task into one line. The only reason to suspect you've become
lazy is b/c you are a programmer and I believe we are all a little
lazy at times. :p

Live Query is a very cool plugin but don't use it just b/c it is cool.

BTW ... the adoption rate has been pretty good from my perspective.

--
Brandon Aaron

On Nov 1, 10:09 am, "Lee Hinde" <[EMAIL PROTECTED]> wrote:
> On 10/31/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
>
>
>
> > So as far as I'm concerned, livequery is the biggest advance in jQuery since
> > its inception (no, I am not its author). I'm trying to understand why it's
> > having such a slow rate of adoption.
>
> > it solves this problem:
> > $("div.klass").draggable();
> > $("#foo").load("url", function() { $("div.klass").draggable(); });
>
> > beautifully, as you now only need to do:
>
> > $("div.klass").livequery(function() { $(this).draggable() });
> > $("#foo").load("url");
>
> Since this is an evangelism discussion, I'd suggest that LiveQuery
> page doesn't explain the problem it solves. And your sample takes two
> lines of code and reduces it to two lines of code. That's not, in and
> of itself, compelling.
>
> A lot of us beginners don't get what itch is getting scratched. The
> specific suggestion would be to update the Live Query page with an
> introduction as to why the plug-in is useful, with an emphasis on DOM
> changes via Ajax calls.



[jQuery] Re: LiveQuery (Discuss Please)

2007-11-01 Thread Yehuda Katz
My example was shorthand for the problem that's being solved. LiveQuery
allows you to define behaviors on the DOM that will be applied on current
*or future* nodes. It basically takes the selector engine from being a
snapshot tool to making the DOM "alive", just like CSS (in CSS, if a class
is removed, all styles are removed; with liveQuery, if a class is removed,
all associated behaviors are removed).
Also, re: liveQuery breaking Hijax: can you give some more detail about why
this is the case?

Finally, use in every single app is not a requirement for inclusion in the
Core. There are a number of features that are not ubiquitously used, but
represent extremely common usage patterns, and are in use in a large number
of apps (think getJSON, for instance).

-- Yehuda

On 11/1/07, Lee Hinde <[EMAIL PROTECTED]> wrote:
>
>
> On 10/31/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> > So as far as I'm concerned, livequery is the biggest advance in jQuery
> since
> > its inception (no, I am not its author). I'm trying to understand why
> it's
> > having such a slow rate of adoption.
> >
> >
> > it solves this problem:
> > $("div.klass").draggable();
> > $("#foo").load("url", function() { $("div.klass").draggable(); });
> >
> >
> > beautifully, as you now only need to do:
> >
> >
> > $("div.klass").livequery(function() { $(this).draggable() });
> > $("#foo").load("url");
> >
>
> Since this is an evangelism discussion, I'd suggest that LiveQuery
> page doesn't explain the problem it solves. And your sample takes two
> lines of code and reduces it to two lines of code. That's not, in and
> of itself, compelling.
>
> A lot of us beginners don't get what itch is getting scratched. The
> specific suggestion would be to update the Live Query page with an
> introduction as to why the plug-in is useful, with an emphasis on DOM
> changes via Ajax calls.
>



-- 
Yehuda Katz
Web Developer | Procore Technologies
(ph)  718.877.1325


[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread Michael Stuhr


Graeme B. Davis schrieb:

Is there a way to apply a style it so that it looks a bit "better"?  Perhaps
like this calendar I've been using on my sites for ~6yrs:

http://www.ssw.com.au/ssw/Standards/DeveloperGeneral/Images/popupCalendar.gi
f
http://www.peterbe.com/plog/blogitem-20031017-1526/popwincal

I like the jquery calendar, but feel it doesn't look as good as it could...


no offense, but:
have you even looked at the example site ?

there's a tab that says "Stylesheets". I guess that's (nearly) all you need.

micha


[jQuery] Re: Find all links that go to .jpg images

2007-11-01 Thread sccr410


This worked like a charm:


$(document).ready(function() {
$("a[href$='.jpg']").addClass('thickbox');
});

-- 
View this message in context: 
http://www.nabble.com/Find-all-links-that-go-to-.jpg-images-tf4728653s27240.html#a13531475
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Autoselect specific checkboxes based on select dropdown

2007-11-01 Thread Andy Matthews
A coworker needed to be able to select a series of checkboxes based on the
value of a select dropdown. Here's what I came up with...I'm wondering how
it could be improved.
 
The dropdown:
 

select an access level
25 / Low Dealer
50 / Medium-High Dealer
75 / High Dealer

 
One of 40 or 50 checkboxes:
 // value is the
only thing that changes.
 
Here's my code:
// permission arrays
var arr25 = [1119,1123,1099]; // bottom permission level
var arr50 = [1086,1083,1079]; // medium permission level
var arr75 = [1081,1084,1082]; // top permission level
 
// assign change handler
$('#accesslevel').change(function(){
   // get the TEXT of the selected option, not it's value
   var option = $(':selected',this).text().split(' / ')[0];
   // make sure the user didn't select the first option
   if (option != 'select an access level') {
  // deselect all checkboxes
  $('input[name=permissionid]').removeAttr("checked");
  // use the array for the selected permission level
  var curArr = eval('arr'+option);
  // loop over the array
  for (o=0;o < curArr.length; o++) {
 // check every checkbox whose value is in this array
 $('input[value=' + curArr[o] + ']').attr('checked','checked');
  }
   }
});

 

 
Andy Matthews
Senior ColdFusion Developer
Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 


[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread Graeme B. Davis

Is there a way to apply a style it so that it looks a bit "better"?  Perhaps
like this calendar I've been using on my sites for ~6yrs:

http://www.ssw.com.au/ssw/Standards/DeveloperGeneral/Images/popupCalendar.gi
f
http://www.peterbe.com/plog/blogitem-20031017-1526/popwincal

I like the jquery calendar, but feel it doesn't look as good as it could...

Graeme

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dan G. Switzer, II
Sent: Thursday, November 01, 2007 9:46 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named
jQuery Calendar)


Marc,

One thing I noticed is that in FF 2.0.0.8 there's a little "resize" jump
when the datepicker opens. As the open animation is occurring, it does some
kind of weird little "snap back" at the end of the animation.

-Dan

>-Original Message-
>From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On 
>Behalf Of 1Marc
>Sent: Thursday, November 01, 2007 12:35 AM
>To: jQuery (English)
>Subject: [jQuery] jQuery UI Datepicker v3.0 Released! (Previously named 
>jQuery Calendar)
>
>
>jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)
>
>I am happy to announce that UI Datepicker version 3 has been released 
>today.
>http://marcgrabanski.com/code/ui-datepicker/
>
>Highlight New Features:
>Included in the official jQuery User Interface library (http://
>ui.jquery.com)
>Date range selection
>Display multiple months at a time
>More customization options
>License changed to reflect jQuery
>Compatibility option to use existing code
>
>UI Datepicker was presented at jQuery Camp in Boston at Harvard. Here 
>are the slides from the presentation:
>http://marcgrabanski.com/presentations/jQuery-Datepicker-Success.html
>
>Mods based on jQuery Calendar:
>West Wind created an ASP.NET control out of jQuery Calendar 
>http://www.west-wind.com/jqueryweb/jquerycalendar.aspx
>
>PHP Framework Symfony Plugin (ddJQueryCalendar) 
>http://trac.symfony-project.com/wiki/ddJQueryCalendar
>
>Drupal jQuery Calendar Plugin
>http://drupal.org/project/jquery_calendar
>
>Featured on Smashing Magazine Date Pickers
>http://www.smashingmagazine.com/2007/10/23/online-calendars-and-date-
>pickers/
>
>Thank you all for your great feedback which has made this Datepicker so 
>successful!
>
>Marc Grabanski
>Interactive Developer
>http://marcgrabanski.com
>Minnesota, US




[jQuery] Re: jQuery AJAX Docs

2007-11-01 Thread Bil Corry


Dave Buchholz wrote on 10/31/2007 4:39 PM: 

Are there any resources for newbies that explain how to do AJAX calls
with jQuery ?


Go here:  

Follow the "Tutorials" link in the upper menu bar.  Scroll down to the section labeled 
"AJAX".


- Bil





[jQuery] Re: LiveQuery (Discuss Please)

2007-11-01 Thread Lee Hinde

On 10/31/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> So as far as I'm concerned, livequery is the biggest advance in jQuery since
> its inception (no, I am not its author). I'm trying to understand why it's
> having such a slow rate of adoption.
>
>
> it solves this problem:
> $("div.klass").draggable();
> $("#foo").load("url", function() { $("div.klass").draggable(); });
>
>
> beautifully, as you now only need to do:
>
>
> $("div.klass").livequery(function() { $(this).draggable() });
> $("#foo").load("url");
>

Since this is an evangelism discussion, I'd suggest that LiveQuery
page doesn't explain the problem it solves. And your sample takes two
lines of code and reduces it to two lines of code. That's not, in and
of itself, compelling.

A lot of us beginners don't get what itch is getting scratched. The
specific suggestion would be to update the Live Query page with an
introduction as to why the plug-in is useful, with an emphasis on DOM
changes via Ajax calls.


[jQuery] Re: Include javafile

2007-11-01 Thread seedy


I cant see any immediate reason why that would not work, however I thought i
would point out that putting your scripts at the bottom of the page is
actually the recommended way of including scripts.

http://developer.yahoo.com/performance/rules.html#js_bottom



Muhammad Mohsin wrote:
> 
> i mean in head of the page.
> 
> 
>  include("$ROOT_PATH/includes/meta.php");
> ?>
>  type="text/javascript" >
>  type="text/javascript" >
>  language="javascript">
>  type="text/javascript" >
>  type="text/javascript" >
>  type="text/javascript" >
>  type="text/javascript">
>  type="text/javascript">
>  type="text/javascript">
> 
> 
> listing java doesn't work here but works well when i write this code in
> end
> of page
> 
> 
> 
> 
> On 11/1/07, mohsin <[EMAIL PROTECTED]> wrote:
>>
>>
>> I am using separate javascript file for the function I have written.
>> When I include this file in header of my page these function doesn't
>> worked. But when I include it in the bottom of page it start working.
>> I want to include it in header can anyone help me.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Include-javafile-tf4730715s27240.html#a13530490
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jQuery 1.2 benchmark

2007-11-01 Thread Rey Bango


Because Ext doesn't consider file size when optimizing their DOMQuery 
engine. With jQuery, we try to find a good balance between keeping the 
core file size down while providing very good performance.


Rey...

weepy wrote:

How come Ext is so fast !!


On Oct 26, 9:30 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:

Can someone simply explain what the colors indicate for any specific row?

Red?
Orange?
Green?
Grey?
Black?

Also, in IE7, these are the results I got (for what it's worth):

Dojo query 0.9: 1020
jQuery1.2: 1350
Mootools r887:  2525
Prototype 1.6.0:2857
Ext 1.1: 7: 477

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

Behalf Of Rey Bango
Sent: Friday, October 26, 2007 11:22 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery1.2benchmark

Run this test in Internet Explorer and look at the results. jQuery is
optimized for Internet Explorer which is the most widely used browser out.
When you run the same tests in IE, you'll see that we perform much better
and our on par with all of the libs.

Also, theSlickSpeedtest suite has already been discussed in great detail
on this list and many of the actual selectors specified are not real-world
examples that would represent any type of real performance in an actual
application. The performance of jQuery's DOM selector engine is actually
very good and to date, we've not received any complaints from our users
including Digg, NBC, IBM or Google.

With that said, our focus is on improving features for jQuery.SlickSpeedis not 
on our radar.

Rey

Lauris Bukšis-Haberkorns wrote:

Has anyone seen this one?
http://alexandre-mercier.vinnac.org/slickspeed/
jQuery does not perform that well there.
Lafriks





[jQuery] Re: jQuery 1.2 benchmark

2007-11-01 Thread weepy

How come Ext is so fast !!


On Oct 26, 9:30 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Can someone simply explain what the colors indicate for any specific row?
>
> Red?
> Orange?
> Green?
> Grey?
> Black?
>
> Also, in IE7, these are the results I got (for what it's worth):
>
> Dojo query 0.9: 1020
> jQuery1.2: 1350
> Mootools r887:  2525
> Prototype 1.6.0:2857
> Ext 1.1: 7: 477
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Rey Bango
> Sent: Friday, October 26, 2007 11:22 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: jQuery1.2benchmark
>
> Run this test in Internet Explorer and look at the results. jQuery is
> optimized for Internet Explorer which is the most widely used browser out.
> When you run the same tests in IE, you'll see that we perform much better
> and our on par with all of the libs.
>
> Also, theSlickSpeedtest suite has already been discussed in great detail
> on this list and many of the actual selectors specified are not real-world
> examples that would represent any type of real performance in an actual
> application. The performance of jQuery's DOM selector engine is actually
> very good and to date, we've not received any complaints from our users
> including Digg, NBC, IBM or Google.
>
> With that said, our focus is on improving features for jQuery.SlickSpeedis 
> not on our radar.
>
> Rey
>
> Lauris Bukšis-Haberkorns wrote:
> > Has anyone seen this one?
>
> >http://alexandre-mercier.vinnac.org/slickspeed/
>
> > jQuery does not perform that well there.
>
> > Lafriks



[jQuery] Re: Reminder: Last few hours to save 30% on jQuery in Action BETA

2007-11-01 Thread Fred Janon
Thanks for the answer, Yehuda. Hopefully the discount is still good...

Fred

On 11/1/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
>
> The book covers jQuery 1.2. The book got started pre-1.2, but we did a
> full-pass of the entire book to update it for 1.2. It also includes jQuery
> UI and livequery in Chapter 9, which are relatively new.
>
> Having done a ton of the research for the book, I can tell you that in
> addition to the book covering motivation (why the library does what it does)
> that you won't get anywhere else, there's a fair bit of material that was
> gleaned from a combination of disparate online documentation and reading the
> source code itself.
>
>
> My favorite feature in this book is the "lab pages," which are online
> pages that allow you to experiment with concepts taught in the book. For
> instance, we have a selector lab that allows you to specify a selector, and
> see which elements are selected. The lab pages are tightly integrated into
> the book narrative, so you really get a lot of value in a format that is not
> available anywhere else.
>
>
> Also, the book has a number of full-chapter examples (Ajax comes to mind),
> which will help you tackle writing a full app start-to-finish, including
> minor issues that can get lost when writing a high-level overview. So check
> it out. I think you'll be pleasantly surprised :-D
>
>
> -- Yehuda
>
> On 10/31/07, Fred Janon <[EMAIL PROTECTED] > wrote:
> >
> > Hi,
> >
> > What version of jQuery does the book cover? It would be nice if Manning
> > decided to show an excerpt of another chapter (or part of) than the
> > introduction. For the introduction, we can go to the jQuery web site, but
> > show me what's the real meat of the book? What does this book have that I
> > can't find easily somewhere else? Hard to tell from the Table of Contents. I
> > love books and I buy lots of them, but it's getting hard to buy a book and
> > discover that it's either almost obsolete when it comes out because 2
> > versions of the software came out before the book is in the stores or the
> > book doesn't address much more than what's on the web site, hence the book
> > publishing market shrinking.
> >
> > Thanks
> >
> > Fred
> >
> > On 11/1/07, Yehuda Katz < [EMAIL PROTECTED]> wrote:
> > >
> > > Hey guys,
> > >
> > > I'm really proud of how well jQuery in Action has been selling over
> > > the past few weeks, and how much feedback I've been getting from the
> > > community. If you haven't gotten a chance to purchase it, I just wanted to
> > > let you know that the 30% off coupon code expires tonight (not sure if 
> > > it's
> > > EST or PST...).
> > >
> > >
> > > Get the book at: 
> > > http://www.manning.com/affiliate/idevaffiliate.php?id=485_93
> > >
> > > Use coupon code JQM30 for 30% off!
> > >
> > > --
> > > Yehuda Katz
> > > Web Developer | Procore Technologies
> > > (ph)  718.877.1325
> > >
> >
> >
>
>
> --
> Yehuda Katz
> Web Developer | Procore Technologies
> (ph)  718.877.1325
>


[jQuery] Re: Reminder: Last few hours to save 30% on jQuery in Action BETA

2007-11-01 Thread Fred Janon
Ooops, coupon expired. Too bad, I wish I heard about it earlier.

Fred

On 11/1/07, Fred Janon <[EMAIL PROTECTED]> wrote:
>
> Thanks for the answer, Yehuda. Hopefully the discount is still good...
>
> Fred
>
> On 11/1/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> >
> > The book covers jQuery 1.2. The book got started pre-1.2, but we did a
> > full-pass of the entire book to update it for 1.2. It also includes
> > jQuery UI and livequery in Chapter 9, which are relatively new.
> >
> > Having done a ton of the research for the book, I can tell you that in
> > addition to the book covering motivation (why the library does what it does)
> > that you won't get anywhere else, there's a fair bit of material that was
> > gleaned from a combination of disparate online documentation and reading the
> > source code itself.
> >
> >
> > My favorite feature in this book is the "lab pages," which are online
> > pages that allow you to experiment with concepts taught in the book. For
> > instance, we have a selector lab that allows you to specify a selector, and
> > see which elements are selected. The lab pages are tightly integrated into
> > the book narrative, so you really get a lot of value in a format that is not
> > available anywhere else.
> >
> >
> > Also, the book has a number of full-chapter examples (Ajax comes to
> > mind), which will help you tackle writing a full app start-to-finish,
> > including minor issues that can get lost when writing a high-level overview.
> > So check it out. I think you'll be pleasantly surprised :-D
> >
> >
> > -- Yehuda
> >
> > On 10/31/07, Fred Janon <[EMAIL PROTECTED] > wrote:
> > >
> > > Hi,
> > >
> > > What version of jQuery does the book cover? It would be nice if
> > > Manning decided to show an excerpt of another chapter (or part of) than 
> > > the
> > > introduction. For the introduction, we can go to the jQuery web site, but
> > > show me what's the real meat of the book? What does this book have that I
> > > can't find easily somewhere else? Hard to tell from the Table of 
> > > Contents. I
> > > love books and I buy lots of them, but it's getting hard to buy a book and
> > > discover that it's either almost obsolete when it comes out because 2
> > > versions of the software came out before the book is in the stores or the
> > > book doesn't address much more than what's on the web site, hence the book
> > > publishing market shrinking.
> > >
> > > Thanks
> > >
> > > Fred
> > >
> > > On 11/1/07, Yehuda Katz < [EMAIL PROTECTED] > wrote:
> > > >
> > > > Hey guys,
> > > >
> > > > I'm really proud of how well jQuery in Action has been selling over
> > > > the past few weeks, and how much feedback I've been getting from the
> > > > community. If you haven't gotten a chance to purchase it, I just wanted 
> > > > to
> > > > let you know that the 30% off coupon code expires tonight (not sure if 
> > > > it's
> > > > EST or PST...).
> > > >
> > > >
> > > > Get the book at: 
> > > > http://www.manning.com/affiliate/idevaffiliate.php?id=485_93
> > > >
> > > > Use coupon code JQM30 for 30% off!
> > > >
> > > > --
> > > > Yehuda Katz
> > > > Web Developer | Procore Technologies
> > > > (ph)  718.877.1325
> > > >
> > >
> > >
> >
> >
> > --
> > Yehuda Katz
> > Web Developer | Procore Technologies
> > (ph)  718.877.1325
> >
>
>


[jQuery] Re: For Brazilians jQuery Developers

2007-11-01 Thread alexanmtz

Sorry everyone, the right link is 
http://www.alexandremagno.net/portfolio_dev/site/contato

there is a complete form validation send via ajax.

On Oct 31, 10:32 pm, alexanmtz <[EMAIL PROTECTED]> wrote:
> O que vocês estavam querendo é 
> isso:http://www.alexandremagno.net/portfolio_dev/contato
> ?
>
> Tente postar violando alguma regra de validação e depois enviem...
>
> Eu tinha desenvolvido um script assim e estou escrevendo ele para o
> blog...
>
> On 31 out, 08:25, Jean <[EMAIL PROTECTED]> wrote:
>
> > Bom eu tinha um questionario que deixava uma mensagem de Aguarde
> > enquanto validava, mas não era pa nenhuma faculdade, apesar que o
> > questionario era p/ pos do meu chefe =p
>
> > On 10/30/07, Web Specialist <[EMAIL PROTECTED]> wrote:
>
> > > Abacaxi,
>
> > > obrigado pelo comentário mas no caso daquela mensagem o desenvolvedor
> > > comentava sobre outra coisa. Fui descobrir o esquema da mensagem
> > > bisbilhotando o código fonte dele.
>
> > > Marco Antonio
>
> > >  Em 30/10/07, abacaxi <[EMAIL PROTECTED]> escreveu:
>
> > > > Antonio, pesquise por loading message aqui ou em
> > > >http://jquerybrasil.com/forum/lofiversion/index.php
>
> > > > ph
>
> > > > On Oct 30, 2:50 pm, "Web Specialist" < [EMAIL PROTECTED]>
> > > > wrote:
> > > > > I'm here to ask to a brazilian jQuery developer about a form 
> > > > > validation
> > > > > example published here days ago.
>
> > > > > Outro dia um desenvolvedor brasileiro nos mostrou um exemplo aqui de 
> > > > > uma
> > > > > validação onde ele apresenta uma tela de "AGUARDE..." no momento da
> > > chamada
> > > > > da validação do formulário(usando Jorn Form Validation). Alguém se
> > > lembra
> > > > > desse post? Eu queria ver novamente aquele exemplo que achei bastante
> > > > > interessante. Se não me falha a memória era um form de uma 
> > > > > universidade
> > > do
> > > > > estado do Paraná.
>
> > > > > Obrigado.
>
> > > > > Marco Antonio
>
> > --
>
> > []´s Jeanwww.suissa.info
>
> >Ethereal Agencywww.etherealagency.com



[jQuery] cluetip integration on wordpress theme

2007-11-01 Thread eNeRgIa

Hi, I'm trying to use cluetip on a wordpress theme; by default
wordpress displays a calendar widget and I would like to tooltip-ify
it using jquery. I thought cluetip might help me but I can't get it to
work. The page is

http://www.gennarocarotenuto.it/index.php/

and as you can see it doesn't work. Actually I'm trying to use it with
this code:

$('#today a').cluetip({attribute:   'title', dropShadow:
false});

I changed ' #today a ' many times, but it never worked. What I want to
do is makeing a tooltip appear whenever the user hovers on a day of
the calendar, showing the title of the post as fetched by the 'title'
attribute of the A tag.

After I verify this works, I would love to make other classes of links
do other things, like fetching an excerpt of the article using
ajax...but firs I have to verify why this doesn't work!

Thanks in advance,

Dario

PS I had to call jquery twice in the template header, as you can see
in the page source!



[jQuery] Re: Include javafile

2007-11-01 Thread Muhammad Mohsin
jquery code is in listing java

$('.price_convert').each(function()
 {
$(this).mouseover(function()
{
   alert("IN");
});

$(this).mouseout(function()
{
alert("OUT");
});

});
});


[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread Dan G. Switzer, II

Marc,

One thing I noticed is that in FF 2.0.0.8 there's a little "resize" jump
when the datepicker opens. As the open animation is occurring, it does some
kind of weird little "snap back" at the end of the animation.

-Dan

>-Original Message-
>From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>Behalf Of 1Marc
>Sent: Thursday, November 01, 2007 12:35 AM
>To: jQuery (English)
>Subject: [jQuery] jQuery UI Datepicker v3.0 Released! (Previously named
>jQuery Calendar)
>
>
>jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)
>
>I am happy to announce that UI Datepicker version 3 has been released
>today.
>http://marcgrabanski.com/code/ui-datepicker/
>
>Highlight New Features:
>Included in the official jQuery User Interface library (http://
>ui.jquery.com)
>Date range selection
>Display multiple months at a time
>More customization options
>License changed to reflect jQuery
>Compatibility option to use existing code
>
>UI Datepicker was presented at jQuery Camp in Boston at Harvard. Here
>are the slides from the presentation:
>http://marcgrabanski.com/presentations/jQuery-Datepicker-Success.html
>
>Mods based on jQuery Calendar:
>West Wind created an ASP.NET control out of jQuery Calendar
>http://www.west-wind.com/jqueryweb/jquerycalendar.aspx
>
>PHP Framework Symfony Plugin (ddJQueryCalendar)
>http://trac.symfony-project.com/wiki/ddJQueryCalendar
>
>Drupal jQuery Calendar Plugin
>http://drupal.org/project/jquery_calendar
>
>Featured on Smashing Magazine Date Pickers
>http://www.smashingmagazine.com/2007/10/23/online-calendars-and-date-
>pickers/
>
>Thank you all for your great feedback which has made this Datepicker
>so successful!
>
>Marc Grabanski
>Interactive Developer
>http://marcgrabanski.com
>Minnesota, US




[jQuery] Re: LiveQuery (Discuss Please)

2007-11-01 Thread Dan G. Switzer, II

I think what I'd be more interested is having a method that would allow me
to really easily *manually* re-apply effects/events to a jQuery object.

For example:
$('li') 
.cache('some.name', function(){ 
// use the helper function hover to bind a mouseover and mouseout event 
$(this) 
.hover(function() { 
$(this).addClass('hover'); 
}, function() { 
$(this).removeClass('hover'); 
}); 
});

Now you could do:
$('li').applyCache('some.name');

Something like that would definitely save me some coding. (I'd allow a
manual cache "key", just so you could re-use the chain on other selectors.)

The benefit is you don't have the overhead of having to constantly monitor
the DOM, but you have an easy way to re-apply a bunch of commands to a
selector.

Right now I just use helper functions--which isn't hard, just not very
jQueryish. :)

Too bad there's no way to programmatically know the jQuery chain. It would
be really sweet to be able to do:

$('li')
.hover(function() { 
$(this).addClass('hover'); 
}, function() { 
$(this).removeClass('hover'); 
})
.cache('some.name');

And have the cache() method be aware of all the methods called in the
current chain.

-Dan

>-Original Message-
>From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>Behalf Of tlphipps
>Sent: Thursday, November 01, 2007 9:22 AM
>To: jQuery (English)
>Subject: [jQuery] Re: LiveQuery (Discuss Please)
>
>
>I'd like to second this opinion.  I'm using livequery more and more,
>but there are plenty of places where I DON'T use it, so not having it
>in the core would still be my preference.
>
>On Nov 1, 5:53 am, James Dempster <[EMAIL PROTECTED]> wrote:
>> My less than one pence worth would be I love and use the plugin, but I
>> don't think it should be included into jQuery core, I would
>> like to see jQuery core stay light and fresh. There's nothing wrong
>> with adding LiveQuery yourself, either just add another js file to
>> your html or append all the plugins you want to the same js file.
>>
>> /James
>>
>> On Nov 1, 2:04 am, "Yehuda Katz" <[EMAIL PROTECTED]> wrote:
>>
>> > So as far as I'm concerned, livequery is the biggest advance in jQuery
>since
>> > its inception (no, I am not its author). I'm trying to understand why
>it's
>> > having such a slow rate of adoption.
>>
>> > it solves this problem:
>> > $("div.klass").draggable();
>> > $("#foo").load("url", function() { $("div.klass").draggable(); });
>>
>> > beautifully, as you now only need to do:
>>
>> > $("div.klass").livequery(function() { $(this).draggable() });
>> > $("#foo").load("url");
>>
>> > Obviously, that was only a simple example. The more general case,
>wanting to
>> > bind some event handler to a selector regardless of when it appears on
>the
>> > page, is extremely common. So again, I'm trying to understand why the
>rate
>> > of adoption has been so slow. Any thoughts?
>>
>> > --
>> > Yehuda Katz
>> > Web Developer | Procore Technologies
>> > (ph)  718.877.1325
>




[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread Stefan Kilp [sk-software]

hi,

beginners question :-)

how do i set monday as first day in week (for germany)

Best regards,
Stefan Kilp

> 
> jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)
> 
> I am happy to announce that UI Datepicker version 3 has been released
> today.
> http://marcgrabanski.com/code/ui-datepicker/
> 
> Highlight New Features:
> Included in the official jQuery User Interface library (http://
> ui.jquery.com)
> Date range selection
> Display multiple months at a time
> More customization options
> License changed to reflect jQuery
> Compatibility option to use existing code
> 
> UI Datepicker was presented at jQuery Camp in Boston at Harvard. Here
> are the slides from the presentation:
> http://marcgrabanski.com/presentations/jQuery-Datepicker-Success.html
> 
> Mods based on jQuery Calendar:
> West Wind created an ASP.NET control out of jQuery Calendar
> http://www.west-wind.com/jqueryweb/jquerycalendar.aspx
> 
> PHP Framework Symfony Plugin (ddJQueryCalendar)
> http://trac.symfony-project.com/wiki/ddJQueryCalendar
> 
> Drupal jQuery Calendar Plugin
> http://drupal.org/project/jquery_calendar
> 
> Featured on Smashing Magazine Date Pickers
> http://www.smashingmagazine.com/2007/10/23/online-calendars-and-date-pickers/
> 
> Thank you all for your great feedback which has made this Datepicker
> so successful!
> 
> Marc Grabanski
> Interactive Developer
> http://marcgrabanski.com
> Minnesota, US
> 


--
Stefan Kilp
SK-Software, Entwicklung & Beratung

email: [EMAIL PROTECTED]

fon  : +49 6151 93344-0
fax  : +49 6151 93344-20
Herta-Mansbacher-Str. 98
64289 Darmstadt, Germany.
-



[jQuery] Re: Request for comments on code snippet.

2007-11-01 Thread Dan G. Switzer, II

>i've just started using jQuery, and I'm having lots of fun.
>
>I have the following code snippet. What it does is looks for all
>instances of a true and false and replaces the
>content with an image of a tick and cross.
>
>The snippet is
>
>   $("td").each(function(){
>   if (this.innerHTML == 'true') {
>   this.innerHTML = 'src="$base/images/true.png">';
>   }
>   if (this.innerHTML == 'false') {
>   this.innerHTML = 'src="$base/images/false.png">';
>   }
>   });
>
>I would just like to throw it out there, is there a neater way of
>using jQuery to perform the same function ? I tried
>
>$("td:contains('true')")
>
>, but the  can be nested, which causes the parent  to be
>replaced.

A couple of notes:

1) I'd try to use a more specific selector in order to reduce the number of
possible matches. The number of cells in a table can quickly get very large,
so parsing over every single  tag in a DOM can start to get slow. So, if
your table looked like:



Product X
true


Product Y
false



I'd use a selector like: $("#features tr > td.boolean")

This would limit the results to only the table cells with a class of
"boolean". That will drastically reduce your match set.

2) I'd use the html() method instead of innerHTML. If you're going to use
jQuery, take advantage of all it's cross browser goodness.

So, the revised code might look something like:

$("#features tr > td.boolean").each(function(){
// cache reference to current element as a jQuery object
var $el = $(this); 
// get the trimmed value in the cell
var sValue = $.trim($el.html());
// if the value is true or false, then replace the content with
image
if( sValue == "true" || sValue == "false" )
$el.html('');
});

-Dan



[jQuery] Re: LiveQuery (Discuss Please)

2007-11-01 Thread tlphipps

I'd like to second this opinion.  I'm using livequery more and more,
but there are plenty of places where I DON'T use it, so not having it
in the core would still be my preference.

On Nov 1, 5:53 am, James Dempster <[EMAIL PROTECTED]> wrote:
> My less than one pence worth would be I love and use the plugin, but I
> don't think it should be included into jQuery core, I would
> like to see jQuery core stay light and fresh. There's nothing wrong
> with adding LiveQuery yourself, either just add another js file to
> your html or append all the plugins you want to the same js file.
>
> /James
>
> On Nov 1, 2:04 am, "Yehuda Katz" <[EMAIL PROTECTED]> wrote:
>
> > So as far as I'm concerned, livequery is the biggest advance in jQuery since
> > its inception (no, I am not its author). I'm trying to understand why it's
> > having such a slow rate of adoption.
>
> > it solves this problem:
> > $("div.klass").draggable();
> > $("#foo").load("url", function() { $("div.klass").draggable(); });
>
> > beautifully, as you now only need to do:
>
> > $("div.klass").livequery(function() { $(this).draggable() });
> > $("#foo").load("url");
>
> > Obviously, that was only a simple example. The more general case, wanting to
> > bind some event handler to a selector regardless of when it appears on the
> > page, is extremely common. So again, I'm trying to understand why the rate
> > of adoption has been so slow. Any thoughts?
>
> > --
> > Yehuda Katz
> > Web Developer | Procore Technologies
> > (ph)  718.877.1325



[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

2007-11-01 Thread Karl Swedberg

Fantastic! Very slick.

Also, I really enjoyed your presentations at jQueryCamp07. Keep up  
the great work, Marc!



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



On Nov 1, 2007, at 12:34 AM, 1Marc wrote:



jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)

I am happy to announce that UI Datepicker version 3 has been released
today.
http://marcgrabanski.com/code/ui-datepicker/

Highlight New Features:
Included in the official jQuery User Interface library (http://
ui.jquery.com)
Date range selection
Display multiple months at a time
More customization options
License changed to reflect jQuery
Compatibility option to use existing code

UI Datepicker was presented at jQuery Camp in Boston at Harvard. Here
are the slides from the presentation:
http://marcgrabanski.com/presentations/jQuery-Datepicker-Success.html

Mods based on jQuery Calendar:
West Wind created an ASP.NET control out of jQuery Calendar
http://www.west-wind.com/jqueryweb/jquerycalendar.aspx

PHP Framework Symfony Plugin (ddJQueryCalendar)
http://trac.symfony-project.com/wiki/ddJQueryCalendar

Drupal jQuery Calendar Plugin
http://drupal.org/project/jquery_calendar

Featured on Smashing Magazine Date Pickers
http://www.smashingmagazine.com/2007/10/23/online-calendars-and- 
date-pickers/


Thank you all for your great feedback which has made this Datepicker
so successful!

Marc Grabanski
Interactive Developer
http://marcgrabanski.com
Minnesota, US





[jQuery] Re: LiveQuery (Discuss Please)

2007-11-01 Thread Gordon

As far as I cel tell LiveQuery runs every time the DOM is modified,
adding extra overhead to the already slow DOM operations (This isn't
jQuery or LiveQuery's fault, it's just a fact of web development that
manipulating the DOM is slow).  If you can get away without using
LiveQuery then it's best to from a performance point of view.  Don't
get me wrong, LiveQuery is great, you just hace to remember that its
power comes at a price, and tha price is high enough to justify
keeping it as an optional plugin.

On Nov 1, 2:04 am, "Yehuda Katz" <[EMAIL PROTECTED]> wrote:
> So as far as I'm concerned, livequery is the biggest advance in jQuery since
> its inception (no, I am not its author). I'm trying to understand why it's
> having such a slow rate of adoption.
>
> it solves this problem:
> $("div.klass").draggable();
> $("#foo").load("url", function() { $("div.klass").draggable(); });
>
> beautifully, as you now only need to do:
>
> $("div.klass").livequery(function() { $(this).draggable() });
> $("#foo").load("url");
>
> Obviously, that was only a simple example. The more general case, wanting to
> bind some event handler to a selector regardless of when it appears on the
> page, is extremely common. So again, I'm trying to understand why the rate
> of adoption has been so slow. Any thoughts?
>
> --
> Yehuda Katz
> Web Developer | Procore Technologies
> (ph)  718.877.1325



[jQuery] Re: setInterval, ajax call and LiveQuery : strange bug

2007-11-01 Thread Gonzo

Don't use setInterval on methods that use ajax.  Instead use
setTimeout as the last action in the callback for the ajax request.

The ajax request takes time, so making the request at a specific
interval may result in requests being processed much closer together
than expected.  What you really want to do is setup the timer to make
the request X seconds after the update process has completed.

On Oct 31, 6:23 am, "Samy RABIH" <[EMAIL PROTECTED]> wrote:
> Hi all
> I'm french PHP developer (part of the Spongestats project 
> -http://spongestats.sourceforge.net) and a newbie user of jQuery.
>
> I recently used jQuery to implement an ajax-powered refresh system for my
> last visitors (as shown onhttp://fetardalyon.sytes.net/Spongestats/v3/).
>
> But, I encoutered the following bug : setInterval is used to call an other
> page, every X seconds, and retrieve new visitors by ajax call. And, each
> ajax-call is executed twice :(
>
> By removing LiveQuery plugin, I can say this plugin is the source of my bug,
> but I need it to start events on ajax-generated content.
>
> So, can anybody help me to resolve it?
>
> Cordially
>
> Samy RABIH
> [EMAIL PROTECTED]



[jQuery] Request for comments on code snippet.

2007-11-01 Thread [EMAIL PROTECTED]

i've just started using jQuery, and I'm having lots of fun.

I have the following code snippet. What it does is looks for all
instances of a true and false and replaces the
content with an image of a tick and cross.

The snippet is

$("td").each(function(){
if (this.innerHTML == 'true') {
this.innerHTML = '';
}
if (this.innerHTML == 'false') {
this.innerHTML = '';
}
});

I would just like to throw it out there, is there a neater way of
using jQuery to perform the same function ? I tried

$("td:contains('true')")

, but the  can be nested, which causes the parent  to be
replaced.



[jQuery] Re: Include javafile

2007-11-01 Thread Muhammad Mohsin
i mean in head of the page.














listing java doesn't work here but works well when i write this code in end
of page




On 11/1/07, mohsin <[EMAIL PROTECTED]> wrote:
>
>
> I am using separate javascript file for the function I have written.
> When I include this file in header of my page these function doesn't
> worked. But when I include it in the bottom of page it start working.
> I want to include it in header can anyone help me.
>
>


[jQuery] Re: Superfish, bgiframe, jQuery 1.2 issues...

2007-11-01 Thread Joel Birch

Hi Ryan,

You didn't initialise your menu. Put this in a script tag after
including Superfish:

$(document).ready(function(){
$('ul.nav').superfish();
});

Of course you can also pass in an options object if you wish. Check
out the Superfish documentation for more info.
http://users.tpg.com.au/j_birch/plugins/superfish/

Joel Birch.


[jQuery] Re: [NEWS] Site Using jQuery: TurboTax.com

2007-11-01 Thread Tobias Parent


WLee Hinde wrote:

On 10/31/07, Guy Fraser <[EMAIL PROTECTED]> wrote:
  

Lee Hinde wrote:


http://cherne.net/brian/resources/jquery.hoverIntent.html

On 10/31/07, Guy Fraser <[EMAIL PROTECTED]> wrote:

  

 That rocks! I love the use of hover intent on the basic/delux/etc panels -
which plugin was used to do that?



Oops - I should have been more specific - what plugin is used to "zoom
out" the panels when you hover over them? I particularly like the way
the text scales smoothly. There's so much JS used on that site that I
can't see the college for the fish :s



My skill set ends at reading the html source. :-)

  
If you have Firebug installed (and you should, if you're a developer at 
ANY level!), click on the 'Script' tab, then just above the 'Script' you 
should see jQuery.js&session_id=XX... Click on that and switch to 
events_global.js - that shows what you're looking for, I think.

-Toby P.


[jQuery] Re: .mouseover performance

2007-11-01 Thread Cloudream

E... I wrote mouseMOVE before ... -.-||| sorry for puzzling

On Oct 31, 7:51 pm, Wizzud <[EMAIL PROTECTED]> wrote:
> Use the hoverIntent plugin.
> Using mousemove fires far too many events for your animation to handle
> - the instant the mouse moves onto a span, an event fires and the
> underbar tries to move; move the mouse by 1px and the event fires
> again, trying to move the underbar; etc, etc.
> If you were to start with your cursor off the far left of the spans,
> then move it across all the spans until it goes off the far right, an
> event will be fired for every pixel (if not more) covered in that
> journey. Each event gets queued, and for each event you have a 'slow'
> animation, which most of the time will not do anything during that
> animation period because the underbar does not need to move.
>
> If you try this instead, you should notice the difference...
>
> var d = $('div').width($('span:first').width());
> $('span').each(function(){
> var t = $(this)
>, o = { width: t.width()
>, marginLeft: t.offset().left};
> t.mouseover(function(){ d.animate(o ,'slow'); });
>
> });
>
> But, if you switch fast between spans, the underbar still plays catch-
> up (even if you were to ramp the speed up a bit) because of the
> successive queuing of animations - which is where the hoverIntent
> plugin could help you.
>
> HTH
>
> On Oct 31, 8:32 am, Cloudream <[EMAIL PROTECTED]> wrote:
>
>
>
> >http://labs.cloudream.name/jquery/move.html
>
> > executes slowly in every browser i tested,IE7/FF2/OP9/SA3...
>
> > any error in my code?- Hide quoted text -
>
> - Show quoted text -



  1   2   >