[jQuery] Re: plugin creation question

2008-02-13 Thread Joel Birch

Hi Alexandre,

I didn't really look too closely at your code but this might help
anyway. Try removing the brackets from the bit where you assign
initializeUploader to onIni so it looks like this:

$.fn.jqUploader.defaults = {
  onIni: initializeUploader, /*remove brackets*/
// more options...
  };

Then add brackets to the bit where you actually want the function to
run so that line will look like this:

/* PROBLEM IS HERE */
$this.options.onIni(); /*add brackets*/

I think you just had those two things the wrong way around.

Joel Birch.


[jQuery] Re: Loading page plugin or script.

2008-02-13 Thread [EMAIL PROTECTED]

Hi, Josoroma :)

It's easy to do this by making an absolutely positioned div, which
will sit on top of your page content for a set amount of time. jQuery
has some methods to do it, maybe you will find this article helpful:
http://tinyurl.com/yu9g7a

Cherry
http://jquery.cherryaustin.com

On Feb 13, 4:49 pm, Josoroma <[EMAIL PROTECTED]> wrote:
> Maybe a newbie question.
>
> When i use Plesk 8 there is a loading message that display loading
> page contents, and dissapear until all the page is loaded. There exist
> some jquery plugin or script for this kind of functionality? to
> prevent users to use the page options untill all the scripts, images
> and contets are loaded.
>
> Thanx in advance.


[jQuery] if (! someThing.fired ) {

2008-02-13 Thread [EMAIL PROTECTED]

Is *fired* a valid property? If it is, how should you access it?

There's nothing about it in the api, but I've seen it in some plugins.
I'm hoping (desperately, by now) that it may hold the key to my
painful non-working function problem ...


[jQuery] Re: how to disable wheel scroll?

2008-02-13 Thread [EMAIL PROTECTED]

Why on earth would you want to? Your visitors may think your page
broke their computer!

Eridius wrote:

> but the wheel scroll still scrolls the window, how to i disable it.


[jQuery] Re: Choosing an Autocompletion solution

2008-02-13 Thread timothytoe

I'll try Jörn's. The only thing that gave me pause on that one was the
number of dependencies.

On Feb 13, 6:15 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> I also decided to use that one (Jörn's) after evaluating 4 or 5 others.
> As you (timothy) noticed, many of the solutions borrowed from each
> other, but that one seemed to have the best aggregate of features from
> them all and some of the others looked like they might have been
> stagnating. It has also proven (to me) to be quite stable and easy to
> work with, although I'm using client side data, not ajax-loaded data, so
> can't vouch for that.
>
> - Jack
>
> Diego A. wrote:
> > I use:
> >http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
>
> > I made this decision a few months ago, but I remember going through 4
> > or 5 options (I even considered writing my own), but in the end I
> > chose the option that I thought was most likely to see future
> > development and support.
>
> > On Feb 13, 6:47 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> >> I searched google for "jquery autocompletion" and was overwhelmed by
> >> the choices. Looks like people have been borrowing heavily back and
> >> forth to get the best solution.
>
> >> Has anyone gone through the choices recently and selected one? If so,
> >> which did you choose and why?
>
> >> I'd like to use it for both local and Ajax server data.


[jQuery] Re: Updated API browser

2008-02-13 Thread Jack Killpatrick


FWIW, I pulled the necessary files down to my local system to give it a 
try (running of a local web server) and noticed that it's not much 
faster running locally than remotely. I suspect that's because of 
client-side lookups on the fetched XML file? If so, any way to speed it 
up? (I haven't reviewed the code). If that's not the cause, Remy, know 
what is?


Thanks, great resource!

- Jack

Rey Bango wrote:


Remy,

Can you make this downloadable so it can be run locally?

Rey



Hi all,
Ever since jQuery 1.1.3 the old API browser hasn't been updated due to
incompatibilities in the documentation (though that's mostly
assumptions). Although the new docs is comprehensive, I've always
liked the quick access the old API browser gave.
As such, I've got about my own way re-building an API browser based on
the new documentation (and assuming the documentation stays in the
wiki format, it should be easier to support upgraded documentation).
http://remysharp.com/jquery-api/
The API can be accessed either through live searching or directly on
the URL, e.g:
http://remysharp.com/jquery-api/bind/
Love to hear any feedback, etc.
The original post is 
here:http://remysharp.com/2008/02/12/jquery-api-browser/

Cheers,
Remy.











[jQuery] Re: Choosing an Autocompletion solution

2008-02-13 Thread Jack Killpatrick
I also decided to use that one (Jörn's) after evaluating 4 or 5 others. 
As you (timothy) noticed, many of the solutions borrowed from each 
other, but that one seemed to have the best aggregate of features from 
them all and some of the others looked like they might have been 
stagnating. It has also proven (to me) to be quite stable and easy to 
work with, although I'm using client side data, not ajax-loaded data, so 
can't vouch for that.


- Jack

Diego A. wrote:

I use:
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

I made this decision a few months ago, but I remember going through 4
or 5 options (I even considered writing my own), but in the end I
chose the option that I thought was most likely to see future
development and support.

On Feb 13, 6:47 pm, timothytoe <[EMAIL PROTECTED]> wrote:
  

I searched google for "jquery autocompletion" and was overwhelmed by
the choices. Looks like people have been borrowing heavily back and
forth to get the best solution.

Has anyone gone through the choices recently and selected one? If so,
which did you choose and why?

I'd like to use it for both local and Ajax server data.



  




[jQuery] Re: Correct way to read JSON string

2008-02-13 Thread Mike Alsup
>
>
> Also you can check jQuery's source around line 2200 for an interesting
> method that does not use eval:


It doesn't use eval explicitly, but the server response is eval'd implicitly
because it is requested with a script tag.


[jQuery] Re: Correct way to read JSON string

2008-02-13 Thread polyrhythmic

jQuery doesn't include JSON parsing separate from the getJSON, and if
you look at the source it's only a couple lines, and designed to work
with callbacks.  It does not do hardcore JSON sanitizing so you do
still need a safe source as always.

For one JSON parsing method, see http://mg.to/topics/programming/javascript/json
, one of the precursors to jQuery's support, I believe.

Also you can check jQuery's source around line 2200 for an interesting
method that does not use eval:
// Handle JSONP-style loading
window[ jsonp ] = function(tmp){
data = tmp;
success();
complete();
// Garbage collect
window[ jsonp ] = undefined;
try{ delete window[ jsonp ]; } catch(e){}
};

The code to 'decode' JSON is short, and eval can be very fast if you
have a safe source.  Otherwise there are utilities such as found on
www.JSON.org.

HTH

Charles

On Feb 13, 2:15 pm, J Moore <[EMAIL PROTECTED]> wrote:
> This isn't specific to jQuery. One way...
>
> var x = '{a:123,b:456}'; // json
> eval('var z='+x);
>
> z is now an object. z.a = 123, etc.
>
> -j
>
> On Feb 13, 3:47 pm, wolf <[EMAIL PROTECTED]> wrote:
>
> > hi,
>
> > what is the correct way in jQuery to decode = deserialize a JSON
> > string? jQuery itself can obviously do it as it can formulate and read
> > JSON via Ajax. But i seemingly can't find a callable in jQuery that
> > allows me to decode JSON without issuing an HTTP request. That is
> > strange to me.
>
> > Can you help?
>
> > _wolf


[jQuery] Re: what editor do you use?

2008-02-13 Thread Brice Burgess



On Feb 13, 11:38 am, Feijó <[EMAIL PROTECTED]> wrote:
> I changed my own a few weeks ago, now I'm using Editpad++ 
> (http://sourceforge.net/projects/notepad-plus/)
> its freeware, nice resources, like macros, quick-text, highlighted source, ...
> and yours?-- Feijó


I like mooEdit for an editor, and the Eclipse IDE + Aptana for
development.

I have a reference WIKI (for my own memory during system
reinstallations) setup with further detail;

  https://bricecubed.wikidot.com/start

~ Brice


[jQuery] how to disable wheel scroll?

2008-02-13 Thread Eridius


I have 

$(window).bind('scroll', function(){return false;});

but the wheel scroll still scrolls the window, how to i disable it.
-- 
View this message in context: 
http://www.nabble.com/how-to-disable-wheel-scroll--tp15471899s27240p15471899.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: what editor do you use?

2008-02-13 Thread Glen Lipka
Webuilder
http://www.blumentals.net/webuilder/

Gle

On Wed, Feb 13, 2008 at 5:01 PM, polyrhythmic <[EMAIL PROTECTED]> wrote:

>
> Komodo Edit: Free, runs on Gecko engine (with integrated previews),
> Windows/Linux/OSX crossplatform, jQuery autocomplete & macros, syntax
> highlighting and autocomplete across a multitude of languages, FTP/
> remote file support, code search and collapsible code tree... just for
> starters.  There's even Open Komodo, if you really want to roll your
> own.
>
> Don't know how I lived without it!
>
> - Charles
>
> On Feb 13, 3:46 pm, "Sebastián V. Würtz" <[EMAIL PROTECTED]>
> wrote:
> > textpad
> > textpad.com
> >
> > Feijó escribió:
> >
> > > I changed my own a few weeks ago, now I'm using Editpad++
> > > (http://sourceforge.net/projects/notepad-plus/)
> > > its freeware, nice resources, like macros, quick-text, highlighted
> > > source, ...
> >
> > > and yours?
> >
> > > --
> >
> > > Feijó
>


[jQuery] Re: what editor do you use?

2008-02-13 Thread polyrhythmic

Komodo Edit: Free, runs on Gecko engine (with integrated previews),
Windows/Linux/OSX crossplatform, jQuery autocomplete & macros, syntax
highlighting and autocomplete across a multitude of languages, FTP/
remote file support, code search and collapsible code tree... just for
starters.  There's even Open Komodo, if you really want to roll your
own.

Don't know how I lived without it!

- Charles

On Feb 13, 3:46 pm, "Sebastián V. Würtz" <[EMAIL PROTECTED]>
wrote:
> textpad
> textpad.com
>
> Feijó escribió:
>
> > I changed my own a few weeks ago, now I'm using Editpad++
> > (http://sourceforge.net/projects/notepad-plus/)
> > its freeware, nice resources, like macros, quick-text, highlighted
> > source, ...
>
> > and yours?
>
> > --
>
> > Feijó


[jQuery] Re: what editor do you use?

2008-02-13 Thread Sebastián V. Würtz


textpad
textpad.com

Feijó escribió:
I changed my own a few weeks ago, now I'm using Editpad++ 
(http://sourceforge.net/projects/notepad-plus/)
its freeware, nice resources, like macros, quick-text, highlighted 
source, ...


and yours?

--

Feijó
  


[jQuery] plugin creation question

2008-02-13 Thread Alexandre Plennevaux

hi!

while working on a plugin and following Mike Alsup's plugin pattern (
http://www.learningjquery.com/2007/10/a-plugin-development-pattern),
i'm stuck trying to reference an external function inside the plugin:


i have an externally accessible configuration object to store options
's default values.

$.fn.jqUploader.defaults = {
   onIni: initializeUploader(),
// more options...
   };

as you can see, i associate a named function to the onIni property of
the defaults object. Here is that function, completely external to the
plugin code.

function initializeUploader(){
   $(this).parents('form').find('input[type="submit"]').hide();
   $(this).css({background: 'red'});
}


now, in my main loop through each selected element, i want the user to
be able to overwrite on a case by case these defaults, via the meta
data plugin or a passed object

 var opts = $.extend({}, $.fn.jqUploader.defaults, options);
 return this.each(function(index){
   $this = $(this);
   // make jqUploader compatible with metadata plugin
   $this.options = $.meta ? $.extend({}, opts, $this.data()) : opts;
   /* PROBLEM IS HERE */
   $this.options.onIni;
   });


Problem is: the onIni function is called, but the command inside the
function is not performed "elem has no properties" which means that
$(this) refers to nothing i guess.
I think the reason is because it does not know anymore what is
referenced by $(this).
So, can someone kindly explain me what i'm doing wrong?

Thanks a lot,

Alexandre

-- 
Alexandre Plennevaux


[jQuery] Re: what editor do you use?

2008-02-13 Thread Feijó


nice one!! I'll give it a try for few days


timothytoe escreveu:

I tried a bunch and ended up with PSPad.
  


[jQuery] plugin to 'throw items around'

2008-02-13 Thread Bhaarat Sharma

Hi

Does anyone know a plugin that would let users 'throw items around' in
a designated area.

basically something like this

http://www.etsy.com/showcase.php once you click on an item, it pops up
and then u can draw and throw it.

i know there are bunch of drag and drop plugins around but anyone know
of 'drag and throw' maybe?


[jQuery] Re: kill the cpu

2008-02-13 Thread Sebastián V. Würtz


thx karl, im still learning jquery is a great thing, sometimes is miss 
the logic about it.


and its work perfect, now the cpu is 5 to 11%, and i notice i must 
define the function showtime inside the $(function(){} because i lose 
the vars in other way, but how i can make it work from outside? i need 
to redefine all my common.js script (only have 100 lines :) ) asap i 
goto upload my proyect wich is a news system and have tons of jquery 
scripts (the betters one).



Karl Rudd escribió:

Part of the problem may be that the elements are being searched every
time the function is called.

   $('.year').text(anio);
   $('.day').text(dia);
   $('.month').text(mes);
   $('.week').text(week);
   $('span.h').text(String(hours));
   $('span.minute').text(String(minutes));
   $('span.seconds').text(String(seconds));
   $('.ampm').text(ampm);

Also there is no "tag" specified for the "year", "day", "month",
"week" and "ampm" elements. What that means is that jQuery will look
at _every_ element on the page for one that has a "year" class, then
every element that has a "day" class, etc.

The elements can be "cached" and this _should_ improve the
performance. This might look like:

$(function() {
showtime();

var meses = 
["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"];
var dias = 
["DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO"];

var clockyear = $('.year');
var clockday = $('.day');
var clockmonth = $('.month');
var clockweek = $('.week');
var clockhour = $('span.h')
var clockminute = $('span.minute')
var clocksecond = $('span.seconds')
var clockampm = $('.ampm');

function showtime() {

var d = new Date();
var seconds = d.getSeconds();
var minutes = d.getMinutes();
var hours   = d.getHours();
var ampm = (hours >= 12) ? " PM" : " AM";
var week = dias[d.getDay()];
var mes = meses[d.getMonth()];
var dia = d.getDate();
var anio = d.getFullYear();

hours = ((hours > 12) ? hours - 12 : hours);
minutes = ((minutes <  10) ? "0" : "") + minutes;
seconds = ((seconds <  10) ? "0" : "") + seconds;

clockyear.text(anio);
clockday.text(dia);
clockmonth.text(mes);
clockweek.text(week);
clockhour.text(""+hours));
clockminute.text(""+minutes);
clocksecond.text(""+seconds);
clockampm.text(ampm);

setTimeout(showtime, 1000);
}
});

Notes:

A shortcut to writing String(number) can be ""+number.

Instead of:

   setTimeout('showtime()', 1000);

Changed it to :

   setTimeout( showtime, 1000 );

The setTimeout function can at a function or a string (which is
"eval"s), and it's better to pass it a "real" function so it doesn't
have to "eval" the code each time through.

There are some other optimisations you could do but that's a start.

Karl Rudd

On Feb 14, 2008 9:23 AM, "Sebastián V. Würtz" <[EMAIL PROTECTED]> wrote:
  

can this code kill a cpu?


$(function() {
show_clock();
});

function showtime() {
var meses = new
Array("ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC");
var dias = new
Array("DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO");

var d=new Date();
var seconds = d.getSeconds();
var minutes = d.getMinutes();
var hours   = d.getHours();
var ampm = (hours >= 12) ? " PM" : " AM";
var week = dias[d.getDay()];
var mes = meses[d.getMonth()];
var dia = d.getDate();
var anio = d.getFullYear();

hours = ((hours > 12) ? hours - 12 : hours);
minutes = ((minutes <  10) ? "0" : "") + minutes;
seconds = ((seconds <  10) ? "0" : "") + seconds;

$('.year').text(anio);
$('.day').text(dia);
$('.month').text(mes);
$('.week').text(week);
$('span.h').text(String(hours));
$('span.minute').text(String(minutes));
$('span.seconds').text(String(seconds));
$('.ampm').text(ampm);

setTimeout('showtime()', 1000);
}

the problem is the setTimeout('showtime()', 1000);
if i uncomment the show_clock() the cpu usage is normal, but is not, the
cpu usage is at 50%+ in ie6.






[jQuery] Re: change in jQuery.grep in 1.2.3?

2008-02-13 Thread Karl Rudd

It's because jQuery has been changed to no longer use "eval" (partly
to be compatible with Adobe AIR).

Karl Rudd

On Feb 14, 2008 10:25 AM, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
> Yeah.. same happened to me with map.. I had a ...
> $.map(Array(some_number),'new Image')... and it broke down since 1.2.2
> but I suppose that wasn't specified in the documentation so no one
> assured it'd stay.. or was it ?
>
> Ariel Flesler
>
> On 13 feb, 17:18, jody <[EMAIL PROTECTED]> wrote:
> > Using the following method no longer works in version 1.2.3 (stealing
> > examples from documentation):
> >
> > arr = jQuery.grep(arr, "a != 9");
> >
> > Debugging was showing an undefined function using the above method.
> > Rolling back to 1.2.2, all works fine with the above. Anticipating
> > using the new ui.jQuery package, I've modified my code to use a
> > version of this method which works with 1.2.3:
> >
> > arr = jQuery.grep(arr, function(n, i){
> >   return (n != 5 && i > 4);
> > });
> >
> > Was dropping the first method intentional for this jQuery release?
> >
> > -jody
>


[jQuery] Re: change in jQuery.grep in 1.2.3?

2008-02-13 Thread Ariel Flesler

Yeah.. same happened to me with map.. I had a ...
$.map(Array(some_number),'new Image')... and it broke down since 1.2.2
but I suppose that wasn't specified in the documentation so no one
assured it'd stay.. or was it ?

Ariel Flesler

On 13 feb, 17:18, jody <[EMAIL PROTECTED]> wrote:
> Using the following method no longer works in version 1.2.3 (stealing
> examples from documentation):
>
> arr = jQuery.grep(arr, "a != 9");
>
> Debugging was showing an undefined function using the above method.
> Rolling back to 1.2.2, all works fine with the above. Anticipating
> using the new ui.jQuery package, I've modified my code to use a
> version of this method which works with 1.2.3:
>
> arr = jQuery.grep(arr, function(n, i){
>       return (n != 5 && i > 4);
>     });
>
> Was dropping the first method intentional for this jQuery release?
>
> -jody


[jQuery] Re: what editor do you use?

2008-02-13 Thread Stephen

Have been using the HTML-Kit Tools (the purchased version) of
http://www.htmlkit.com/ since its release (years) and have found it
great.  Good for syntax highlighting, great plugins, and the purchased
version has an easy to use Project Interface to keep local and live
files organised.


[jQuery] Re: textArea select text.

2008-02-13 Thread Karl Rudd

The document.getElementById().select() method doesn't work in all
browsers so there needs to be some sort of "patched" function to get
the selection. See the linked blog entry for details (
http://blog.0xab.cd/jquery-plugin---fieldselection ).

The plugin is actually quite small and succinct, so I'm sure it would
be easy to "unJQuerify".

Karl Rudd

On Feb 14, 2008 9:25 AM, MorningZ <[EMAIL PROTECTED]> wrote:
>
> I am just curious, as i am trying to learn when jQuery might be
> overkill..but why wouldn't that simple
> document.getElementById().select() not be a desirable answer?
> like i don't see what is, or what can be, gained by jQuery-ifying it
>


[jQuery] Re: kill the cpu

2008-02-13 Thread Karl Rudd
Part of the problem may be that the elements are being searched every
time the function is called.

   $('.year').text(anio);
   $('.day').text(dia);
   $('.month').text(mes);
   $('.week').text(week);
   $('span.h').text(String(hours));
   $('span.minute').text(String(minutes));
   $('span.seconds').text(String(seconds));
   $('.ampm').text(ampm);

Also there is no "tag" specified for the "year", "day", "month",
"week" and "ampm" elements. What that means is that jQuery will look
at _every_ element on the page for one that has a "year" class, then
every element that has a "day" class, etc.

The elements can be "cached" and this _should_ improve the
performance. This might look like:

$(function() {
showtime();

var meses = 
["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"];
var dias = 
["DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO"];

var clockyear = $('.year');
var clockday = $('.day');
var clockmonth = $('.month');
var clockweek = $('.week');
var clockhour = $('span.h')
var clockminute = $('span.minute')
var clocksecond = $('span.seconds')
var clockampm = $('.ampm');

function showtime() {

var d = new Date();
var seconds = d.getSeconds();
var minutes = d.getMinutes();
var hours   = d.getHours();
var ampm = (hours >= 12) ? " PM" : " AM";
var week = dias[d.getDay()];
var mes = meses[d.getMonth()];
var dia = d.getDate();
var anio = d.getFullYear();

hours = ((hours > 12) ? hours - 12 : hours);
minutes = ((minutes <  10) ? "0" : "") + minutes;
seconds = ((seconds <  10) ? "0" : "") + seconds;

clockyear.text(anio);
clockday.text(dia);
clockmonth.text(mes);
clockweek.text(week);
clockhour.text(""+hours));
clockminute.text(""+minutes);
clocksecond.text(""+seconds);
clockampm.text(ampm);

setTimeout(showtime, 1000);
}
});

Notes:

A shortcut to writing String(number) can be ""+number.

Instead of:

   setTimeout('showtime()', 1000);

Changed it to :

   setTimeout( showtime, 1000 );

The setTimeout function can at a function or a string (which is
"eval"s), and it's better to pass it a "real" function so it doesn't
have to "eval" the code each time through.

There are some other optimisations you could do but that's a start.

Karl Rudd

On Feb 14, 2008 9:23 AM, "Sebastián V. Würtz" <[EMAIL PROTECTED]> wrote:
>
> can this code kill a cpu?
>
>
> $(function() {
> show_clock();
> });
>
> function showtime() {
> var meses = new
> Array("ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC");
> var dias = new
> Array("DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO");
>
> var d=new Date();
> var seconds = d.getSeconds();
> var minutes = d.getMinutes();
> var hours   = d.getHours();
> var ampm = (hours >= 12) ? " PM" : " AM";
> var week = dias[d.getDay()];
> var mes = meses[d.getMonth()];
> var dia = d.getDate();
> var anio = d.getFullYear();
>
> hours = ((hours > 12) ? hours - 12 : hours);
> minutes = ((minutes <  10) ? "0" : "") + minutes;
> seconds = ((seconds <  10) ? "0" : "") + seconds;
>
> $('.year').text(anio);
> $('.day').text(dia);
> $('.month').text(mes);
> $('.week').text(week);
> $('span.h').text(String(hours));
> $('span.minute').text(String(minutes));
> $('span.seconds').text(String(seconds));
> $('.ampm').text(ampm);
>
> setTimeout('showtime()', 1000);
> }
>
> the problem is the setTimeout('showtime()', 1000);
> if i uncomment the show_clock() the cpu usage is normal, but is not, the
> cpu usage is at 50%+ in ie6.
>
>
>


[jQuery] Re: Correct way to read JSON string

2008-02-13 Thread J Moore


This isn't specific to jQuery. One way...

var x = '{a:123,b:456}'; // json
eval('var z='+x);

z is now an object. z.a = 123, etc.

-j

On Feb 13, 3:47 pm, wolf <[EMAIL PROTECTED]> wrote:
> hi,
>
> what is the correct way in jQuery to decode = deserialize a JSON
> string? jQuery itself can obviously do it as it can formulate and read
> JSON via Ajax. But i seemingly can't find a callable in jQuery that
> allows me to decode JSON without issuing an HTTP request. That is
> strange to me.
>
> Can you help?
>
> _wolf


[jQuery] Re: tabs: Can't get tabs to work, but I'm including the right files!

2008-02-13 Thread MorningZ

Dave...  here is a packed version of UITabs that works

http://www.morningz.com/linked/Coding/ui.tabs.pack.js.txt

"Although I'm not getting JS errors any
more on this page...

http://elearningrd.info/tabs/docbuilder/test.php";


Using Firebug, that packed version is still throwing an error (there
is a missing semicolon throwing off the packing there)





On Feb 13, 4:50 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> That's fine, I went ahead and downloaded the files used 
> here,http://docs.jquery.com/UI/Tabs#Example, and I don't get any more weird
> JS errors.
>
> But I have another question.  Although I'm not getting JS errors any
> more on this page...
>
> http://elearningrd.info/tabs/docbuilder/test.php
>
> the LIs still aren't displaying as tabs.  I have included the style
> sheet and placed the images in the appropriate places, but I'm still
> missing something.  How can I make those LIs look like "tabs"?
>
> Thanks, - Dave
>
> On Feb 13, 3:27 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > Dave, that's weird, there's a syntax error in the packed script in the
> > second example, but the files are the same. I checked the response
> > headers and they're different:
>
> > DateWed, 13 Feb 2008 21:23:34 GMT
> > Server  Apache
> > Connection  Keep-Alive, Keep-Alive
> > Keep-Alive  timeout=15, max=98
> > Etag"f0c5db-17d1-47b3574f"
>
> > vs
>
> > DateWed, 13 Feb 2008 21:22:23 GMT
> > Server  Apache
> > Last-Modified   Wed, 13 Feb 2008 20:47:11 GMT
> > Etag"f0c5db-17d1-47b3574f"
> > Accept-Ranges   bytes
> > Content-Length  6097
> > Content-Typeapplication/x-javascript
>
> > Cant tell if that's somehow wrong...
>
> > --Klaus
>
> > On Feb 13, 9:52 pm, "[EMAIL PROTECTED]"
>
> > <[EMAIL PROTECTED]> wrote:
> > > I just downloaded the jquery tabs zip file, unzipped it and got the
> > > demo working
>
> > >http://elearningrd.info/tabs/scripts/tabs/
>
> > > but when I try and build my own page, I get JS errors:
>
> > >http://elearningrd.info/tabs/docbuilder/build_doc2.php
>
> > > I'm including the same JS files (so I think) as the demo page, but
> > > it's clearly not enough.  What gives?
>
> > > Thanks,- Dave- Hide quoted text -
>
> > - Show quoted text -


[jQuery] Re: returning an object array to a JS function - doesnt work

2008-02-13 Thread J Moore


you can't return a value from an anonymous function!

think about it: you call $.get() and pass in an anon function as a
parameter.

$.get() returns basically immediately, and then sometime later (much
later) your anon function will be called.

Where does the return value of anon go? Nowhere.

That's why you have to either process the result of your ajax call in
the anon method you pass in. (You can also stick the results in a
variable to be processed later, but that's a bit messier.)

-j

On Feb 12, 10:04 pm, jquertil <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm mixing regular javascript with Jquery and for some reason I cannot
> pass a return value back - any idea why?
>
> output = loadXMLarray('echo.php','datatable1') );
> alert (output); // does not work
>
> function loadXMLarray(scripturl,variable){
> $.get(scripturl,{xml:variable}, function(data){ // loading my XML
> objectArray = new Array(); // setting up my array to hold objects
> with
> $(data).find('row').each(function(i){ // iterating through my 
> XML
> source
> rowObj = new Object(); // adding attributes to my 
> object
> rowObj.col1 = $(this).children('col_1').text();
> rowObj.col2 = $(this).children('col_2').text();
> rowObj.col3 = $(this).children('col_3').text();
> objectArray.push(rowObj); // populating my array
> });
> alert(objectArray); // this works
> return objectArray; // does not work
> });
> return objectArray; // tried it here as well but that returns nothing
>
> }


[jQuery] Re: kill the cpu

2008-02-13 Thread Josh Nathanson


Rather than call the function recursively, you might want to use setInterval 
rather than setTimeout, which is what I think you are trying to 
achieve...that is, run the function once per second.


I think if you run the function recursively without an "exit strategy" you 
get a circular behavior which is probably why the CPU is getting hammered.


-- Josh


- Original Message - 
From: ""Sebastián V. Würtz"" <[EMAIL PROTECTED]>

To: "jquery" 
Sent: Wednesday, February 13, 2008 2:23 PM
Subject: [jQuery] kill the cpu




can this code kill a cpu?


$(function() {
   show_clock();
});

function showtime() {
   var meses = new 
Array("ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC");
   var dias = new 
Array("DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO");


   var d=new Date();
   var seconds = d.getSeconds();
   var minutes = d.getMinutes();
   var hours   = d.getHours();
   var ampm = (hours >= 12) ? " PM" : " AM";
   var week = dias[d.getDay()];
   var mes = meses[d.getMonth()];
   var dia = d.getDate();
   var anio = d.getFullYear();

   hours = ((hours > 12) ? hours - 12 : hours);
   minutes = ((minutes <  10) ? "0" : "") + minutes;
   seconds = ((seconds <  10) ? "0" : "") + seconds;

   $('.year').text(anio);
   $('.day').text(dia);
   $('.month').text(mes);
   $('.week').text(week);
   $('span.h').text(String(hours));
   $('span.minute').text(String(minutes));
   $('span.seconds').text(String(seconds));
   $('.ampm').text(ampm);

   setTimeout('showtime()', 1000);
}

the problem is the setTimeout('showtime()', 1000);
if i uncomment the show_clock() the cpu usage is normal, but is not, the 
cpu usage is at 50%+ in ie6.







[jQuery] Re: Grid with client side sorting

2008-02-13 Thread Shawn


If by "grid" you mean something like a table, then the tablesorter 
plugin does exactly what you're looking for.


Shawn

Lawrence Oluyede wrote:

At work we're evaluating some grid controls with client side sorting
capabilities.
We tried Ext.Grid but it's a little too invasive (it also modifies the
HTML content of the page outside the div where it belongs), it's
*really* heavy and have some issues with our
CSS files (its CSS classes are not even documented outside the CSS
files themselves AFAIK). The great thing by the way is that it sorts a
bunch of JSON data on the client side without
issuing a request to the server each time the user clicks on one of the headers.

Since we use jquery throughout the application I was wondering if
JQuery has something less invasive but with client sorting
capabilities.
I had a brief look into JqGridView but the demos show the sorting step
being done on the server.

My question is: does JqGridview have a way to sort the data already
retrieved? Are there any other jQuery based Grids doing that?

How did you manage to do this task on your projects?

Thanks



[jQuery] Re: textArea select text.

2008-02-13 Thread MorningZ

I am just curious, as i am trying to learn when jQuery might be
overkill..but why wouldn't that simple
document.getElementById().select() not be a desirable answer?
like i don't see what is, or what can be, gained by jQuery-ifying it


[jQuery] Pagination plugin (and jquery plugin instances in general)

2008-02-13 Thread J Moore

I'm using the pagination plugin at the top and bottom of a list.

Works great, except that the two instances are independent. Clicking
on page "3" in the one pagination instance will not change the other.

I've thought of various solutions/workarounds, but they all involve
getting access to the pagination instance. Is this possible?

Here's some sample code...

$(document).ready(function() {

  // there are two divs of class pagination.
  $('div.paging').pagination(list.length, {callback(pg):
drawpage(pg);});

  // so how can i access or call a method on these instances?

  // assuming that the divs have the ids #pager1 and #pager2
  // is there a way to access the pagination instance from jquery
internals?

});

-j


[jQuery] Re: Animate function. Once I animate how do I er.... de... animate

2008-02-13 Thread J Moore


um, use a variable?

var x = true;
$("#container").click(function() {
if (x) {
$("#container").animate({"marginTop": "-=237px"}, "slow");
} else {
$("#container").animate({"marginTop": "400px"}, "slow");
}
x = !x;
});

On Feb 13, 3:05 pm, somedude <[EMAIL PROTECTED]> wrote:
> Ok sorry about the title, don't know what to say.
>
> I have a site for a client, and when you click a certain div it
> animates with a marginTop -=300px like effect so the div is just
> visible sliding in behind another div.
>
> Now, if the user clicks the div again it will do the same and go up by
> 300px. What I want is a toggle like function where if you click it the
> second time it now adds the 300px back and the div is back in place.
>
> so right now here is the setup code, very simple:
>
> $("#container").click(function() { $
> ("#container").animate({"marginTop": "-=237px"}, "slow"); });
>
> There has to be an easier way then to set a cookie stating
> "Clicked=yes" then reset to "No"
>
> Anyone?
>
> Thanks


[jQuery] Re: jcarousel not loading fully in safair

2008-02-13 Thread heidik

well - we figured out a work for this...
safari seems to respond when the css come before the js - so switch
the order of calls and safari is happy (note we are loading
dynamically).


On Feb 13, 9:42 am, heidik <[EMAIL PROTECTED]> wrote:
> Hello All:
> We're getting ready to launch an awesome library of Mathematica
> generated screensavers and desktop backgrounds at wolfram research,
> where I'm senior graphic designer. We've got the jcarousel set up,
> loading images and working fantastic - EXCEPT in Safari. On entering
> the page in safari only two images are loaded and the rest are blank -
> as soon as you click on the next arrows (which aren't displaying quite
> correctly - a second issue) - the full carousel loads (although I do
> notice the next arrows don't seem to operate as smoothly/correctly/
> precisely as they do in other browsers). But most important is fixing
> this partially loaded carousel.
>
> I've noticed this happening in other sites using jquery/jcarousel -
> only in safari, so it's not a bug on my end - but
>
> IS THERE A FIX?
>
> I can't send a link because this is still behind our firewall in
> testing... but any help or comments would be greatly appreciated.
> THANK YOU.
> heidi k.


[jQuery] Re: Correct way to read JSON string

2008-02-13 Thread Shawn


one way (but probably not the best)

var myobj = eval(myjsonString);

I wouldn't trust this though - specially if the json string is from an 
untrusted source


Shawn

wolf wrote:

hi,

what is the correct way in jQuery to decode = deserialize a JSON
string? jQuery itself can obviously do it as it can formulate and read
JSON via Ajax. But i seemingly can't find a callable in jQuery that
allows me to decode JSON without issuing an HTTP request. That is
strange to me.

Can you help?

_wolf


[jQuery] Re: kill the cpu

2008-02-13 Thread Shawn


Where's the "show_clock()" function?  Or was that a typo?

Otherwise, I don't see anything glaringly wrong with the code (just a 
quick glance though...)


Shawn

Sebastián V. Würtz wrote:


can this code kill a cpu?


$(function() {
   show_clock();
});

function showtime() {
   var meses = new 
Array("ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"); 

   var dias = new 
Array("DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO"); 



   var d=new Date();
   var seconds = d.getSeconds();
   var minutes = d.getMinutes();
   var hours   = d.getHours();
   var ampm = (hours >= 12) ? " PM" : " AM";
   var week = dias[d.getDay()];
   var mes = meses[d.getMonth()];
   var dia = d.getDate();
   var anio = d.getFullYear();

   hours = ((hours > 12) ? hours - 12 : hours);
   minutes = ((minutes <  10) ? "0" : "") + minutes;
   seconds = ((seconds <  10) ? "0" : "") + seconds;

   $('.year').text(anio);
   $('.day').text(dia);
   $('.month').text(mes);
   $('.week').text(week);
   $('span.h').text(String(hours));
   $('span.minute').text(String(minutes));
   $('span.seconds').text(String(seconds));
   $('.ampm').text(ampm);

   setTimeout('showtime()', 1000);
}

the problem is the setTimeout('showtime()', 1000);
if i uncomment the show_clock() the cpu usage is normal, but is not, the 
cpu usage is at 50%+ in ie6.





[jQuery] kill the cpu

2008-02-13 Thread Sebastián V. Würtz


can this code kill a cpu?


$(function() {
   show_clock();
});

function showtime() {
   var meses = new 
Array("ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC");
   var dias = new 
Array("DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO");


   var d=new Date();
   var seconds = d.getSeconds();
   var minutes = d.getMinutes();
   var hours   = d.getHours();
   var ampm = (hours >= 12) ? " PM" : " AM";
   var week = dias[d.getDay()];
   var mes = meses[d.getMonth()];
   var dia = d.getDate();
   var anio = d.getFullYear();

   hours = ((hours > 12) ? hours - 12 : hours);
   minutes = ((minutes <  10) ? "0" : "") + minutes;
   seconds = ((seconds <  10) ? "0" : "") + seconds;

   $('.year').text(anio);
   $('.day').text(dia);
   $('.month').text(mes);
   $('.week').text(week);
   $('span.h').text(String(hours));
   $('span.minute').text(String(minutes));
   $('span.seconds').text(String(seconds));
   $('.ampm').text(ampm);

   setTimeout('showtime()', 1000);
}

the problem is the setTimeout('showtime()', 1000);
if i uncomment the show_clock() the cpu usage is normal, but is not, the 
cpu usage is at 50%+ in ie6.





[jQuery] Re: OT: FCK editor now double spaces with enter key?

2008-02-13 Thread Chris Jordan
Nice find. I'll bet that does it! :o)

On Feb 13, 2008 10:36 AM, tlphipps <[EMAIL PROTECTED]> wrote:

>
> I think I found the setting.  In the fckconfig.js file there are two
> lines:
> FCKConfig.EnterMode = 'p' ; // p | div | br
> FCKConfig.ShiftEnterMode = 'br' ;   // p | div | br
>
>
> Looks like if you change the first one to 'br' you'd be set.
>
> On Feb 13, 9:32 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> > Right...
> >
> > You can force it to single space by hitting SHIFT + enter, but I'd like
> to
> > know if there's a preference which can be changed to force it to revert
> to
> > single spacing by default. This is changed in the new version of FCK.
> >
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> >
> > Behalf Of andrea varnier
> > Sent: Wednesday, February 13, 2008 9:14 AM
> > To: jQuery (English)
> > Subject: [jQuery] Re: OT: FCK editor now double spaces with enter key?
> >
> > On 13 Feb, 16:03, "Chris Jordan" <[EMAIL PROTECTED]> wrote:
> > > that's lame.
> >
> > definitely.
> > but I think it has something to do with editors like Dreamweaver. I
> remember
> > using it once... is there a CTRL+Return combo or something?
>



-- 
http://cjordan.us


[jQuery] Re: what editor do you use?

2008-02-13 Thread Jake McGraw

Zend Studio, before that TextMate

On Feb 13, 2008 3:15 PM, Kyle Browning <[EMAIL PROTECTED]> wrote:
>
> Zend Studio.
>
>
> On Feb 13, 2008, at 12:15 PM, Alexandre Plennevaux wrote:
>
> > aptana studio
> >
> > On Feb 13, 2008 8:49 PM, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> On Feb 13, 2008, at 6:38 PM, Feijó wrote:
> >>
> >>> I changed my own a few weeks ago, now I'm using Editpad++ 
> >>> (http://sourceforge.net/projects/notepad-plus/
> >>> )
> >>> its freeware, nice resources, like macros, quick-text, highlighted
> >>> source, ..
> >>
> >> Textmate with jQuery bundle, of course :)
> >>
> >> http://macromates.com/
> >> http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery
> >>
> >>
> >> --
> >> Mika Tuupola
> >> http://www.appelsiini.net/
> >>
> >>
> >
> >
> >
> > --
> > Alexandre Plennevaux
> > LAb[au]
> >
> > http://www.lab-au.com
>
>


[jQuery] re[jQuery] moving a certain event from element

2008-02-13 Thread Eridius


I have a plugin that creates a click event on $(document).  I want to be able
to remove just that event and if something else has added an click event to
the $(document) I still want it.  $(document).unbind('click') will remove
all event, even ones i did not create.  is there a way to do this?
-- 
View this message in context: 
http://www.nabble.com/removing-a-certain-event-from-element-tp15468938s27240p15468938.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: [validate] Possible bug - if name field looks like: questionAnswersMap(Q8).answers[0]

2008-02-13 Thread Jörn Zaefferer


rickcr schrieb:

My name fields in my form are backed by a String array in a HashMap and I
need them in the following format:

questionAnswersMap(Q8).answers[0]

The problem is when I try to assign a validation rule to this name, I get an
error in the javascript parsing:

'missing : after property id
[Break on this error] questionAnswersMap(Q8).answers[0]: "required"\n'

My form declaration looks like:


$("#preAssessmentForm").validate({
  debug: true,
  errorContainer: container,
  errorLabelContainer: $("ul", container),
  wrapper: 'li',
  rules: {
   questionAnswersMap(Q8).answers[0]: "required"
},
messages: {
 questionAnswersMap(Q8).answers[0]: "You must select one or more
requlatory standards."
}


The above works fine for a typical named 'name' field. Is there something I
can do to get the above to parse correctly?
  

You need to quote the key in object literals:

{ "bla[xxx]...fwa.": "required" }

Jörn


[jQuery] Re: Choosing an Autocompletion solution

2008-02-13 Thread Jörn Zaefferer


Diego A. schrieb:

I use:
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

I made this decision a few months ago, but I remember going through 4
or 5 options (I even considered writing my own), but in the end I
chose the option that I thought was most likely to see future
development and support.
  
On that matter: On my current roadmap is the API browser, followed by 
the autocomplete plugin. So while there hasn't been updates for the 
autcomplete for some time, the version in SVN is quite stable and 
complete and it'll get updated in the next weeks/months.


Jörn


[jQuery] Re: [treeview] How to force a branch open.

2008-02-13 Thread Jörn Zaefferer


sozzi schrieb:

Thank you for the response,

I'll try to do that. I just wanted to make sure that you hadn't
allready integrated something like the active:"class" you have in the
accordion.

I'll let you know how it turns out. Thanks
  
Sooner or later I'll add a feature that'll work like the activate-method 
for the accordion.


Jörn


[jQuery] Re: tabs: Can't get tabs to work, but I'm including the right files!

2008-02-13 Thread [EMAIL PROTECTED]

That's fine, I went ahead and downloaded the files used here,
http://docs.jquery.com/UI/Tabs#Example, and I don't get any more weird
JS errors.

But I have another question.  Although I'm not getting JS errors any
more on this page...

http://elearningrd.info/tabs/docbuilder/test.php

the LIs still aren't displaying as tabs.  I have included the style
sheet and placed the images in the appropriate places, but I'm still
missing something.  How can I make those LIs look like "tabs"?

Thanks, - Dave

On Feb 13, 3:27 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Dave, that's weird, there's a syntax error in the packed script in the
> second example, but the files are the same. I checked the response
> headers and they're different:
>
> Date    Wed, 13 Feb 2008 21:23:34 GMT
> Server  Apache
> Connection      Keep-Alive, Keep-Alive
> Keep-Alive      timeout=15, max=98
> Etag    "f0c5db-17d1-47b3574f"
>
> vs
>
> Date    Wed, 13 Feb 2008 21:22:23 GMT
> Server  Apache
> Last-Modified   Wed, 13 Feb 2008 20:47:11 GMT
> Etag    "f0c5db-17d1-47b3574f"
> Accept-Ranges   bytes
> Content-Length  6097
> Content-Type    application/x-javascript
>
> Cant tell if that's somehow wrong...
>
> --Klaus
>
> On Feb 13, 9:52 pm, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > I just downloaded the jquery tabs zip file, unzipped it and got the
> > demo working
>
> >http://elearningrd.info/tabs/scripts/tabs/
>
> > but when I try and build my own page, I get JS errors:
>
> >http://elearningrd.info/tabs/docbuilder/build_doc2.php
>
> > I'm including the same JS files (so I think) as the demo page, but
> > it's clearly not enough.  What gives?
>
> > Thanks,- Dave- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: what editor do you use?

2008-02-13 Thread Erik Beeson
IntelliJ IDEA and gvim. I use gvim literally all the time. I have an icon on
my dock for "Open with gvim" that I can just drop files on. Very handy.

The nice thing about gvim (or vi in general I guess), is that while there
are a lot of commands, way more than anyone would be expected to learn all
in one sitting, the basic commands to get you started are pretty easy. i,
ESC, x, :wq are enough to get you started. And eventually you get tired of
deleting one character at a time, so you go lookup other delete commands,
and find dw to delete a word, and dd to delete a line. Then you figure out
that the d* commands cut, and p pastes. Then, when you get tired of doing
ddP to copy via cut-n-paste, you find yy copies ("yanks") without cutting.
You get tired of cutting one line at a time, so you find that prefixing any
command with a number makes it operate that many times.

Anyways, I could go on forever, but the point is it's not actually that
hard.

Oh, and IDEA is awesome also. Well worth the $$$. I just wish it had better
Scala support.

--Erik


On 2/13/08, Feijó <[EMAIL PROTECTED]> wrote:
>
>  I changed my own a few weeks ago, now I'm using Editpad++ (
> http://sourceforge.net/projects/notepad-plus/)
> its freeware, nice resources, like macros, quick-text, highlighted source,
> ...
>
> and yours?
>
> --
>
> Feijó
>
>


[jQuery] Re: tabs: Can't get tabs to work, but I'm including the right files!

2008-02-13 Thread Klaus Hartl

Dave, that's weird, there's a syntax error in the packed script in the
second example, but the files are the same. I checked the response
headers and they're different:

DateWed, 13 Feb 2008 21:23:34 GMT
Server  Apache
Connection  Keep-Alive, Keep-Alive
Keep-Alive  timeout=15, max=98
Etag"f0c5db-17d1-47b3574f"

vs

DateWed, 13 Feb 2008 21:22:23 GMT
Server  Apache
Last-Modified   Wed, 13 Feb 2008 20:47:11 GMT
Etag"f0c5db-17d1-47b3574f"
Accept-Ranges   bytes
Content-Length  6097
Content-Typeapplication/x-javascript

Cant tell if that's somehow wrong...

--Klaus


On Feb 13, 9:52 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I just downloaded the jquery tabs zip file, unzipped it and got the
> demo working
>
> http://elearningrd.info/tabs/scripts/tabs/
>
> but when I try and build my own page, I get JS errors:
>
> http://elearningrd.info/tabs/docbuilder/build_doc2.php
>
> I'm including the same JS files (so I think) as the demo page, but
> it's clearly not enough.  What gives?
>
> Thanks,- Dave


[jQuery] Re: Updated API browser

2008-02-13 Thread Glen Lipka
I love the site.  It's awesome.
Is it possible to update the existing http://www.jquery.com/api to use it?

Glen

On Wed, Feb 13, 2008 at 11:21 AM, Alexandre Plennevaux <[EMAIL PROTECTED]>
wrote:

>
> better the "*" suggestion. poor Remy's bandwidth otherwise !
>
> On Feb 13, 2008 3:22 PM, Joel Stein <[EMAIL PROTECTED]> wrote:
> >
> > I think the only thing I'd like to see on this is a way to see all
> > method.  Perhaps by default, everything shows, and when searching, it
> > refines the search?  Or maybe a * could search for everything...
> >
>
>
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com
>


[jQuery] Re: what editor do you use?

2008-02-13 Thread besh

Vim ...for everything

http://www.vim.org/index.php

--
Bohdan Ganicky


On Feb 13, 5:38 pm, Feijó <[EMAIL PROTECTED]> wrote:
> I changed my own a few weeks ago, now I'm using Editpad++ 
> (http://sourceforge.net/projects/notepad-plus/)
> its freeware, nice resources, like macros, quick-text, highlighted source, ...
> and yours?-- Feijó


[jQuery] Re: what editor do you use?

2008-02-13 Thread Kyle Browning

Zend Studio.

On Feb 13, 2008, at 12:15 PM, Alexandre Plennevaux wrote:

> aptana studio
>
> On Feb 13, 2008 8:49 PM, Mika Tuupola <[EMAIL PROTECTED]> wrote:
>>
>>
>> On Feb 13, 2008, at 6:38 PM, Feijó wrote:
>>
>>> I changed my own a few weeks ago, now I'm using Editpad++ 
>>> (http://sourceforge.net/projects/notepad-plus/
>>> )
>>> its freeware, nice resources, like macros, quick-text, highlighted
>>> source, ..
>>
>> Textmate with jQuery bundle, of course :)
>>
>> http://macromates.com/
>> http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery
>>
>>
>> --
>> Mika Tuupola
>> http://www.appelsiini.net/
>>
>>
>
>
>
> -- 
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com



[jQuery] Animate function. Once I animate how do I er.... de... animate

2008-02-13 Thread somedude

Ok sorry about the title, don't know what to say.

I have a site for a client, and when you click a certain div it
animates with a marginTop -=300px like effect so the div is just
visible sliding in behind another div.

Now, if the user clicks the div again it will do the same and go up by
300px. What I want is a toggle like function where if you click it the
second time it now adds the 300px back and the div is back in place.

so right now here is the setup code, very simple:

$("#container").click(function() { $
("#container").animate({"marginTop": "-=237px"}, "slow"); });

There has to be an easier way then to set a cookie stating
"Clicked=yes" then reset to "No"

Anyone?

Thanks


[jQuery] change in jQuery.grep in 1.2.3?

2008-02-13 Thread jody

Using the following method no longer works in version 1.2.3 (stealing
examples from documentation):

arr = jQuery.grep(arr, "a != 9");

Debugging was showing an undefined function using the above method.
Rolling back to 1.2.2, all works fine with the above. Anticipating
using the new ui.jQuery package, I've modified my code to use a
version of this method which works with 1.2.3:

arr = jQuery.grep(arr, function(n, i){
  return (n != 5 && i > 4);
});

Was dropping the first method intentional for this jQuery release?

-jody


[jQuery] Grid with client side sorting

2008-02-13 Thread Lawrence Oluyede

At work we're evaluating some grid controls with client side sorting
capabilities.
We tried Ext.Grid but it's a little too invasive (it also modifies the
HTML content of the page outside the div where it belongs), it's
*really* heavy and have some issues with our
CSS files (its CSS classes are not even documented outside the CSS
files themselves AFAIK). The great thing by the way is that it sorts a
bunch of JSON data on the client side without
issuing a request to the server each time the user clicks on one of the headers.

Since we use jquery throughout the application I was wondering if
JQuery has something less invasive but with client sorting
capabilities.
I had a brief look into JqGridView but the demos show the sorting step
being done on the server.

My question is: does JqGridview have a way to sort the data already
retrieved? Are there any other jQuery based Grids doing that?

How did you manage to do this task on your projects?

Thanks

-- 
Lawrence, stacktrace.it - oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair


[jQuery] Re: what editor do you use?

2008-02-13 Thread MorningZ

I'm a .NET programmer, so it's Visual Studio 2008 for me   and
with this week's hotfix, using jQuery is a breeze inside the enviroment


[jQuery] Re: jQuery BlockUI and ASP.NET

2008-02-13 Thread MorningZ

What is the function "test()" doing?

And a better way, well my opinion anyways, would be to use two
buttons, one pure HTML calling the block code, and one server side one
with "display: none"...

have the user click the HTML button/image, call your block code, and
if all is well, trigger the hidden asp:button's "click" event


[jQuery] Re: Using setTimeout with a callback (callback appends function content)

2008-02-13 Thread WolfZombie

Is there a better way to link animations in jQuery.  Maybe I am going
about this the wrong way.

On Jan 18, 2:19 pm, WolfZombie <[EMAIL PROTECTED]> wrote:
> I'm not sure if my last reply went through.
> Here is a link to the 
> file:http://www.cheesymovienight.com/test/slideshow/slide.php
>
> Clicking on the Play button at the bottom will start the slideshow.
> An alert "Play" is shown when the play function is called.  An alert
> "Set" is shown when the callback function (which uses setTimeout) is
> called.  On the first image each is called once, second image "Play"
> is called once and "Set" is called twice, and so on.
>
> Thanks again for any help.
>
> On Jan 18, 12:27 pm, Remy Sharp <[EMAIL PROTECTED]> wrote:
>
> > Have you got a working link you can point us to?  It's a little easier
> > to debug when you've got working demo.
>
> > Cheers.


[jQuery] Counting checked input checkboxes

2008-02-13 Thread alexyz

I would like to count the number of checkboxes with "checked"
attribute equals to true inside the page's "category section" in which
the user clicks.
I use the variable "checkedInputCheckboxCount" to store this
information but it seems that I get results multiplied by 2.

What did I do wrong? Any hint ?

Thanks a lot!

Alessandro

Here is my page:





.category{border: 1px solid grey;}
.container{border-spacing: 4px; width: 60%}



   $(document).ready(function() {
  // start JSP generated content
  var arr = new Array("foo", "bar", "misc");
  var customView = new Array();
  customView["CAT1"] = new Array("foo", "bar", "misc");
  customView["CAT2"] = new Array("bar");
  customView["CAT3"] = new Array();
  // end JSP generated content

  function clearBox(){
 for(var i = 0; i < arr.length; i++){
$("."+arr[i]).hide();
 }
  }

  function showBox(boxName){
 clearBox();
 var itemsToShow = customView[boxName];
 for(var i = 0; i < itemsToShow.length; i++)
$("."+itemsToShow[i]).show();
  }

  function resetScreen(){
 $(":checkbox").each(function() {
$(this).attr("checked", false);
 });
 clearBox();
  }

  resetScreen();

  var prevCategory = "";
  $(":checkbox").click(function() {

var selectedCategory = $(this).parents("table").attr("id");
// go up to find the table that include the clicked checkbox and then
count the number of checkboxes inside that table
var checkedInputCheckboxCount = $
(this).parents("table").find("[EMAIL PROTECTED]
[EMAIL PROTECTED]").size();
console.log("checked input checkbox count: " +
checkedInputCheckboxCount);

if(checkedInputCheckboxCount == 0)
clearBox(); // if none checkboxes is checked, don't display the
"content section"
else
showBox(selectedCategory);

// if current category differs from previous category decheck all
checkboxes of the previous category
 if(prevCategory != selectedCategory){
prevCategory = selectedCategory;
$(this).parents("#first").find("[EMAIL PROTECTED]
='"+selectedCategory+"']").each(function(){
$(this).find(":checkbox").each(function(){$
(this).attr("checked", false); });
});
 }
  });
   });



  

  

  
category 1
  
  
item 1

  
  
item 2

  
  
item 3

  

  


  

  
category 2
  
  
item 5

  
  
item 6

  

  


  

  
category 3
  
  
item 7

  

  

  
  sect 1 - some content ...
  sect 2 - some content ...
  sect 3 - some content ...




[jQuery] Correct way to read JSON string

2008-02-13 Thread wolf

hi,

what is the correct way in jQuery to decode = deserialize a JSON
string? jQuery itself can obviously do it as it can formulate and read
JSON via Ajax. But i seemingly can't find a callable in jQuery that
allows me to decode JSON without issuing an HTTP request. That is
strange to me.

Can you help?

_wolf


[jQuery] help with show hide on wordpress site

2008-02-13 Thread igb

Hello,

I am trying to use the show/hide jquery function to show and hide book
descriptions by clicking on the name of the book. It seems that the
script works OK in firefox but not at all in IE. (In IE the
descriptions are hidden and won't show)

For example,

http://squarehedge.com/bastianbooks/?cat=4

I have Jquery installed as party of a jquery lightbox plugin. Here is
my script:


$(document).ready(function() {
  $('div.demo-show> div').hide();
  $('div.demo-show> a9').click(function() {
var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div:visible');
if ($visibleSiblings.length ) {
  $visibleSiblings.slideUp('fast', function() {
$nextDiv.slideToggle('fast');
  });
} else {
   $nextDiv.slideToggle('fast');
}
  });
});



Here is my CSS:

.demo-show {
  width: 350px;
  margin: 1em .5em;
}
.demo-show a9 {
  margin: 0;
  padding: 5px;
  width: 338px;
  background: #bfcd93;
  border-top: 1px solid #386785;
  border-bottom: 1px solid #386785;
  cursor: pointer;
}
.demo-show div {
  padding: .5em .25em;
}

I obtained the script from this site: 
http://www.learningjquery.com/2007/03/accordion-madness

Any help is greatly appreciated!



[jQuery] Hide / Show problems with IE

2008-02-13 Thread igb

Hello,

I am trying to use the show/hide jquery function to show and hide book
descriptions by clicking on the name of the book. It seems that the
script works OK in firefox but not at all in IE. (In IE the
descriptions are hidden and won't show)

For example,

http://squarehedge.com/bastianbooks/?cat=4

I have Jquery installed as party of a jquery lightbox plugin. Here is
my script:


$(document).ready(function() {
  $('div.demo-show> div').hide();
  $('div.demo-show> a9').click(function() {
var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div:visible');
if ($visibleSiblings.length ) {
  $visibleSiblings.slideUp('fast', function() {
$nextDiv.slideToggle('fast');
  });
} else {
   $nextDiv.slideToggle('fast');
}
  });
});



Here is my CSS:

.demo-show {
  width: 350px;
  margin: 1em .5em;
}
.demo-show a9 {
  margin: 0;
  padding: 5px;
  width: 338px;
  background: #bfcd93;
  border-top: 1px solid #386785;
  border-bottom: 1px solid #386785;
  cursor: pointer;
}
.demo-show div {
  padding: .5em .25em;
}

I obtained the script from this site: 
http://www.learningjquery.com/2007/03/accordion-madness

Any help is greatly appreciated!



[jQuery] Re: what editor do you use?

2008-02-13 Thread WolfZombie

I'm using (and have been for quite a few years) TextPad.
http://www.textpad.com/


[jQuery] Re: Loading GIF Slideshow w/o Modal

2008-02-13 Thread Ange

Unfortunately, this method doesn't validate. I'm getting an error for
every appended image in the head of the page. Is there a way to
use .append( ') that validates?
-Ange


On Feb 4, 4:42 am, Pickledegg <[EMAIL PROTECTED]> wrote:
> Thats clever, thanks Ange. So on mouse over the image tags 02>07 are
> loaded. It looks like I'll have to figure a way of loading various
> additional images (ie the next 6 ) when they click again and so on,
> and a way to get around loading the same images again when they click
> back etc. Food for thought though.
>
> On Feb 2, 9:09 pm, Ange <[EMAIL PROTECTED]> wrote:
>
> > This method solves the preloading problem with the Cycle 
> > plugin.http://www.circleatseven.com/portfolio.php
>
> > $("div#gallerywrapper").one("mouseover", function() {
> > $("div#gallery").append(
> > '' +
> > '' +
> > '' +
> > '' +
> > '' +
> > '' );
> > $("div#slideswebbc").cycle({
> >   fx: 'fade',
> >   speed: 300,
> >   timeout: 0,
> >   next: '#next',
> >   prev: '#prev',
> >   pause: 1
> > });
> > });
>
> > On Feb 1, 4:13 am, Pickledegg <[EMAIL PROTECTED]> wrote:
>
> > > Hi Ange
>
> > > It looks fantastic, but I take it you're like me, and are searching
> > > for a databased or 'non-preloaded' version?
>
> > > On Jan 31, 6:58 pm, Ange <[EMAIL PROTECTED]> wrote:
>
> > > > Here's a link to the page working as I want it to, with the exception
> > > > of the initial pageloadbeing over 
> > > > 4MB:http://www.circleatseven.com/test/portfolio.php
>
> > > > On Jan 31, 12:05 pm, Pickledegg <[EMAIL PROTECTED]> wrote:
>
> > > > > SEAN-O
>
> > > > > The above link is what I found too, but you're missing the original
> > > > > post slightly. He needs something that you can plug into adatabase,
> > > > > as preloading theimagesis impractical with large files.
>
> > > > > Does anyone know of adatabaseready version?
>
> > > > > On Jan 31, 4:17 pm, Sean O <[EMAIL PROTECTED]> wrote:
>
> > > > > > Ange,
>
> > > > > > It sounds like the SlideViewer plugin might help 
> > > > > > you:http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/i...
>
> > > > > > SEAN O
> > > > > > _www.sean-o.com
>
> > > > > > Ange-6 wrote:
>
> > > > > > > I'm looking for a jQuery slideshow plugin, and I can't seem to 
> > > > > > > fond
> > > > > > > one that does all I need. Cycle and jCarousel come close. But my
> > > > > > > problem is I have multiple galleries on one page, and they all 
> > > > > > > have
> > > > > > > largeimages. So, since theyloadall theimagesin every gallery and
> > > > > > > then hide them, the page totals over 4000KB.
>
> > > > > > > I need something like Litebox or Thickbox that calls the next/prev
> > > > > > > image and loads it as needed, with a loading gif. But I don't 
> > > > > > > want a
> > > > > > > pop-up modal. It would be nice if I could just put one image from 
> > > > > > > each
> > > > > > > gallery in the HTML and have the prev/next buttonsloadand fade to
> > > > > > > the prev/next image.
>
> > > > > > > Any suggestions?
>
> > > > > > --
> > > > > > View this message in 
> > > > > > context:http://www.nabble.com/Loading-GIF-Slideshow-w-o-Modal-tp15194790s2724...
> > > > > Ange,
> > > > ent from the jQuery General Discussion mailing list archive at 
> > > > Nabble.com.


[jQuery] [validate] Possible bug - if name field looks like: questionAnswersMap(Q8).answers[0]

2008-02-13 Thread rickcr


My name fields in my form are backed by a String array in a HashMap and I
need them in the following format:

questionAnswersMap(Q8).answers[0]

The problem is when I try to assign a validation rule to this name, I get an
error in the javascript parsing:

'missing : after property id
[Break on this error] questionAnswersMap(Q8).answers[0]: "required"\n'

My form declaration looks like:


$("#preAssessmentForm").validate({
  debug: true,
  errorContainer: container,
  errorLabelContainer: $("ul", container),
  wrapper: 'li',
  rules: {
   questionAnswersMap(Q8).answers[0]: "required"
},
messages: {
 questionAnswersMap(Q8).answers[0]: "You must select one or more
requlatory standards."
}


The above works fine for a typical named 'name' field. Is there something I
can do to get the above to parse correctly?
-- 
View this message in context: 
http://www.nabble.com/-validate--Possible-bug---if-name-field-looks-like%3A-questionAnswersMap%28Q8%29.answers-0--tp15462087s27240p15462087.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Loading page plugin or script.

2008-02-13 Thread Josoroma

Maybe a newbie question.

When i use Plesk 8 there is a loading message that display loading
page contents, and dissapear until all the page is loaded. There exist
some jquery plugin or script for this kind of functionality? to
prevent users to use the page options untill all the scripts, images
and contets are loaded.

Thanx in advance.


[jQuery] Re: About jQuery.attr(type,value)

2008-02-13 Thread Karl Rudd

You'd be better off making a new "button" and copying the attributes
across. Certain browsers *cough* IE 6 *cough* don't allow you to
change the type of a "input" once it's created.

Karl Rudd

On Feb 13, 2008 10:23 PM, wwwiori <[EMAIL PROTECTED]> wrote:
>
> Dear Team,
> I have a question that how can I modify the attribute using jQuery.
> For example:
> There have a element:
>   
> and now I would like to change the type to "button", following code is
> my tried on IE7 and Firefox 2.02 on jQuery 1.2.3 and there are not
> success:
> 1.
>  $("#changeType").attr("type","button"); //failed
>
> 2.
>  $("#changeType").removeAttr("type");
>  $("#changeType").attr("type","button"); //failed
>
> I can modify the type by following code:
>
> document.getElementById("changeType").setAttribute("type","button");
> So,How can i do this by jQuery ? Thanks in advance for your gread
> help !!
>


[jQuery] Re: textArea select text.

2008-02-13 Thread Karl Rudd

Try this plugin:

http://laboratorium.0xab.cd/jquery/fieldselection/0.2.3-test/test.html

Karl Rudd

On Feb 13, 2008 8:48 PM, poncz <[EMAIL PROTECTED]> wrote:
>
> How do I mark the text in a textArea as selected?
> In DOM it would be document.getElementById("textAreaElm").select();
> But is does not work in jquery.
>
> Please help,
>


[jQuery] tabs: Can't get tabs to work, but I'm including the right files!

2008-02-13 Thread [EMAIL PROTECTED]

I just downloaded the jquery tabs zip file, unzipped it and got the
demo working

http://elearningrd.info/tabs/scripts/tabs/

but when I try and build my own page, I get JS errors:

http://elearningrd.info/tabs/docbuilder/build_doc2.php

I'm including the same JS files (so I think) as the demo page, but
it's clearly not enough.  What gives?

Thanks,- Dave


[jQuery] plugin creation / OOP question

2008-02-13 Thread Alexandre Plennevaux

hi!

while working on a plugin and following Mike Alsup's plugin pattern (
http://www.learningjquery.com/2007/10/a-plugin-development-pattern),
i'm stuck trying to reference an external function inside the plugin:


i have an externally accessible configuration object to store options
's default values.

$.fn.jqUploader.defaults = {
onIni: initializeUploader(),
// more options...
};

as you can see, i associate a named function to the onIni property of
the defaults object. Here is that function, completely external to the
plugin code.

function initializeUploader(){
$(this).parents('form').find('input[type="submit"]').hide();
$(this).css({background: 'red'});
}


now, in my main loop through each selected element, i want the user to
be able to overwrite on a case by case these defaults, via the meta
data plugin or a passed object

 var opts = $.extend({}, $.fn.jqUploader.defaults, options);
 return this.each(function(index){
$this = $(this);
// make jqUploader compatible with metadata plugin
$this.options = $.meta ? $.extend({}, opts, $this.data()) : opts;
/* PROBLEM IS HERE */
$this.options.onIni;
});


Problem is: the onIni function is called, but the command inside the
function is not performed "elem has no properties" which means that
$(this) refers to nothing i guess.
I think the reason is because it does not know anymore what is
referenced by $(this).
So, can someone kindly explain me what i'm doing wrong?

Thanks a lot,

Alexandre


[jQuery] Re: keeping element is same position no matter scroll

2008-02-13 Thread Eridius


I have used a js script that did this same thing(might have been the same
script) and instead of fixed IE 6 it would crash IE 6 randomly.  I also
think it is over kill to add 23KB to fix a small issue or make this a
requirement to use my plugin.


Cloudream wrote:
> 
> 
> try DEAN's IE7 js lib.
> http://dean.edwards.name/IE7/
> 
> On Feb 14, 4:08 am, Eridius <[EMAIL PROTECTED]> wrote:
>> I want to create the same effect the thickbox/thickbox reloaded does so
>> if
>> someone tries to scroll down manually with the mouse and browser side
>> scroll
>> bar my content remain in the same place not matter where they scroll, how
>> is
>> this possible?  I search the thickbox reloaded code and can't seem to
>> find
>> out how they did it.
>> --
>> View this message in
>> context:http://www.nabble.com/keeping-element-is-same-position-no-matter-scro...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/keeping-element-is-same-position-no-matter-scroll-tp15466372s27240p15467570.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: keeping element is same position no matter scroll

2008-02-13 Thread Cloudream

try DEAN's IE7 js lib.
http://dean.edwards.name/IE7/

On Feb 14, 4:08 am, Eridius <[EMAIL PROTECTED]> wrote:
> I want to create the same effect the thickbox/thickbox reloaded does so if
> someone tries to scroll down manually with the mouse and browser side scroll
> bar my content remain in the same place not matter where they scroll, how is
> this possible?  I search the thickbox reloaded code and can't seem to find
> out how they did it.
> --
> View this message in 
> context:http://www.nabble.com/keeping-element-is-same-position-no-matter-scro...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: keeping element is same position no matter scroll

2008-02-13 Thread Jeffrey Kretz

There are four ways to do this.

One is a css property called { position:fixed }, however that only works on
a CSS2 browser such as Firefox, Opera, Safari and IE7.  It does not work on
IE6 or below.

The second thing would be to attach a function to the window.onscroll event.

$(window).bind('scroll',AdjustPosition);

function AdjustPosition()
{
// adjust the top/left of the floating element.
}

The downside to this is the floating element bounces up and down as the
scroll event doesn't fire until the window stops scrolling.

The third way would be to use the css fixed for all browsers that support it
and the javascript solution for IE6 and below.

The fourth way is to do a number of odd CSS hacks that fool the IE6 browser
into honoring a position:fixed property.  You can do a Google search for
"css position fixed ie6" to see these, but I don't really know if any of
these are really trustworthy.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Eridius
Sent: Wednesday, February 13, 2008 12:16 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] keeping element is same position no matter scroll



I want to create the same effect the thickbox/thickbox reloaded does so if
someone tries to scroll down manually with the mouse and browser side scroll
bar my content remain in the same place not matter where they scroll, how is
this possible?  I search the thickbox reloaded code and can't seem to find
out how they did it.  This is for IE6 BTW.
-- 
View this message in context:
http://www.nabble.com/keeping-element-is-same-position-no-matter-scroll-tp15
466372s27240p15466372.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: what editor do you use?

2008-02-13 Thread Alexandre Plennevaux
aptana studio

On Feb 13, 2008 8:49 PM, Mika Tuupola <[EMAIL PROTECTED]> wrote:
>
>
> On Feb 13, 2008, at 6:38 PM, Feijó wrote:
>
> > I changed my own a few weeks ago, now I'm using Editpad++ 
> > (http://sourceforge.net/projects/notepad-plus/
> > )
> > its freeware, nice resources, like macros, quick-text, highlighted
> > source, ..
>
> Textmate with jQuery bundle, of course :)
>
> http://macromates.com/
> http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery
>
>
> --
> Mika Tuupola
> http://www.appelsiini.net/
>
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] keeping element is same position no matter scroll

2008-02-13 Thread Eridius


I want to create the same effect the thickbox/thickbox reloaded does so if
someone tries to scroll down manually with the mouse and browser side scroll
bar my content remain in the same place not matter where they scroll, how is
this possible?  I search the thickbox reloaded code and can't seem to find
out how they did it.
-- 
View this message in context: 
http://www.nabble.com/keeping-element-is-same-position-no-matter-scroll-tp15466372s27240p15466372.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: what editor do you use?

2008-02-13 Thread Mika Tuupola



On Feb 13, 2008, at 6:38 PM, Feijó wrote:

I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/ 
)
its freeware, nice resources, like macros, quick-text, highlighted  
source, ..


Textmate with jQuery bundle, of course :)

http://macromates.com/
http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery


--
Mika Tuupola
http://www.appelsiini.net/



[jQuery] Re: multi-leveled jcarousel

2008-02-13 Thread Josh V

yea, you might need to have it nested.

ul
li - div1 div2 div3 div4 div5 div6
/ul

On Feb 6, 7:11 pm, RyanAZ <[EMAIL PROTECTED]> wrote:
> does anybody know of a method that allows for two rows of three items
> to show up with thejcarouselplugin?


[jQuery] Re: Updated API browser

2008-02-13 Thread Alexandre Plennevaux

better the "*" suggestion. poor Remy's bandwidth otherwise !

On Feb 13, 2008 3:22 PM, Joel Stein <[EMAIL PROTECTED]> wrote:
>
> I think the only thing I'd like to see on this is a way to see all
> method.  Perhaps by default, everything shows, and when searching, it
> refines the search?  Or maybe a * could search for everything...
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Sortable and Cookie/history, need some help

2008-02-13 Thread eugene33

Hello,

I'm trying to make a frontpage like iGoogle, it works very nicely with
sortable but I cant get to keep the changes users made.  each loading
the changes disapear
I tried two options:
 * Cookie with the plugin from 
www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/
 * Serialize which gives me a nice hash but don't really know what to
do with it

I'm using Jquerry 1.2.3 and Jquery.UI 1.5b

I have another problem with the "additems" function, I would like to
increment the '+i+' and refresh the newly made module to be able to
sort it

Any help would be greatly appreciated



jQuery.noConflict();

 function addItems(e) {
for (var i = e - 1; i >= 0; i--){
jQuery('.Col').append('
Additional Content
'); }; } jQuery(window).bind("load",function(){ jQuery("#content").sortable({ items: ".Mod", revert: true, scroll: false, opacity: 20, containment: 'parent', placeholder: 'SortHelper', //the class te placeholder should have placeholderElement: '> div', //Due to IE's shitty rendering, sort: function(e, ui) { serialize(".Col"); }, update: function() { jQuery.cookie('test', 'serialize', { expires: 7 }); }, }); }); function serialize(s) { var str = []; var key = 'myKey[]='; var delimiter = '&' jQuery(s + "> *").not('.ui-sortable-helper').each(function() { str.push(key+this.getAttribute('id')); }); }; .. - My content - - My content - - My content - - My content - - My content - - My content -

[jQuery] Re: ajax file uploads: getting strange error

2008-02-13 Thread Jake McGraw

Just started getting this issue with the Forms plugin!

- jake

On Feb 9, 2008 5:07 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I just downloaded the latest version of the ajax file upload plugin
> (http://www.phpletter.com/Demo/AjaxFileUpload-Demo/).  I have created
> a test page
>
> http://elearningrd.info/test.php
>
> but every time I upload a file, the error callback is invoked and the
> message "Syntax error: Invalid label" is displayed. My file does get
> uploaded to the proper directory, but the error is troubling me. What
> does it mean and any ideas how to resolve it?
>
> Thanks, - Dave
>


[jQuery] Re: Choosing an Autocompletion solution

2008-02-13 Thread Diego A.

I use:
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

I made this decision a few months ago, but I remember going through 4
or 5 options (I even considered writing my own), but in the end I
chose the option that I thought was most likely to see future
development and support.

On Feb 13, 6:47 pm, timothytoe <[EMAIL PROTECTED]> wrote:
> I searched google for "jquery autocompletion" and was overwhelmed by
> the choices. Looks like people have been borrowing heavily back and
> forth to get the best solution.
>
> Has anyone gone through the choices recently and selected one? If so,
> which did you choose and why?
>
> I'd like to use it for both local and Ajax server data.


[jQuery] Re: Announce: Simple Effects Plugins on learningjquery.com

2008-02-13 Thread timothytoe

One thing I've been wondering about animate. Can you create a function
for the path that something moves along?

On Feb 13, 10:44 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I don't usually announce to this list when I post something on
> learningjquery.com, but I figured it might be worth doing so this
> time, because the entry grew out of a couple questions from the list.
> It shows how to extend jQuery's default set of effects/animations in a
> simple way. Hope you enjoy it:
>
> http://www.learningjquery.com/2008/02/simple-effects-plugins
>
> By the way, Dan G. Switzer blogged about this recently, too:
>
> http://blog.pengoworks.com/index.cfm/2008/2/6/jQuery-fadeToggle-plugin
>
> Cheers,
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Choosing an Autocompletion solution

2008-02-13 Thread timothytoe

I searched google for "jquery autocompletion" and was overwhelmed by
the choices. Looks like people have been borrowing heavily back and
forth to get the best solution.

Has anyone gone through the choices recently and selected one? If so,
which did you choose and why?

I'd like to use it for both local and Ajax server data.


[jQuery] Announce: Simple Effects Plugins on learningjquery.com

2008-02-13 Thread Karl Swedberg


Hi everyone,

I don't usually announce to this list when I post something on  
learningjquery.com, but I figured it might be worth doing so this  
time, because the entry grew out of a couple questions from the list.  
It shows how to extend jQuery's default set of effects/animations in a  
simple way. Hope you enjoy it:


http://www.learningjquery.com/2008/02/simple-effects-plugins

By the way, Dan G. Switzer blogged about this recently, too:

http://blog.pengoworks.com/index.cfm/2008/2/6/jQuery-fadeToggle-plugin

Cheers,

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





[jQuery] Re: what editor do you use?

2008-02-13 Thread timothytoe

I tried a bunch and ended up with PSPad.


[jQuery] Re: what editor do you use?

2008-02-13 Thread Andy Matthews
Yep...
 
Free is nice, but just because it's free doesn't make it the best.
 
Anyway...to each his own. I wish you the best of luck with NotePad++

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Feijó
Sent: Wednesday, February 13, 2008 12:21 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: what editor do you use?


They improved a little the interface, has been some time since the last time
I saw it

But editpad++ is free!! editplus has pay resources :)

baita abraço

Feijó


Andy Matthews escreveu: 

Not sure what you mean...I just looked at a screenshot of Notepad++ and it
looks almost the same as Editplus.
 
Notepad++
http://sourceforge.net/project/screenshots.php?group_id=95717
 
Editplus
http://www.editplus.com/ss/editplus.gif
 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Feijó
Sent: Wednesday, February 13, 2008 10:53 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: what editor do you use?


I dont like the editplus interface, very ancient :)

But its a good app too!!

Feijó

  


Andy Matthews escreveu: 

Editplus
 
www.editplus.com
 
Best one I've found in 6+ years of looking, been using it for about the same
amount of time.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Feijó
Sent: Wednesday, February 13, 2008 10:38 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] what editor do you use?


I changed my own a few weeks ago, now I'm using Editpad++
(http://sourceforge.net/projects/notepad-plus/)
its freeware, nice resources, like macros, quick-text, highlighted source,
...

and yours?


-- 



Feijó

  



[jQuery] Re: what editor do you use?

2008-02-13 Thread Alexis

I use vim, once you get used to most commands you realize how powerful
it is. I've been using it for more than 3 years now and it's all I
need for my PHP, jQuery, HTML, CSS, Python and even for writing blog
posts.


[jQuery] Re: what editor do you use?

2008-02-13 Thread Feijó





They improved a little the interface, has been some time since the last
time I saw it

But editpad++ is free!! editplus has pay resources :)

baita abraço
Feijó



Andy Matthews escreveu:

  
  
  
  Not sure what you mean...I just
looked at a screenshot of Notepad++ and it looks almost the same as
Editplus.
   
  Notepad++
  http://sourceforge.net/project/screenshots.php?group_id=95717
   
  Editplus
  http://www.editplus.com/ss/editplus.gif
   
  
  
  
  From:
jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] On
Behalf Of Feijó
  Sent: Wednesday, February 13, 2008 10:53 AM
  To: jquery-en@googlegroups.com
  Subject: [jQuery] Re: what editor do you use?
  
  
I dont like the editplus interface, very ancient :)
  
But its a good app too!!
  Feijó
  
  
  
Andy Matthews escreveu:
  

Editplus
 
www.editplus.com
 
Best one I've found in 6+ years
of looking, been using it for about the same amount of time.


 From: jquery-en@googlegroups.com
[mailto:jquery-en@googlegroups.com]
On Behalf Of Feijó
Sent: Wednesday, February 13, 2008 10:38 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] what editor do you use?


I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/)
its freeware, nice resources, like macros, quick-text, highlighted
source, ...

and yours?

-- 

Feijó
  
  





[jQuery] Re: [treeview] How to force a branch open.

2008-02-13 Thread sozzi

Thank you for the response,

I'll try to do that. I just wanted to make sure that you hadn't
allready integrated something like the active:"class" you have in the
accordion.

I'll let you know how it turns out. Thanks

Angelo

On Feb 13, 9:50 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> sozzi schrieb:> I love the plugin and it does its job perfectly. Especially 
> the
> > persist: "location" trigger makes my life so much easier. But I don't
> > quite know how to open a branch in reverse.
> > I.e. I use it for navigation and it works all the way down to the
> > category level using persist:location. But on the single entry pages
> > the URL is different. I know the catergory (i.e lowest branch) the
> > page belongs to and I can even set that branch to class="selected".
> > Unfortunately the tree remains closed.
>
> > The question is how can I make sure all the parent branches will open
> > if a lower branch is set to selected? Is there a trigger to force a
> > reverse evaluation or somesuch?
>
> Could you set the open-class to each parent? That may do the trick. If
> not, please try to provide a testpage.
>
> Jörn


[jQuery] Re: what editor do you use?

2008-02-13 Thread Andy Matthews
Not sure what you mean...I just looked at a screenshot of Notepad++ and it
looks almost the same as Editplus.
 
Notepad++
http://sourceforge.net/project/screenshots.php?group_id=95717
 
Editplus
http://www.editplus.com/ss/editplus.gif
 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Feijó
Sent: Wednesday, February 13, 2008 10:53 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: what editor do you use?


I dont like the editplus interface, very ancient :)

But its a good app too!!

Feijó


Andy Matthews escreveu: 

Editplus
 
www.editplus.com
 
Best one I've found in 6+ years of looking, been using it for about the same
amount of time.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Feijó
Sent: Wednesday, February 13, 2008 10:38 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] what editor do you use?


I changed my own a few weeks ago, now I'm using Editpad++
(http://sourceforge.net/projects/notepad-plus/)
its freeware, nice resources, like macros, quick-text, highlighted source,
...

and yours?


-- 



Feijó

  



[jQuery] Re: Release: Validation plugin 1.2.1

2008-02-13 Thread Jörn Zaefferer


Rufio schrieb:

Hi Jorn

I wanted to know why we would use class names such as:

class="{required:true,email:true}"

when the following will work perfectly and allows for easier class
manipulation (ie when making certain fields optional depending on
which submit button you press):

class="required email"

Does this not just cause confusion - surely there should just be the 1
way of doing it (the latter that is)?
  
The first version is what the plugin started with. The latter was added 
in the 1.2 release. I have plans to make that the default in 2.0, with 
the other options as plugins for the plugin.


Jörn


[jQuery] Re: [treeview] How to force a branch open.

2008-02-13 Thread Jörn Zaefferer


sozzi schrieb:

I love the plugin and it does its job perfectly. Especially the
persist: "location" trigger makes my life so much easier. But I don't
quite know how to open a branch in reverse.
I.e. I use it for navigation and it works all the way down to the
category level using persist:location. But on the single entry pages
the URL is different. I know the catergory (i.e lowest branch) the
page belongs to and I can even set that branch to class="selected".
Unfortunately the tree remains closed.

The question is how can I make sure all the parent branches will open
if a lower branch is set to selected? Is there a trigger to force a
reverse evaluation or somesuch?
  
Could you set the open-class to each parent? That may do the trick. If 
not, please try to provide a testpage.


Jörn



[jQuery] Re: [validate] custom submit action

2008-02-13 Thread Jörn Zaefferer


Josoroma schrieb:

If i have a custom css toolbar in a form called "confirm" that doesn't
use a normal submit button like:


Instead i need to use the following css-link-button to check the
validate before submit:


How can i do the validate and submit?
  

Try to submit the form via jQuery, that triggers the validation:

$("#myform").submit();

Jörn


[jQuery] Re: clock pick in ajax loaded form - ie error

2008-02-13 Thread Josh Nathanson


Hey Pete,

It looks like you're not using the latest release.  I can tell because the 
bgiFrame option does not appear in the clockpick.js source code in Firebug 
when I view your page.  This option was added in the latest release.


That said, it should still work...not sure what is going on there, since it 
is supposed to position the div based on the mouse position.


I do get the "templateShifts" alert popup on both FF and IE6 though.

-- Josh


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

To: "jQuery (English)" 
Sent: Tuesday, February 12, 2008 8:39 PM
Subject: [jQuery] Re: clock pick in ajax loaded form - ie error




Thanks Josh,

I've edited the page to remove the positioning. Not sure why I added
that in, but I think it had things working better.

I removed that bit and loaded it up to the same page.

I'm still amazingly puzzled at how the alert doesn't trigger.
I've moved the function call up to above the cancelForm function, but
still nothing. 




[jQuery] Re: Wrapping Contiguous Elements

2008-02-13 Thread Karl Swedberg


Hi Ron,

you should be able to do this with the .wrapAll() method:

http://docs.jquery.com/Manipulation/wrapAll

Something like this, maybe:

$('input:radio').each(function() {
  var $next = $(this).next('label');
  var $both = $(this).add($next);
  if ($both.length == 2) {
$both.wrapAll('');
  }
});


There's probably a better way to do it, but I'm pretty sure this will  
work.


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



On Feb 12, 2008, at 9:26 PM, Ron Hall wrote:



I have HTML code that looks like this:


Yes


And I need to wrap all of it in SPAN tags. Like this:

value="Yes" /

Yes


I tried to use code similar to this to do it.

$(document).ready(function(){
$("input").before("");
$("label").after("");
});

But it did not like the opening and closing tags to be separated. The
browser would self close the opening tag and ignore the closing tag.

I then thought to use wrap but I cannot figure out from the
documentation how to select both tags together so it sees them as one
unit to be wrapped. Any ideas?

Thanks,
Ron




[jQuery] Re: returning an object array to a JS function - doesnt work

2008-02-13 Thread Dave Methvin

The loadXMLarray() is trying to return objectArray before the callback
in $.get() has finished.  You probably need to use a callback for
loadXMLarray as well.

Also, you are defining objectArray as a global variable since it
doesn't have "var" in front of it. That is probably a bad idea.


[jQuery] Re: what editor do you use?

2008-02-13 Thread Feijó





I dont like the editplus interface, very ancient :)

But its a good app too!!

Feijó



Andy Matthews escreveu:

  
  
  Editplus
   
  www.editplus.com
   
  Best one I've found in 6+ years
of looking, been using it for about the same amount of time.
  
  
  From:
jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] On
Behalf Of Feijó
  Sent: Wednesday, February 13, 2008 10:38 AM
  To: jquery-en@googlegroups.com
  Subject: [jQuery] what editor do you use?
  
  
I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/)
its freeware, nice resources, like macros, quick-text, highlighted
source, ...
  
and yours?
  
  -- 

Feijó
  






[jQuery] Re: what editor do you use?

2008-02-13 Thread Feijó





lol
yes, notepad++

Feijó



spinnach escreveu:

..you mean notepad++ :)..
  
  
i'm using it also, great little app..
  
  
dennis.
  
  
Feijó wrote:
  
  I changed my own a few weeks ago, now I'm
using Editpad++ (http://sourceforge.net/projects/notepad-plus/)

its freeware, nice resources, like macros, quick-text, highlighted
source, ...


and yours?


-- 

Feijó

  






[jQuery] Re: overlaying jqModal over other divs

2008-02-13 Thread Alexandre Plennevaux

no problemo :)

On Feb 13, 2008 4:55 PM, pere roca <[EMAIL PROTECTED]> wrote:
>
>
>
>   Well, it was just a simple z-index issue
> (http://dev.iceburg.net/jquery/jqModal/toTop.html)
>
>   thanks again, Alexandre
>   Pere
>
>
>
> pere roca wrote:
> >
> >  dear jquery list,
> >
> >  here come again wondering if someone can give me a little clue to
> > what's going wrong when trying to overlay a draggable window (jqModal)
> > over another div (containing a map application).
> >
> >  The problem is when you put the jqModal over the map and try to
> > interact with it; it zooms in and out and you cannot work with the
> > jqModal window. You can test it in
> > http://edit3.csic.es/edit_geo/prototype/symbologies.html
> >
> >  using Firefox 2.0 you can interact fine with the jqModal outside the
> > map; using IE the window doesn't work properly but it lets you
> > interact "fine" over the map, without zooms when you select from the
> > form!
> >
> >  Really don't understand what's wrong, I've checked everything.
> >  It's about CSS?
> >  It's about the div location on the HTML?
> >  Maybe should I create a function like: when jqModal div is over this
> > other div (the one contains the map), don't listen the map controls...
> >
> >  Maybe any other alternative? another similar tool?
> >
> >  thanks alot,
> >  Pere
> >
>
> --
> View this message in context: 
> http://www.nabble.com/overlaying-jqModal-over-other-divs-tp15441856s27240p15459728.html
>
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: what editor do you use?

2008-02-13 Thread andrea varnier

Notepad++;

:)


[jQuery] Re: animation question

2008-02-13 Thread andrea varnier

On 13 Feb, 06:41, spaceage <[EMAIL PROTECTED]> wrote:
> Is this a reasonable undertaking using jQuery, or is there another
> better way (or plug in) to do this?

jQuery is perfect for this kind of things :)
just give the div a overflow:hidden style, and the li's a
position:relative, and a very high top.

div {
overflow:hidden;
height:300px;
width:250px;
border:2px solid black;
}
li {
position:relative;
top:1000px;
}

then you could do the animation with some code like this (this fires
at page load)

$(document).ready(function(){
var spacing = 30;  // arbitrary, change as you please
var upLi = function(n) {
$('li:eq(' + n + ')').animate({top: spacing*n}, function(){
if ($('li:eq(' + (n+1) + ')')[0] != undefined) 
upLi(n+1);
});
}
upLi(0);
});


[jQuery] Re: what editor do you use?

2008-02-13 Thread Andy Matthews
Editplus
 
www.editplus.com
 
Best one I've found in 6+ years of looking, been using it for about the same
amount of time.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Feijó
Sent: Wednesday, February 13, 2008 10:38 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] what editor do you use?


I changed my own a few weeks ago, now I'm using Editpad++
(http://sourceforge.net/projects/notepad-plus/)
its freeware, nice resources, like macros, quick-text, highlighted source,
...

and yours?


-- 



Feijó


[jQuery] Re: jQuery BlockUI and ASP.NET

2008-02-13 Thread Mike Alsup
Is this only a problem in IE?

where "clk_search" is the method that submit the form.
> With this code, my loading message box appears but no submit has made.
> What's wrong?
>
> thanks
> alberto
>
>


[jQuery] Re: what editor do you use?

2008-02-13 Thread spinnach


..you mean notepad++ :)..

i'm using it also, great little app..

dennis.

Feijó wrote:
I changed my own a few weeks ago, now I'm using Editpad++ 
(http://sourceforge.net/projects/notepad-plus/)
its freeware, nice resources, like macros, quick-text, highlighted 
source, ...


and yours?

--

Feijó





[jQuery] what editor do you use?

2008-02-13 Thread Feijó





I changed my own a few weeks ago, now I'm using Editpad++
(http://sourceforge.net/projects/notepad-plus/)
its freeware, nice resources, like macros, quick-text, highlighted
source, ...

and yours?

-- 

Feijó





  1   2   >