[jQuery] Re: Strip element from inside object

2008-11-21 Thread briandichiara

Ok, I think I got it:

var the_val = ob.clone().find("span").remove();
alert(the_val.html());

On Nov 22, 12:12 am, briandichiara <[EMAIL PROTECTED]> wrote:
> I'm returning a jQuery object  that has  class="type"> inside as .html().
>
> So how do i get rid of the span class="type" from the object and then
> place the rest of the HTML into another element?
>
> Example:
>
> function otherFunction(){
>      doFunction($(myObj));
>
> }
>
> function doFunction(ob){
>      alert(ob.html()); // where this line alerts the  and 2 
> tags mentioned above.
>
> }
>
> Thanks.


[jQuery] Strip element from inside object

2008-11-21 Thread briandichiara

I'm returning a jQuery object  that has  inside as .html().

So how do i get rid of the span class="type" from the object and then
place the rest of the HTML into another element?

Example:

function otherFunction(){
 doFunction($(myObj));
}

function doFunction(ob){
 alert(ob.html()); // where this line alerts the  and 2 
tags mentioned above.
}


Thanks.


[jQuery] How to memorize a "class" change?

2008-11-21 Thread lukas

I am removing&adding a class to a DIV. What is the best way to
memorize this change for the application before it is resetting itself
while going through the loop again? Thank you!


[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-21 Thread Leeoniya

thats what i was looking for, thanks!

On Nov 21, 10:25 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote:
> I've used a pattern like this:
>
> var table = $('table.class')
>    .bind('click',selectCell);
>
> function selectCell(e)
> {
>    var cell = e.target;
>    do_something();
>
> }
>
> var cell = table.find('td.eq(8)');
> selectCell.apply(table[0],[{target:cell[0]}]);
>
> JK
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Leeoniya
> Sent: Friday, November 21, 2008 7:11 PM
> To: jQuery (English)
> Subject: [jQuery] event delegation - great, but how does one trigger the
> handlers through code?
>
> During event delegation, handlers are registered higher in the DOM
> tree and then filtered when the event is triggered. This is great if
> you have 2000 td/th cells, you can attach a listener to tbody and
> filter down. But would i trigger the event programatically? Since the
> handler isnt actually registered on the td cells, i cant figure out a
> way to do this except maybe construct a fake event with the source
> element by hand and pass it into the handler somehow??
>
> this is the biggest drawback to delegation that i have run into, it
> would be great to find a good way to manually trigger these events -
> if anyone has some advice, please share.
>
> thanks,
> Leon


[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread Rick Faircloth


Jason...

I'm not sure I understand what your plug-in is for.
When you say it's a "breadcrumb" plugin, I thought you meant
it would show a site visitor the "trail" of pages visited.

I'm not quite sure I know how to set this up.  I created actual
pages from your demo...biocompate.html, kits_assays.html, etc.,
so there would be actual pages to visit, but the order the
"breakcrumbs" never changes, but stays in the order of the
list of pages in "breadcrumb0", the id of the div in which I changed the 
links.


A little help for the clueless?

Thanks,

Rick


heysatan wrote:

jBreadCrumb RELEASED

Hi all, I've put the breadcrumb plugin up on jquery's site:

http://plugins.jquery.com/project/jBreadCrumb

Here's a link to the working example (also linked to from the jquery
page)

http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html

Let me know what you think, there are some improvements that can be
made for sure.  It's decently smart but I think I will improve the
collapsing algorithm to know what it needs to collapse based on
individual elements width.

Oh, and it's compatible with ie 6, ie 7 and all standards compliant
browsers.

Thanks,

Jason


On Nov 20, 6:14 pm, heysatan <[EMAIL PROTECTED]> wrote:
  

I am just finishing up version 0.1, it will be up tomorrow morning
(Pacific time).

On Nov 18, 2:04 pm, yvonney <[EMAIL PROTECTED]> wrote:



Oh YES!!! that WOULD be fabulous I know how busy life gets of
course... Jason! when you have time we'd all love to play with a
plugin version I bet!
  
best wishes
  
On Nov 11, 2:32 pm, Andy Matthews <[EMAIL PROTECTED]> wrote:
  

I'd be interested in this as a plugin as well.

On Nov 11, 4:21 pm, heysatan <[EMAIL PROTECTED]> wrote:


That's a start.
  
On Nov 10, 4:13 pm, Microbe <[EMAIL PROTECTED]> wrote:
  

Demand # 1

:o)

On Nov 11, 8:57 am, heysatan <[EMAIL PROTECTED]> wrote:


Hi Sean,
  
I built this breadcrumb animation.  Due to time limitations at the end

of the project I wasn't able to make it into a plugin (I built a lot
of other plugins for this project), but I'd like to when I get a
chance.
  
I really solved a problem for us because our category and page titles

are so long (scientists are long winded).  Before we would show only a
couple of steps in the HTML to get around this.  This method was more
SEO friendly, more usable, and I thought, kind of cool.
  
If there is a demand for it I'll work on porting it to a plugin, but

probably not for the next 2 weeks or so.
  
Jason

Lead UI Developer - CompareNetworks
  
On Nov 10, 1:21 am, CliffordSean <[EMAIL PROTECTED]> wrote:
  

see the breadcrumb on here 
:http://www.biocompare.com/ProductDetails/386912/1/Mutation-Generation...
has anyone come across a plugin like this ?

tnx

sean
--
View this message in 
context:http://www.nabble.com/has-anyone-come-across-a-plugin-like-this---tp2...
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




---
Text inserted by Panda IS 2009:

 This message has NOT been classified as spam. If it is unsolicited mail (spam), click 
on the following link to reclassify it: 
http://localhost:6083/Panda?ID=pav_10186&SPAM=true&path=C:\Documents%20and%20Settings\Rick%20Faircloth\Local%20Settings\Application%20Data\Panda%20Security\Panda%20Internet%20Security%202009\AntiSpam
---


  


[jQuery] Re: setRequestHeader('Cache-Control', 'private') ... does not work in $.ajax call

2008-11-21 Thread Bil Corry

Mike Alsup wrote on 11/21/2008 7:27 PM: 
> "Responses to this method are not cacheable, unless the response
> includes appropriate Cache-Control or Expires header fields.  What are
> your response headers?

Hmmm.  I created a new demo that uses $.ajax and includes both GET and POST:

http://www.corry.biz/cachetest/

For POST, Firefox 3 does send the following two headers:

Pragma: no-cache
Cache-Control: no-cache

And you can't override it in FireFox with SetRequestHeader().  This is 
interesting because the XHR spec says the browser shouldn't auto-send those 
headers, and it should allow our script to override those values: 

-
If the user agent implements a HTTP cache it should respect Cache-Control 
request headers set by the script (e.g., Cache-Control: no-cache bypasses the 
cache).

It must not send Cache-Control or Pragma request headers automatically unless 
the user explicitly requests such behavior (e.g., by (force-)reloading the 
page).

http://www.w3.org/TR/XMLHttpRequest/#send
-

Beyond that, my server ignores those request headers and sends new data every 
time the browser asks for it.  And as you can see in the cache tests, Firefox 
refuses to cache a POST, even when it receives headers directing it to cache 
the page contents (the same headers work successfully with GET).

In contrast, Internet Explorer 7 by default caches everything unless you tell 
it not to with response headers (or a random URL token).  It behaves 
identically for both GET and POST.


- Bil



[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-21 Thread Jeffrey Kretz

I've used a pattern like this:

var table = $('table.class')
   .bind('click',selectCell);

function selectCell(e)
{
   var cell = e.target;
   do_something();
}

var cell = table.find('td.eq(8)');
selectCell.apply(table[0],[{target:cell[0]}]);

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Leeoniya
Sent: Friday, November 21, 2008 7:11 PM
To: jQuery (English)
Subject: [jQuery] event delegation - great, but how does one trigger the
handlers through code?


During event delegation, handlers are registered higher in the DOM
tree and then filtered when the event is triggered. This is great if
you have 2000 td/th cells, you can attach a listener to tbody and
filter down. But would i trigger the event programatically? Since the
handler isnt actually registered on the td cells, i cant figure out a
way to do this except maybe construct a fake event with the source
element by hand and pass it into the handler somehow??

this is the biggest drawback to delegation that i have run into, it
would be great to find a good way to manually trigger these events -
if anyone has some advice, please share.

thanks,
Leon



[jQuery] Re: exclude children from selected elements

2008-11-21 Thread Karl Swedberg

One very minor note: you don't need to do this:

var elm = e.target || e.srcElement;

this is fine:

var elm = e.target;

jQuery normalizes the target property. From the core file ...

// Fix target property, if necessary
if ( !event.target )
			event.target = event.srcElement || document; // Fixes #1925 where  
srcElement might not be defined either


Cheers,

--Karl


On Nov 21, 2008, at 7:05 PM, ricardobeat wrote:



By the way, you could use event delegation to simplify things a lot:

$(document).ready(function(){
  $('body').mouseover(function(e){
   var elm = e.target || e.srcElement;
   if ( !$(elm).parents('.ui-dialog').length ) { //if .ui-dialog
is not an ancestor
  $(elm).doStuff();
   }
  });
});

It might be slower than binding the function straight to each element,
but it will pay off on very large DOMs.

- ricardo

On Nov 21, 8:07 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

My mistake, it is working. The problem was my lack of understanding
about how Dialog works.  main is the div from which I create a Dialog
and I didn't want the event listener to be added to the elements of
main. However main is NOT the first element of the Dialog. I the
background it is wrapped around other elements and the top one has
class .ui-dialog  . All sorted. Thanks .

On 21 nov, 09:32, "[EMAIL PROTECTED]"

<[EMAIL PROTECTED]> wrote:

It still doesn't work. I think part of the problem is because the
children of main are added after I create the event listener.



Second solution is to check in the event listener if the target is a
child of main and if so, return.  I know how to get the children of
main , but how to I check the current tartget is one of them ?



ricardobeat> I need to select all objects of the page because I want
to do a DOM inspector. But yes you are right, maybe I should only
start from body !



Thanks



On 20 nov, 18:25, ricardobeat <[EMAIL PROTECTED]> wrote:


Are you sure you want to apply it to *all* elements on the page?  
That

sounds a bit awkward.



var main =  $('#main, #main *');
$('body *').not(main).mouseover(function(){...});



On Nov 20, 2:07 pm, "[EMAIL PROTECTED]"



<[EMAIL PROTECTED]> wrote:

Hi,



I want to apply a mouseover event on all elements but one and its
children. I can't use class name to filter. How can I do it ?   
I've

tried unsuccessfully :


$("*:not(#main)").not($ 
("#main").children()).mouseover(function() {



});



thanks




[jQuery] Re: Do i need to unbind event before removing DOM element

2008-11-21 Thread Karl Rudd

jQuery will take care of the cleanup.

Karl Rudd

On Sat, Nov 22, 2008 at 2:48 PM, George <[EMAIL PROTECTED]> wrote:
>
> I am creating dynamicly  tag and binding click event.
> $('#myspan').bind('click', param, myFunc);
>
> Then at some point this  is removed using JQuery. Do i need to
> unbind click event first?
> Or it's ok and Javascript will clean that up automaticly..
>
> George.


[jQuery] Do i need to unbind event before removing DOM element

2008-11-21 Thread George

I am creating dynamicly  tag and binding click event.
$('#myspan').bind('click', param, myFunc);

Then at some point this  is removed using JQuery. Do i need to
unbind click event first?
Or it's ok and Javascript will clean that up automaticly..

George.


[jQuery] event delegation - great, but how does one trigger the handlers through code?

2008-11-21 Thread Leeoniya

During event delegation, handlers are registered higher in the DOM
tree and then filtered when the event is triggered. This is great if
you have 2000 td/th cells, you can attach a listener to tbody and
filter down. But would i trigger the event programatically? Since the
handler isnt actually registered on the td cells, i cant figure out a
way to do this except maybe construct a fake event with the source
element by hand and pass it into the handler somehow??

this is the biggest drawback to delegation that i have run into, it
would be great to find a good way to manually trigger these events -
if anyone has some advice, please share.

thanks,
Leon


[jQuery] Re: jquery for slideshows

2008-11-21 Thread Sai Krishna
I found this through stumble. Thanks to Jquery. It reduces flash cost
http://www.gruppo4.com/~tobia/cross-slide.shtml
Sai Krishna


On Sat, Nov 22, 2008 at 6:57 AM, Milan Andric <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I am working on a project where one component is a slideshow
> application with audio. I'm wondering if I can use jquery/javascript
> for this.  If anyone has any links to examples or ideas of ways to
> deal with a series of images and audio file that synchronizes with the
> images in javascript, it would be greatly appreciated.  A first step
> would be a jquery library that supports a configurable slideshow with
> audio.
>
> Eventually I would like to build something similar to the slideshare
> sync tool, which allows you to synchronize audio with images.  This
> version is done in flash. I'm wondering if javascript could accomplish
> the same things.
> http://www.flickr.com/photos/johntynan/3032282040/
> http://www.slideshare.net/faqs/slidecast#1g
>
> Thanks for you help,
>
> Milan Andric
> http://m.andric.us/
>


[jQuery] Does anyone know where I can find a Carousel like this?

2008-11-21 Thread IsRaz88

I've been trying for the past couple of days to find a Carousel like
this that does expand and go into color when you click the picture:
http://templates.entheosweb.com/template_number/18937.asp

If anyone can point me in direction it would be very much appreciated.

-IsRaz88


[jQuery] jquery for slideshows

2008-11-21 Thread Milan Andric

Hello,

I am working on a project where one component is a slideshow
application with audio. I'm wondering if I can use jquery/javascript
for this.  If anyone has any links to examples or ideas of ways to
deal with a series of images and audio file that synchronizes with the
images in javascript, it would be greatly appreciated.  A first step
would be a jquery library that supports a configurable slideshow with
audio.

Eventually I would like to build something similar to the slideshare
sync tool, which allows you to synchronize audio with images.  This
version is done in flash. I'm wondering if javascript could accomplish
the same things.
http://www.flickr.com/photos/johntynan/3032282040/
http://www.slideshare.net/faqs/slidecast#1g

Thanks for you help,

Milan Andric
http://m.andric.us/


[jQuery] Re: setRequestHeader('Cache-Control', 'private') ... does not work in $.ajax call

2008-11-21 Thread Mike Alsup

> The example you listed below is using a different jQuery method, load
> (), to retrieve the content. It's not sending the headers, which is
> good. But I think I need to use the $.ajax() method.


Ah, now I see what you're doing.  You're using POST.  Here's a snippet
from http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html regarding
the HTTP POST method:

"Responses to this method are not cacheable, unless the response
includes appropriate Cache-Control or Expires header fields.  What are
your response headers?



[jQuery] Re: Validate. Can I validate using 2 values?

2008-11-21 Thread shapper

Please, could you tell me how to do that?

I would like to add the username only to this validate requests and
not to all requests on my page ...

If I add it to all requests on my pages will I not need to have
username as input of all the other JSON methods even if I don't use
it,

Could someone, please advice me on this ... I really don't know what
should I do.

Thanks,
Miguel

On Nov 18, 2:50 pm, shapper <[EMAIL PROTECTED]> wrote:
> Hi Miguel,
>
> Could you, please, show me your JQuery validate code to do that?
>
> Thanks,
> Miguel
>
> On Nov 18, 6:08 am, Daniel <[EMAIL PROTECTED]> wrote:
>
> > For my case , I get the user value from the field and add it as a
> > parameter into the remote's url . Sth like this : /
> > checkpass&user=userid
>
> > Daniel.
>
> > On Nov 17, 5:07 am, shapper <[EMAIL PROTECTED]> wrote:
>
> > > In this case I have only the validate request for the password field
> > > that also sends the username for the test ...
>
> > > But if I would have various requests, from validate or others,
> > > shouldn't I add the username only to the password validate request?
>
> > > Is this possible?
>
> > > Thanks,
> > > Miguel
>
> > > On Nov 16, 6:45 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > This would add the username to all requests:
>
> > > > $().ajaxSend(function(event, XMLHttpRequest, ajaxOptions) {
> > > >   ajaxOptions.data.username = $("#username").val();
>
> > > > });
>
> > > > Jörn
>
> > > > On Sun, Nov 16, 2008 at 7:18 PM, shapper <[EMAIL PROTECTED]> wrote:
>
> > > > > Sorry, is there any example using validate for this?
>
> > > > > To be honest I am completely lost on how to do this ...
>
> > > > > Thank You,
> > > > > Miguel
>
> > > > > On Nov 16, 10:39 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > >> I mean
>
> > > > >> $().ajaxSend(function() {
>
> > > > >> });
>
> > > > >> Jörn
>
> > > > >> On Sun, Nov 16, 2008 at 1:24 AM, shapper <[EMAIL PROTECTED]> wrote:
>
> > > > >> > Hi Jorn,
>
> > > > >> > You mean using:
>
> > > > >> >  $.ajax({
> > > > >> >   beforeSend: function(){
> > > > >> >   }
> > > > >> >  });
>
> > > > >> > And in before send get the value of the text box and add it to the
> > > > >> > ajax validate request of the validate?
>
> > > > >> > But how can I link it to the Validate email validation?
>
> > > > >> > Thanks,
> > > > >> > Miguel
>
> > > > >> > On Nov 15, 2:21 pm, Alexsandro_xpt <[EMAIL PROTECTED]> wrote:
> > > > >> >> And about form submit before to validate e-mail field?
>
> > > > >> >> Do you know something about that?
>
> > > > >> >> Thanks
> > > > >> >> Alexsandro
>
> > > > >> >> On 13 nov, 14:00, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> > > > >> >> wrote:
>
> > > > >> >> > The plugin doesn't support that. As a workaround, you can use 
> > > > >> >> > jQuery's
> > > > >> >> > ajaxSend callback to add additional data to the 
> > > > >> >> > request:http://docs.jquery.com/Ajax/ajaxSend#callback
>
> > > > >> >> > Jörn
>
> > > > >> >> > On Thu, Nov 13, 2008 at 3:35 PM, shapper <[EMAIL PROTECTED]> 
> > > > >> >> > wrote:
>
> > > > >> >> > > Hello,
>
> > > > >> >> > > I am using the following to validate an email field:
>
> > > > >> >> > > Email: { email: true, remote: "/Account/FindEmail", required: 
> > > > >> >> > > true }
>
> > > > >> >> > > I am checking if there is already an account with that email.
>
> > > > >> >> > > In my form I also have an input where the user inserts its 
> > > > >> >> > > username.
> > > > >> >> > > When validating the email I need to send also the Username an 
> > > > >> >> > > not only
> > > > >> >> > > the email.
>
> > > > >> >> > > Can I do this?
>
> > > > >> >> > > Thanks,
> > > > >> >> > > Miguel


[jQuery] Re: highlighting elements of the page

2008-11-21 Thread Karl Swedberg

Try using the .hover() method instead.

http://docs.jquery.com/Events/hover#overout

From the docs:

Additionally, checks are in place to see if the mouse is still  
within the specified element itself (for example, an image inside of  
a div), and if it is, it will continue to 'hover', and not move out  
(a common error in using a mouseout event handler).



You could also use .bind('mouseenter', fn) and .bind('mouseleave',  
fn) , but .hover(fn, fn) is usually more convenient



--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Nov 19, 2008, at 10:03 AM, [EMAIL PROTECTED] wrote:



Hi,

I'm trying to highlights elements of the page on mouseover. I want to
highlight all td's h1's and p's when the mouse is over.

$("td, h1, p").mouseover(function() {
   $(this).css("backgroundColor", "CC");
 });

 $("p, h1, td").mouseout(function() {
   $(this).css("backgroundColor", mObj.prevBGColor);
 });

That doesn't do what I want. Indeed if a   is inside a , only
the td gets highlighted (or maybe the p too, but then since the td is
also hightlighted, it doesn't look right)

How can I specify that only top element should be highlighted ?

Thanks




[jQuery] Re: Crazy tables with checkboxes

2008-11-21 Thread c.barr

Yes, I was able to (finally) solve all these problems, it just took a
bit longer than I thought.  I forgot to post an update here that I've
fixed it.  Thanks for taking a look anyway though, if you see anything
that can be improved, please let me know!

On Nov 21, 7:00 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hey Chris,
>
> It looks like you managed to fix the other problems, too. When I click  
> the header checkbox, only the rows with checkboxes are being  
> highlighted now. And the rows aren't remaining highlighted when I  
> check one and then check and uncheck a header.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Nov 21, 2008, at 3:46 PM, c.barr wrote:
>
>
>
> > It seems jsbin.com is down right now, so I've uploaded it to my site:
> >http://chris-barr.com/files/checkboxes/
> > source:http://chris-barr.com/files/checkboxes/DTcheckboxes.js
>
> > Also, I've fixed the issue with shift-selection, but the other
> > problems still remain.
>
> > On Nov 21, 12:01 pm, "c.barr" <[EMAIL PROTECTED]> wrote:
> >> err, correction to what I wrote, shift-selection only works when
> >> selecting top to bottom, not the other way around.


[jQuery] Re: Crazy tables with checkboxes

2008-11-21 Thread Karl Swedberg

Hey Chris,

It looks like you managed to fix the other problems, too. When I click  
the header checkbox, only the rows with checkboxes are being  
highlighted now. And the rows aren't remaining highlighted when I  
check one and then check and uncheck a header.


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Nov 21, 2008, at 3:46 PM, c.barr wrote:



It seems jsbin.com is down right now, so I've uploaded it to my site:
http://chris-barr.com/files/checkboxes/
source: http://chris-barr.com/files/checkboxes/DTcheckboxes.js

Also, I've fixed the issue with shift-selection, but the other
problems still remain.

On Nov 21, 12:01 pm, "c.barr" <[EMAIL PROTECTED]> wrote:

err, correction to what I wrote, shift-selection only works when
selecting top to bottom, not the other way around.




[jQuery] Re: setRequestHeader('Cache-Control', 'private') ... does not work in $.ajax call

2008-11-21 Thread frankadelic

When the browser requests a page, it can demand an uncached copy by
sending these headers:

Pragma: no-cache
Cache-Control: no-cache

For example, if you hit ctrl+F5 to refresh a page in Firefox, these
headers will be sent in the Request. This tells the server to return
an uncached page.

My problem is, the jQuery $.ajax() call is passing these headers every
time. I can't force it to exclude the headers. As a result, the web
service returns a cached copy.
Is it possible to change these headers in the $.ajax() call?

The example you listed below is using a different jQuery method, load
(), to retrieve the content. It's not sending the headers, which is
good. But I think I need to use the $.ajax() method.


> You can see the behavior of your own browser here:
>
>http://www.corry.biz/iecache/


[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread CliffordSean


jason - your a legend

thanks alot i look forward to playing with this!
-- 
View this message in context: 
http://www.nabble.com/Please-REPLY-if-you-want-to-see-Jason-develop-this-Plugin-for-us-%21-tp20406388s27240p20631956.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: I have problem with Ajax and DIV

2008-11-21 Thread Ziki

I'm from Croatia, i solve it on Balcan way :

On 22 stu, 00:33, Ziki <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I use jQuery fadeOut function and it works ok, but i have problem when
> I want to call it from some other file; I have some form and it's
> works with Ajax and return "You have successfully post it!" in some
> div tag, and I want to fade out that div tag, but I don't know hoe to
> call that function, from where i can call it??
>
> I hope that u understand me :)
>
> Please help!!


[jQuery] Re: Cycle plugin: using two #next controllers

2008-11-21 Thread Garreth

Wow, that was easy!

Thank you Mike!



On 21 Nov, 21:51, Mike Alsup <[EMAIL PROTECTED]> wrote:
> > I can use them one at a time, but when I try them together only one of
> > them works: Here is my code:
>
> >         $('#slideshow').cycle({
> >                 fx:     'fade',
> >                 speed:  '2000',
> >                 timeout: 0,
> >                 pager:  '#nav',
> >                 next:'#slideshow', // Change the image when user clicks on 
> > image
> >                 next:'#next', // Change the image when user clicks on the 
> > next link
> >                 prev:'#previous',
> >                 pagerAnchorBuilder: function(idx, slide) {
> >                         // return selector string for existing anchor
> >                         return '#nav li:eq(' + idx + ') a';
> >                 }
> >         });
>
> The 'next' option takes a normal jQuery selector, so you can just do
> this:
>
> next: '#slideshow, #next',
> prev: '#previous',


[jQuery] Re: exclude children from selected elements

2008-11-21 Thread ricardobeat

By the way, you could use event delegation to simplify things a lot:

$(document).ready(function(){
   $('body').mouseover(function(e){
var elm = e.target || e.srcElement;
if ( !$(elm).parents('.ui-dialog').length ) { //if .ui-dialog
is not an ancestor
   $(elm).doStuff();
}
   });
});

It might be slower than binding the function straight to each element,
but it will pay off on very large DOMs.

- ricardo

On Nov 21, 8:07 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> My mistake, it is working. The problem was my lack of understanding
> about how Dialog works.  main is the div from which I create a Dialog
> and I didn't want the event listener to be added to the elements of
> main. However main is NOT the first element of the Dialog. I the
> background it is wrapped around other elements and the top one has
> class .ui-dialog  . All sorted. Thanks .
>
> On 21 nov, 09:32, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > It still doesn't work. I think part of the problem is because the
> > children of main are added after I create the event listener.
>
> > Second solution is to check in the event listener if the target is a
> > child of main and if so, return.  I know how to get the children of
> > main , but how to I check the current tartget is one of them ?
>
> > ricardobeat> I need to select all objects of the page because I want
> > to do a DOM inspector. But yes you are right, maybe I should only
> > start from body !
>
> > Thanks
>
> > On 20 nov, 18:25, ricardobeat <[EMAIL PROTECTED]> wrote:
>
> > > Are you sure you want to apply it to *all* elements on the page? That
> > > sounds a bit awkward.
>
> > > var main =  $('#main, #main *');
> > > $('body *').not(main).mouseover(function(){...});
>
> > > On Nov 20, 2:07 pm, "[EMAIL PROTECTED]"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi,
>
> > > > I want to apply a mouseover event on all elements but one and its
> > > > children. I can't use class name to filter. How can I do it ?  I've
> > > > tried unsuccessfully :
>
> > > > $("*:not(#main)").not($("#main").children()).mouseover(function() {
>
> > > > });
>
> > > > thanks


[jQuery] I have problem with Ajax and DIV

2008-11-21 Thread Ziki

Hi,

I use jQuery fadeOut function and it works ok, but i have problem when
I want to call it from some other file; I have some form and it's
works with Ajax and return "You have successfully post it!" in some
div tag, and I want to fade out that div tag, but I don't know hoe to
call that function, from where i can call it??

I hope that u understand me :)

Please help!!


[jQuery] Re: Submitting the submit input value

2008-11-21 Thread Mike Alsup

> If I call
> jQuery('form1').ajaxSubmit();
>
> The value sent to the server is foo=bar and not foo=bar&button=click.
>
> Is there an easy way to get this to work? It's needed by my backend
> server.


Use ajaxForm instead of ajaxSubmit and you will get that behavior.
Note that you call ajaxForm once to prepare the form and it will
submit it for you whenever the user decides to submit it.  ajaxSubmit,
on the other hand, submits the form immediately and is typically used
within a submit event handler.

Mike



[jQuery] Submitting the submit input value

2008-11-21 Thread Phil Haack

I noticed that when I use the .ajaxSubmit button to post a form, it
doesn't send the value of the submit button in the form data. For
example:







If I call
jQuery('form1').ajaxSubmit();

The value sent to the server is foo=bar and not foo=bar&button=click.

Is there an easy way to get this to work? It's needed by my backend
server.


[jQuery] Re: is not a valid function

2008-11-21 Thread flycast

I am sure that I will be embarrassed by what the problem turns out to
be but does anybody have any ideas here? I'm still stuck.


[jQuery] Re: "Clickable" DIV possible?

2008-11-21 Thread lukas

Thanks for your kind help. I had the wrong path to jquery!


[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread yvonney

Can't thank you enough Jason. Wonderfully kindand Talented!

On Nov 21, 12:37 pm, heysatan <[EMAIL PROTECTED]> wrote:
> jBreadCrumb RELEASED
>
> Hi all, I've put the breadcrumb plugin up on jquery's site:
>
> http://plugins.jquery.com/project/jBreadCrumb
>
> Here's a link to the working example (also linked to from the jquery
> page)
>
> http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html
>
> Let me know what you think, there are some improvements that can be
> made for sure.  It's decently smart but I think I will improve the
> collapsing algorithm to know what it needs to collapse based on
> individual elements width.
>
> Oh, and it's compatible with ie 6, ie 7 and all standards compliant
> browsers.
>
> Thanks,
>
> Jason
>
> On Nov 20, 6:14 pm, heysatan <[EMAIL PROTECTED]> wrote:
>
> > I am just finishing up version 0.1, it will be up tomorrow morning
> > (Pacific time).
>
> > On Nov 18, 2:04 pm, yvonney <[EMAIL PROTECTED]> wrote:
>
> > > Oh YES!!! that WOULD be fabulous I know how busy life gets of
> > > course... Jason! when you have time we'd all love to play with a
> > > plugin version I bet!
>
> > > best wishes
>
> > > On Nov 11, 2:32 pm, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
> > > > I'd be interested in this as a plugin as well.
>
> > > > On Nov 11, 4:21 pm, heysatan <[EMAIL PROTECTED]> wrote:
>
> > > > > That's a start.
>
> > > > > On Nov 10, 4:13 pm, Microbe <[EMAIL PROTECTED]> wrote:
>
> > > > > > Demand # 1
>
> > > > > > :o)
>
> > > > > > On Nov 11, 8:57 am, heysatan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi Sean,
>
> > > > > > > I built this breadcrumb animation.  Due to time limitations at 
> > > > > > > the end
> > > > > > > of the project I wasn't able to make it into a plugin (I built a 
> > > > > > > lot
> > > > > > > of other plugins for this project), but I'd like to when I get a
> > > > > > > chance.
>
> > > > > > > I really solved a problem for us because our category and page 
> > > > > > > titles
> > > > > > > are so long (scientists are long winded).  Before we would show 
> > > > > > > only a
> > > > > > > couple of steps in the HTML to get around this.  This method was 
> > > > > > > more
> > > > > > > SEO friendly, more usable, and I thought, kind of cool.
>
> > > > > > > If there is a demand for it I'll work on porting it to a plugin, 
> > > > > > > but
> > > > > > > probably not for the next 2 weeks or so.
>
> > > > > > > Jason
> > > > > > > Lead UI Developer - CompareNetworks
>
> > > > > > > On Nov 10, 1:21 am, CliffordSean <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > see the breadcrumb on here 
> > > > > > > > :http://www.biocompare.com/ProductDetails/386912/1/Mutation-Generation...
> > > > > > > > has anyone come across a plugin like this ?
>
> > > > > > > > tnx
> > > > > > > > sean
> > > > > > > > --
> > > > > > > > View this message in 
> > > > > > > > context:http://www.nabble.com/has-anyone-come-across-a-plugin-like-this---tp2...
> > > > > > > > Sent from the jQuery General Discussion mailing list archive at 
> > > > > > > > Nabble.com.


[jQuery] Re: "Clickable" DIV possible?

2008-11-21 Thread Hector Virgen
Yes. Any element on the page will respond to click events, except for
disabled form inputs.
$('div#myDiv').click(function()
{
alert('myDiv was clicked');
});

-Hector


On Fri, Nov 21, 2008 at 2:40 PM, lukas <[EMAIL PROTECTED]> wrote:

>
> Is it possible to "click" or select a DIV with jquery?
>
> $("DIV ID or Class?").click(function() { .


[jQuery] Re: Writing a plugin

2008-11-21 Thread halcyonandon


oh wow, this was a nice comment someone left... helpful...

(function($) {
// Private Variables and Functions
var privateVariable = {};
function privateFunction() {
};

// Public Variables and Methods
$.namespace = {
options: {},
publicVariable: [];
publicMethod: function() {}
};

// Prototype Methods
$.fn.extend({
usernameMethod: function() {
return this.each(function() {
// Persistent Context Variables
this.contextVariable = 'foo';
}
}.
unusernameMethod: function() {
return this.each(function() {
delete this.contextVariable;
}
}
});

//Initialization Code
$(function() {
});
})(jQuery);


On Nov 21, 2:10 pm, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
> I found this to be the best example of how to structure a plug-in:
>
> http://www.learningjquery.com/2007/10/a-plugin-development-pattern
>
> Rik
>
> 2008/11/21 Hector Virgen <[EMAIL PROTECTED]>:
>
>
>
> > You should take a look at jQuery's built-in tabs plugin. It may already do
> > what you're looking for.
> >http://docs.jquery.com/UI/Tabs
> > -Hector
>
> > On Fri, Nov 21, 2008 at 1:44 PM, halcyonandon <[EMAIL PROTECTED]> wrote:
>
> >> Hi,
>
> >> I'm new to JQuery, but I need to convert some regular, working,
> >> javascript code into a JQuery plugin.  I'll need to expand on this
> >> code once its in plugin form, but for now its just converting this
> >> existing code into a working JQuery plugin.  I've reviewed the
> >> documentation on plugin authoring, but it doesnt give a lot of
> >> examples.
>
> >> I was hoping someone could show me how a snippet of my code would look
> >> as a JQuery plugin to put me on the right track.
>
> >> function initTabs() {
> >>    if (document.getElementById && document.createTextNode) {
> >>        var n = document.getElementById('tbs');
> >>        var as = n.getElementsByTagName("a");
> >>        for (var i = 0; i < as.length; i++) {
> >>            as[i].onclick = function() {
> >>                showTab(this);
> >>                return false;
> >>            };
> >>            as[i].onfocus = function() {
> >>                this.blur();
> >>            };
> >>            if (i == 0)
> >>                currentLink = as[i];
> >>        }
> >>        if (document.getElementById(currentTab)) {
> >>            document.getElementById(currentTab).style.display =
> >> 'block';
> >>        }
> >>    }
> >> }
>
> >> Thank you for your time.
>
> --
> Rik Lomashttp://rikrikrik.com


[jQuery] "Clickable" DIV possible?

2008-11-21 Thread lukas

Is it possible to "click" or select a DIV with jquery?

$("DIV ID or Class?").click(function() { .


[jQuery] Re: Getting all checked check boxes with a certain id

2008-11-21 Thread Mike Alsup

> I'm trying to get the values of all checked check boxes in a certain
> section of a page.  Each of the check boxes has the same id, I could
> just as easily make it a class or whatnot.
>
> I'm using something like:
> var valArray = $('#' + id + ' input:checkbox').serializeArray();
>
> Although I know the above isn't right, what is the proper query to do
> this?

First, you should never, ever, have more than one element on the page
with the same ID.  That is the whole point of IDs, they are unique
identifiers.  Your hunch to use classes instead is a good one.  Once
you've changed the IDs to classes, you just use normal CSS selector
syntax to find them in the DOM.  For example, if you give them the
class of 'test', you would select them like this:

$('.test')

or like this for improved performance:

$('input.test')

Of course if you've used that class name on other controls as well you
can narrow the selection to just your checkboxes like this:

$('input.test:checkbox')

Mike




[jQuery] Re: Writing a plugin

2008-11-21 Thread halcyonandon

Oh no that function was just a snippet from something working well, im
not writing this for tab functionality, but rather, for a reusable
widget... I'm just wondering what this function would look like
converted into jQuery as a reference for everything else involved.  I
arbitrarily selected that function for the example.


[jQuery] Getting all checked check boxes with a certain id

2008-11-21 Thread Rage9

I'm trying to get the values of all checked check boxes in a certain
section of a page.  Each of the check boxes has the same id, I could
just as easily make it a class or whatnot.

I'm using something like:
var valArray = $('#' + id + ' input:checkbox').serializeArray();

Although I know the above isn't right, what is the proper query to do
this?

Thanks in advance.


[jQuery] Re: Writing a plugin

2008-11-21 Thread Rik Lomas

I found this to be the best example of how to structure a plug-in:

http://www.learningjquery.com/2007/10/a-plugin-development-pattern

Rik


2008/11/21 Hector Virgen <[EMAIL PROTECTED]>:
> You should take a look at jQuery's built-in tabs plugin. It may already do
> what you're looking for.
> http://docs.jquery.com/UI/Tabs
> -Hector
>
>
> On Fri, Nov 21, 2008 at 1:44 PM, halcyonandon <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I'm new to JQuery, but I need to convert some regular, working,
>> javascript code into a JQuery plugin.  I'll need to expand on this
>> code once its in plugin form, but for now its just converting this
>> existing code into a working JQuery plugin.  I've reviewed the
>> documentation on plugin authoring, but it doesnt give a lot of
>> examples.
>>
>> I was hoping someone could show me how a snippet of my code would look
>> as a JQuery plugin to put me on the right track.
>>
>> function initTabs() {
>>if (document.getElementById && document.createTextNode) {
>>var n = document.getElementById('tbs');
>>var as = n.getElementsByTagName("a");
>>for (var i = 0; i < as.length; i++) {
>>as[i].onclick = function() {
>>showTab(this);
>>return false;
>>};
>>as[i].onfocus = function() {
>>this.blur();
>>};
>>if (i == 0)
>>currentLink = as[i];
>>}
>>if (document.getElementById(currentTab)) {
>>document.getElementById(currentTab).style.display =
>> 'block';
>>}
>>}
>> }
>>
>> Thank you for your time.
>
>



-- 
Rik Lomas
http://rikrikrik.com


[jQuery] Re: Cluetip Title displaying in FF and IE

2008-11-21 Thread jmueller0823

Okay.
Looks like this is what's happening (in WordPress)

1. Using a text link, ClueTip works perfectly.
2. If using an image, the title displays when hovering the image.

Ideas anyone?  Thanks.



On Nov 20, 3:22 pm, jmueller0823 <[EMAIL PROTECTED]> wrote:
> This is installed in Wordpress, wondering if WP default styles are
> causing issue?
> Otherwise, Cluetip works fine.
>
> Testing outside of Wordpress did not have this issue.
>
> Thanks!
>
> Jim


[jQuery] Re: Jquery Forms plugin and fileupload

2008-11-21 Thread Mike Alsup

> The first one, is how can one cancel an upload while upload is in
> progress.

You can cancel an upload by invoking the "abort" method on the XHR
object (assuming you have the latest version of the form plugin,
v2.17).   To get a ref to the XHR you can either use the global
'ajaxSend' event handler or the local 'beforeSend' callback property.

Here's a demo:

http://jquery.malsup.com/form/file-upload-cancel.html

Mike


>
> The second one is the progress indicator. I am using commons file
> upload, so I can calculate how much of file is left, and I can append
> this to servlets output.
>
> However, I could not figure out how to get this servlets output and
> turn it into a progress bar, using the form plugin.
>
> Best Regards,
> -C.B.


[jQuery] Re: Writing a plugin

2008-11-21 Thread Hector Virgen
You should take a look at jQuery's built-in tabs plugin. It may already do
what you're looking for.

http://docs.jquery.com/UI/Tabs

-Hector


On Fri, Nov 21, 2008 at 1:44 PM, halcyonandon <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I'm new to JQuery, but I need to convert some regular, working,
> javascript code into a JQuery plugin.  I'll need to expand on this
> code once its in plugin form, but for now its just converting this
> existing code into a working JQuery plugin.  I've reviewed the
> documentation on plugin authoring, but it doesnt give a lot of
> examples.
>
> I was hoping someone could show me how a snippet of my code would look
> as a JQuery plugin to put me on the right track.
>
> function initTabs() {
>if (document.getElementById && document.createTextNode) {
>var n = document.getElementById('tbs');
>var as = n.getElementsByTagName("a");
>for (var i = 0; i < as.length; i++) {
>as[i].onclick = function() {
>showTab(this);
>return false;
>};
>as[i].onfocus = function() {
>this.blur();
>};
>if (i == 0)
>currentLink = as[i];
>}
>if (document.getElementById(currentTab)) {
>document.getElementById(currentTab).style.display =
> 'block';
>}
>}
> }
>
> Thank you for your time.
>


[jQuery] [offtopic] can you perhaps tell why this page doesnt show in firefox?

2008-11-21 Thread Rene Veerman


This page displays fine in IE, opera and safari.
But not in firefox :(

http://tevlar.net/mytevlar/

any clues greatly appreciated..

--
--
Rene Veerman, creator of web2.5 CMS http://mediabeez.ws/ 



[jQuery] Writing a plugin

2008-11-21 Thread halcyonandon

Hi,

I'm new to JQuery, but I need to convert some regular, working,
javascript code into a JQuery plugin.  I'll need to expand on this
code once its in plugin form, but for now its just converting this
existing code into a working JQuery plugin.  I've reviewed the
documentation on plugin authoring, but it doesnt give a lot of
examples.

I was hoping someone could show me how a snippet of my code would look
as a JQuery plugin to put me on the right track.

function initTabs() {
if (document.getElementById && document.createTextNode) {
var n = document.getElementById('tbs');
var as = n.getElementsByTagName("a");
for (var i = 0; i < as.length; i++) {
as[i].onclick = function() {
showTab(this);
return false;
};
as[i].onfocus = function() {
this.blur();
};
if (i == 0)
currentLink = as[i];
}
if (document.getElementById(currentTab)) {
document.getElementById(currentTab).style.display =
'block';
}
}
}

Thank you for your time.


[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread Rick Faircloth


Very nice, Jason!

I'll put that one to use!

Rick

heysatan wrote:

jBreadCrumb RELEASED

Hi all, I've put the breadcrumb plugin up on jquery's site:

http://plugins.jquery.com/project/jBreadCrumb

Here's a link to the working example (also linked to from the jquery
page)

http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html

Let me know what you think, there are some improvements that can be
made for sure.  It's decently smart but I think I will improve the
collapsing algorithm to know what it needs to collapse based on
individual elements width.

Oh, and it's compatible with ie 6, ie 7 and all standards compliant
browsers.

Thanks,

Jason


  



[jQuery] Re: jCarousel (by Jan Sorgalla) scrolling integer problem

2008-11-21 Thread [EMAIL PROTECTED]

Nevermind,

I was able to dig this up from Jan on another post and it fixed my
problem. It was inline on the actual html page, and not controlled by
the js file that is referenced. I still don't understand why the
document that is referenced doesn't control the scrolling, but hey,
I'm a newbie!!

jQuery('#mycarousel').jcarousel({
scroll: 1,
itemFirstInCallback: {onAfterAnimation:
mycarousel_itemFirstInCallback}
});


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho
Good to know...again thanks for helping me with this. Hope you have a
good rest of today.

On Nov 21, 2:53 pm, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
> That's due to the script taking too much time to parse the
> information, it's just one of those things that will happen when you
> have such a large data set to iterate over
>
> Rik
>
> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>
> > Rik that worked!  The only thing that I can't seem to explain is why I
> > get a box that reads:
>
> > "A script on this page may be busy, or it may have stopped responding.
> > You can stop the script now, or you can continue to see if the script
> > will complete.
>
> > Script:http://localhost/sort/js/jquery-1.2.6.pack.js:11";
>
> > Only inf FireFox?  Any suggestions?
>
> > On Nov 21, 11:42 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
> >> I would increase the delay to something like 1000, that may help 
> >> performance
>
> >> I think the problem with taking the delay out is the comma at the end
> >> of the labelText bit, IE doesn't like those missing commas in objects
>
> >> Rik
>
> >> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>
> >> > I see...
>
> >> > All I have there is very basic things
>
> >> > 
> >> > $(document).ready(function () {
> >> > $('table tbody tr').quicksearch({
> >> > position: 'before',
> >> > attached: 'table',
> >> > labelText: 'Search the GPI Fuel Product Manuals',
> >> > delay: 50
> >> >                        });
> >> > })
> >> > 
>
> >> > If i take the delay:50 out I don't get a search box.  Sorry to be such
> >> > a pain...
>
> >> > On Nov 21, 11:27 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
> >> >> I meant in the options, so when you do $(...).quicksearch( options );
> >> >> there isn't anything other than the basic stuff you need in the object
> >> >> you're passing through
>
> >> >> Rik
>
> >> >> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>
> >> >> > First I must say that I really like your plugin...and I did go and
> >> >> > read some other stuff on your site about your latest
> >> >> > plugin...congrats!
>
> >> >> > I have the following options in the jquery.quicksearch.js file...I
> >> >> > believe that row striping is off...but I am not much of a programmer
> >> >> > so let me know what I need to do if I haven't done your suggestions.
>
> >> >> > ;(function( $ ){
> >> >> >        $.fn.quicksearch = function(options) {
>
> >> >> >                options = jQuery.extend({
> >> >> >                        position: 'prepend',
> >> >> >                        attached: 'body',
> >> >> >                        formId: 'quicksearch',
> >> >> >                        labelText: 'Quick Search',
> >> >> >                        labelClass: 'qs_label',
> >> >> >                        inputText: null,
> >> >> >                        inputClass: 'qs_input',
> >> >> >                        loaderId: 'loader',
> >> >> >                        loaderClass: 'loader',
> >> >> >                        loaderImg: null,
> >> >> >                        loaderText: '',
> >> >> >                        stripeRowClass: null,
> >> >> >                        hideElement: null,
> >> >> >                        delay: 500,
> >> >> >                        focusOnLoad: false,
> >> >> >                        onBefore: null,
> >> >> >                        onAfter: null,
> >> >> >                        filter: null,
> >> >> >                        randomElement: 
> >> >> > 'qs'+Math.floor(Math.random()*100)
> >> >> >                }, options);
>
> >> >> >                var timeout;
> >> >> >                var cache;
> >> >> >                var score = {};
> >> >> >                var el = this;
> >> >> >                var stripeRowLength = 
> >> >> > (!is_empty(options.stripeRowClass)) ?
> >> >> > options.stripeRowClass.length : 0;
> >> >> >                var doStripe = (stripeRowLength > 0) ? true : false;
>
> >> >> >                function is_empty (i)
> >> >> >                {
> >> >> >                        return (i == null || i == undefined || i == 
> >> >> > false) ? true: false;
> >> >> >                }
>
> >> >> >                function get_cache (el)
> >> >> >                {
> >> >> >                        cache = 
> >> >> > $(el).not('.'+options.noResultsClass).map(function(){
> >> >> >                                return 
> >> >> > strip_html(normalise(this.innerHTML));
> >> >> >                        });
> >> >> >                }
>
> >> >> >                function normalise (i)
> >> >> >                {
> >> >> >                        return $.trim(i.toLowerCase().replace(/\n/, 
> >> >> > '').replace(/\s{2,}/, '
> >> >> > '));
> >> >> >                }
>
> >> >> >                function get_key()
> >> >> >                {
> >> >> >                        var input = 
> >> >> > strip_html(normalise($('input[rel="' +
> >> >> > options.randomElement + '"]').val()));
>
> >> >> >                        if (typeof options.filter == "function") { 
> >> >> > input = optio

[jQuery] Jquery Forms plugin and fileupload

2008-11-21 Thread cambazz

Hello,

I am using the file upload capacities of the form plugin successfully.
However I could not find how to do two things.

The first one, is how can one cancel an upload while upload is in
progress.

The second one is the progress indicator. I am using commons file
upload, so I can calculate how much of file is left, and I can append
this to servlets output.

However, I could not figure out how to get this servlets output and
turn it into a progress bar, using the form plugin.

Best Regards,
-C.B.


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread Rik Lomas

That's due to the script taking too much time to parse the
information, it's just one of those things that will happen when you
have such a large data set to iterate over

Rik


2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
> Rik that worked!  The only thing that I can't seem to explain is why I
> get a box that reads:
>
> "A script on this page may be busy, or it may have stopped responding.
> You can stop the script now, or you can continue to see if the script
> will complete.
>
> Script: http://localhost/sort/js/jquery-1.2.6.pack.js:11";
>
> Only inf FireFox?  Any suggestions?
>
>
> On Nov 21, 11:42 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
>> I would increase the delay to something like 1000, that may help performance
>>
>> I think the problem with taking the delay out is the comma at the end
>> of the labelText bit, IE doesn't like those missing commas in objects
>>
>> Rik
>>
>> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>>
>> > I see...
>>
>> > All I have there is very basic things
>>
>> > 
>> > $(document).ready(function () {
>> > $('table tbody tr').quicksearch({
>> > position: 'before',
>> > attached: 'table',
>> > labelText: 'Search the GPI Fuel Product Manuals',
>> > delay: 50
>> >});
>> > })
>> > 
>>
>> > If i take the delay:50 out I don't get a search box.  Sorry to be such
>> > a pain...
>>
>> > On Nov 21, 11:27 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
>> >> I meant in the options, so when you do $(...).quicksearch( options );
>> >> there isn't anything other than the basic stuff you need in the object
>> >> you're passing through
>>
>> >> Rik
>>
>> >> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>>
>> >> > First I must say that I really like your plugin...and I did go and
>> >> > read some other stuff on your site about your latest
>> >> > plugin...congrats!
>>
>> >> > I have the following options in the jquery.quicksearch.js file...I
>> >> > believe that row striping is off...but I am not much of a programmer
>> >> > so let me know what I need to do if I haven't done your suggestions.
>>
>> >> > ;(function( $ ){
>> >> >$.fn.quicksearch = function(options) {
>>
>> >> >options = jQuery.extend({
>> >> >position: 'prepend',
>> >> >attached: 'body',
>> >> >formId: 'quicksearch',
>> >> >labelText: 'Quick Search',
>> >> >labelClass: 'qs_label',
>> >> >inputText: null,
>> >> >inputClass: 'qs_input',
>> >> >loaderId: 'loader',
>> >> >loaderClass: 'loader',
>> >> >loaderImg: null,
>> >> >loaderText: '',
>> >> >stripeRowClass: null,
>> >> >hideElement: null,
>> >> >delay: 500,
>> >> >focusOnLoad: false,
>> >> >onBefore: null,
>> >> >onAfter: null,
>> >> >filter: null,
>> >> >randomElement: 
>> >> > 'qs'+Math.floor(Math.random()*100)
>> >> >}, options);
>>
>> >> >var timeout;
>> >> >var cache;
>> >> >var score = {};
>> >> >var el = this;
>> >> >var stripeRowLength = 
>> >> > (!is_empty(options.stripeRowClass)) ?
>> >> > options.stripeRowClass.length : 0;
>> >> >var doStripe = (stripeRowLength > 0) ? true : false;
>>
>> >> >function is_empty (i)
>> >> >{
>> >> >return (i == null || i == undefined || i == 
>> >> > false) ? true: false;
>> >> >}
>>
>> >> >function get_cache (el)
>> >> >{
>> >> >cache = 
>> >> > $(el).not('.'+options.noResultsClass).map(function(){
>> >> >return 
>> >> > strip_html(normalise(this.innerHTML));
>> >> >});
>> >> >}
>>
>> >> >function normalise (i)
>> >> >{
>> >> >return $.trim(i.toLowerCase().replace(/\n/, 
>> >> > '').replace(/\s{2,}/, '
>> >> > '));
>> >> >}
>>
>> >> >function get_key()
>> >> >{
>> >> >var input = strip_html(normalise($('input[rel="' 
>> >> > +
>> >> > options.randomElement + '"]').val()));
>>
>> >> >if (typeof options.filter == "function") { input 
>> >> > = options.filter
>> >> > (input); }
>>
>> >> >if (input.indexOf(' ') == -1)
>> >> >{
>> >> >return input;
>> >> >}
>> >> >else
>> >> >{
>> >> >return input.split(

[jQuery] Re: newbie wanting to get started

2008-11-21 Thread Youssef EL ALAOUI
Hi,

You can get started by having a look @ :
http://www.jcargoo.org/2008/10/you-said-jquery-yes-we-love-it.html.

Regards,
--
Youssef ELALAOUI
JCargoo Founder
www.jcargoo.org


Pensez à l'environnement avant d'imprimer ce message / Think of the
environment before printing out this message


On Fri, Nov 21, 2008 at 8:34 PM, H-man <[EMAIL PROTECTED]> wrote:

>
> I am in charge of a high school website using Dreamweaver 8. I ran
> across jquery tabs one day.  It looks cool and I would like to use it
> but have no javascript experience.  Anyone willing to help?  I really
> have no idea how to get started.  I download jquery and then what?
>
> Thanks,
> H-man
>


[jQuery] Re: Cycle plugin: using two #next controllers

2008-11-21 Thread Mike Alsup

> I can use them one at a time, but when I try them together only one of
> them works: Here is my code:
>
>         $('#slideshow').cycle({
>                 fx:     'fade',
>                 speed:  '2000',
>                 timeout: 0,
>                 pager:  '#nav',
>                 next:'#slideshow', // Change the image when user clicks on 
> image
>                 next:'#next', // Change the image when user clicks on the 
> next link
>                 prev:'#previous',
>                 pagerAnchorBuilder: function(idx, slide) {
>                         // return selector string for existing anchor
>                         return '#nav li:eq(' + idx + ') a';
>                 }
>         });
>

The 'next' option takes a normal jQuery selector, so you can just do
this:

next: '#slideshow, #next',
prev: '#previous',




[jQuery] autocomplete and google toolbar autofill conflict

2008-11-21 Thread jjh

I have been on this issue for the past 24hrs and I can't seem to find
the solution. There seems to be a conflict between the jQuery
autocomplete plug-in (http://bassistance.de/jquery-plugins/jquery-
plugin-autocomplete/) and google toolbar's autofill function. I'm
testing this in IE 7. What really confuses me is that the result is
inconsistent. Sometimes the results will show and sometime it doesn't.

The problem is that when autofill is enabled, it makes the input field
(with autocomplete) loose focus while I'm entering my triggering key
stroke (minChars was set to 3). This triggers the onBlur event in the
autocomplete plug-in and the result will be hidden.

My JS Code:
var autocompleteUrl = "airport_list.php?q=60&limit=10";
var autocompleteSettingsObj = {
minChars:3,
width: 300,
scrollHeight: 350,
formatResult: function(data, i, total) { return (data && data.length
> 1) ? data[2] : ' '; }
};
//setup autocomplete
$("#myInput").autocomplete(autocompleteUrl, autocompleteSettingsObj);

My HTML Code:


Note: Firefox works fine.

Thanks in advance.


[jQuery] autocomplete and google toolbar autofill conflict

2008-11-21 Thread jjh

I have been on this issue for the past 24hrs and I can't seem to find
the solution. There seems to be a conflict between the jQuery
autocomplete plug-in (http://bassistance.de/jquery-plugins/jquery-
plugin-autocomplete/) and google toolbar's autofill function. I'm
testing this in IE 7. What really confuses me is that the result is
inconsistent. Sometimes the results will show and sometime it doesn't.

The problem is that when autofill is enabled, it makes the input field
(with autocomplete) loose focus while I'm entering my triggering key
stroke (minChars was set to 3). This triggers the onBlur event in the
autocomplete plug-in and the result will be hidden.

My JS Code:
var autocompleteUrl = "airport_list.php?q=60&limit=10";
var autocompleteSettingsObj = {
minChars:3,
width: 300,
scrollHeight: 350,
formatResult: function(data, i, total) { return (data && data.length
> 1) ? data[2] : ' '; }
};
//setup autocomplete
$("#myInput").autocomplete(autocompleteUrl, autocompleteSettingsObj);

My HTML Code:


Note: Firefox works fine.

Thanks in advance.


[jQuery] newbie wanting to get started

2008-11-21 Thread H-man

I am in charge of a high school website using Dreamweaver 8. I ran
across jquery tabs one day.  It looks cool and I would like to use it
but have no javascript experience.  Anyone willing to help?  I really
have no idea how to get started.  I download jquery and then what?

Thanks,
H-man


[jQuery] jCarousel (by Jan Sorgalla) scrolling integer problem

2008-11-21 Thread [EMAIL PROTECTED]

I am using Jan Sorgalla's jcarousel, and it seems that the integer for
the scroll doesn't really work. No matter what I do, or set it to, it
always scrolls/advances by 3 frames.

scroll  integer 3   The number of items to scroll by.

If I set the above to 1 or 100, it always scrolls by three.

Here is a test link:
http://brandaiddesignco.com/jcarousel/jcarousel.html

Any advice? I REALLY would appreciate it. Unfortunately, Jan has
eliminated post responses on his tutorial page for this where he
created it.


[jQuery] Removing selector ""

2008-11-21 Thread adrianopons

Hello everyine!

I have a grid with some links on it. I need to copy the object to a
var and remove the selector "" when I click on a button.

How can I do it?

Thanks!


[jQuery] Cycle plugin: using two #next controllers

2008-11-21 Thread Garreth


Hi!


Im trying to build a gallery using the wonderful cycle plugin. Everything
works fine, Im just wondering if it is possible to use to next intances? One
next controller on the image, and another one on a link (http://www.nabble.com/Cycle-plugin%3A-using-two--next-controllers-tp20628984s27240p20628984.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery XHR problems with safari 3.2

2008-11-21 Thread Ronnyek

Ok, I've tried a number of grids including flexigrid, and jqgrid, and
both fail to load via ajax, and json...

I know things are next to impossible to troubleshoot, but the
developer menu stuff shows error on line 2699 of jquery-1.2.6.js
and the error is permission denied.

Both grids worked flawless in chrome, ie, ff but safari on mac broke.
Any ideas?


[jQuery] Cycle plugin: using two #next controllers

2008-11-21 Thread Garreth

Hi.

Im trying build a gallery using the wonderful jquery cycle plugin.
Everything works fine, Im just wondering if it is possible to use two
next controllers. One next controller on image-click, and one using a
link  ( )

I can use them one at a time, but when I try them together only one of
them works: Here is my code:

$('#slideshow').cycle({
fx: 'fade',
speed:  '2000',
timeout: 0,
pager:  '#nav',
next:'#slideshow', // Change the image when user clicks on image
next:'#next', // Change the image when user clicks on the next 
link
prev:'#previous',
pagerAnchorBuilder: function(idx, slide) {
// return selector string for existing anchor
return '#nav li:eq(' + idx + ') a';
}
});

Is there some way to do this, or do I have to duplicate the next code,
inside the plugin script, to achieve this?

Regards


[jQuery] Re: Crazy tables with checkboxes

2008-11-21 Thread c.barr

It seems jsbin.com is down right now, so I've uploaded it to my site:
http://chris-barr.com/files/checkboxes/
source: http://chris-barr.com/files/checkboxes/DTcheckboxes.js

Also, I've fixed the issue with shift-selection, but the other
problems still remain.

On Nov 21, 12:01 pm, "c.barr" <[EMAIL PROTECTED]> wrote:
> err, correction to what I wrote, shift-selection only works when
> selecting top to bottom, not the other way around.


[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread heysatan

jBreadCrumb RELEASED

Hi all, I've put the breadcrumb plugin up on jquery's site:

http://plugins.jquery.com/project/jBreadCrumb

Here's a link to the working example (also linked to from the jquery
page)

http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html

Let me know what you think, there are some improvements that can be
made for sure.  It's decently smart but I think I will improve the
collapsing algorithm to know what it needs to collapse based on
individual elements width.

Oh, and it's compatible with ie 6, ie 7 and all standards compliant
browsers.

Thanks,

Jason


On Nov 20, 6:14 pm, heysatan <[EMAIL PROTECTED]> wrote:
> I am just finishing up version 0.1, it will be up tomorrow morning
> (Pacific time).
>
> On Nov 18, 2:04 pm, yvonney <[EMAIL PROTECTED]> wrote:
>
> > Oh YES!!! that WOULD be fabulous I know how busy life gets of
> > course... Jason! when you have time we'd all love to play with a
> > plugin version I bet!
>
> > best wishes
>
> > On Nov 11, 2:32 pm, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
> > > I'd be interested in this as a plugin as well.
>
> > > On Nov 11, 4:21 pm, heysatan <[EMAIL PROTECTED]> wrote:
>
> > > > That's a start.
>
> > > > On Nov 10, 4:13 pm, Microbe <[EMAIL PROTECTED]> wrote:
>
> > > > > Demand # 1
>
> > > > > :o)
>
> > > > > On Nov 11, 8:57 am, heysatan <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi Sean,
>
> > > > > > I built this breadcrumb animation.  Due to time limitations at the 
> > > > > > end
> > > > > > of the project I wasn't able to make it into a plugin (I built a lot
> > > > > > of other plugins for this project), but I'd like to when I get a
> > > > > > chance.
>
> > > > > > I really solved a problem for us because our category and page 
> > > > > > titles
> > > > > > are so long (scientists are long winded).  Before we would show 
> > > > > > only a
> > > > > > couple of steps in the HTML to get around this.  This method was 
> > > > > > more
> > > > > > SEO friendly, more usable, and I thought, kind of cool.
>
> > > > > > If there is a demand for it I'll work on porting it to a plugin, but
> > > > > > probably not for the next 2 weeks or so.
>
> > > > > > Jason
> > > > > > Lead UI Developer - CompareNetworks
>
> > > > > > On Nov 10, 1:21 am, CliffordSean <[EMAIL PROTECTED]> wrote:
>
> > > > > > > see the breadcrumb on here 
> > > > > > > :http://www.biocompare.com/ProductDetails/386912/1/Mutation-Generation...
> > > > > > > has anyone come across a plugin like this ?
>
> > > > > > > tnx
> > > > > > > sean
> > > > > > > --
> > > > > > > View this message in 
> > > > > > > context:http://www.nabble.com/has-anyone-come-across-a-plugin-like-this---tp2...
> > > > > > > Sent from the jQuery General Discussion mailing list archive at 
> > > > > > > Nabble.com.


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho
Rik that worked!  The only thing that I can't seem to explain is why I
get a box that reads:

"A script on this page may be busy, or it may have stopped responding.
You can stop the script now, or you can continue to see if the script
will complete.

Script: http://localhost/sort/js/jquery-1.2.6.pack.js:11";

Only inf FireFox?  Any suggestions?


On Nov 21, 11:42 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
> I would increase the delay to something like 1000, that may help performance
>
> I think the problem with taking the delay out is the comma at the end
> of the labelText bit, IE doesn't like those missing commas in objects
>
> Rik
>
> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>
> > I see...
>
> > All I have there is very basic things
>
> > 
> > $(document).ready(function () {
> > $('table tbody tr').quicksearch({
> > position: 'before',
> > attached: 'table',
> > labelText: 'Search the GPI Fuel Product Manuals',
> > delay: 50
> >                        });
> > })
> > 
>
> > If i take the delay:50 out I don't get a search box.  Sorry to be such
> > a pain...
>
> > On Nov 21, 11:27 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
> >> I meant in the options, so when you do $(...).quicksearch( options );
> >> there isn't anything other than the basic stuff you need in the object
> >> you're passing through
>
> >> Rik
>
> >> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>
> >> > First I must say that I really like your plugin...and I did go and
> >> > read some other stuff on your site about your latest
> >> > plugin...congrats!
>
> >> > I have the following options in the jquery.quicksearch.js file...I
> >> > believe that row striping is off...but I am not much of a programmer
> >> > so let me know what I need to do if I haven't done your suggestions.
>
> >> > ;(function( $ ){
> >> >        $.fn.quicksearch = function(options) {
>
> >> >                options = jQuery.extend({
> >> >                        position: 'prepend',
> >> >                        attached: 'body',
> >> >                        formId: 'quicksearch',
> >> >                        labelText: 'Quick Search',
> >> >                        labelClass: 'qs_label',
> >> >                        inputText: null,
> >> >                        inputClass: 'qs_input',
> >> >                        loaderId: 'loader',
> >> >                        loaderClass: 'loader',
> >> >                        loaderImg: null,
> >> >                        loaderText: '',
> >> >                        stripeRowClass: null,
> >> >                        hideElement: null,
> >> >                        delay: 500,
> >> >                        focusOnLoad: false,
> >> >                        onBefore: null,
> >> >                        onAfter: null,
> >> >                        filter: null,
> >> >                        randomElement: 
> >> > 'qs'+Math.floor(Math.random()*100)
> >> >                }, options);
>
> >> >                var timeout;
> >> >                var cache;
> >> >                var score = {};
> >> >                var el = this;
> >> >                var stripeRowLength = (!is_empty(options.stripeRowClass)) 
> >> > ?
> >> > options.stripeRowClass.length : 0;
> >> >                var doStripe = (stripeRowLength > 0) ? true : false;
>
> >> >                function is_empty (i)
> >> >                {
> >> >                        return (i == null || i == undefined || i == 
> >> > false) ? true: false;
> >> >                }
>
> >> >                function get_cache (el)
> >> >                {
> >> >                        cache = 
> >> > $(el).not('.'+options.noResultsClass).map(function(){
> >> >                                return 
> >> > strip_html(normalise(this.innerHTML));
> >> >                        });
> >> >                }
>
> >> >                function normalise (i)
> >> >                {
> >> >                        return $.trim(i.toLowerCase().replace(/\n/, 
> >> > '').replace(/\s{2,}/, '
> >> > '));
> >> >                }
>
> >> >                function get_key()
> >> >                {
> >> >                        var input = strip_html(normalise($('input[rel="' +
> >> > options.randomElement + '"]').val()));
>
> >> >                        if (typeof options.filter == "function") { input 
> >> > = options.filter
> >> > (input); }
>
> >> >                        if (input.indexOf(' ') == -1)
> >> >                        {
> >> >                                return input;
> >> >                        }
> >> >                        else
> >> >                        {
> >> >                                return input.split(" ");
> >> >                        }
> >> >                }
>
> >> >                function test_key(k, value, type)
> >> >                {
> >> >                        if (type == "string")
> >> >                        {
> >> >                                return test_key_string(k, value);
> >> >                        }
> >> >                        else
> >

[jQuery] ajaxForm Error: Permission denied to call method Location.toString

2008-11-21 Thread Tolis Christomanos
Hi all,

I have this form

http://www.fares.gr/tests/well_fares_form/

And i am trying to load the server response to a div in the same page but i
get the Permission denied to call method Location.toString

Any ideas?


[jQuery] Plucking values from multiple inputs at once

2008-11-21 Thread Hector Virgen
>From what I undstand, jQuery#val() returns the value of the first matched
element.

Sample HTML:




$('input[type=hidden][name="test\[\]"]').val(); // returns "foo"

Is there an easy way to get an array of values from all of the elements that
matched the selector?

So far I have this, but I'd like to reduce this to a jQuery method if there
is one:

var values = [];
$('input[type=hidden][name="test\[\]"]').each(function()
{
values.push($(this).val());
});

console.log(values); // [foo, bar]

-Hector


[jQuery] Simple Validate if empty

2008-11-21 Thread coughlinsmyalias

Hey,

I have been trying to look for a simple way to validate one field, if
its empty then do X, how would I check? I have this:

term = $('#term').attr('value');

Would I check if term is empty? Then don't allow the submit, my code
is here: http://pastie.org/320870

Any thoughts?

Thanks,

Ryan


[jQuery] Re: A better way

2008-11-21 Thread Brendan

Very good to know! Now I know what to look for :)

On Nov 20, 6:11 pm, Dave Methvin <[EMAIL PROTECTED]> wrote:
> > I was looking at the jQuery docs for toggle here
> >  http://docs.jquery.com/Events/toggle
>
> The toggle() without any arguments implements show/hide functionality,
> so it's in the Effects section:
>
> http://docs.jquery.com/Effects/toggle
>
> There are a few other words that overlap like this, such as .load()
> which either loads some content via ajax or sets an onload handler,
> depending on its arguments.


[jQuery] smoother .animate()?

2008-11-21 Thread bnlps


Hi, kids --

there's a nice Flash site ... marcecko dot com ( especially, the
window-content-movement, mouse.x/y)

... ported to html/jQ, but couldn't find a way to realise the "smooth
sliding" part while moving; it's f'd, scratchy.
any solutions? or, a Flash-only thing?

thanks!
-B


now, have a look:
(tested on FF3, IE7 -- XP)
-




http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">



jQx









http://jqueryjs.googlecode.com/
files/jquery-1.2.6.min.js">



//


























[jQuery] Re: detect element width change

2008-11-21 Thread MorningZ

Check out:

http://www.west-wind.com/Weblog/posts/478985.aspx



On Nov 21, 1:45 pm, Adam <[EMAIL PROTECTED]> wrote:
> How can I detect when an element's width (or height) has changed?  For
> instance, on a div element.


[jQuery] detect element width change

2008-11-21 Thread Adam

How can I detect when an element's width (or height) has changed?  For
instance, on a div element.


[jQuery] Re: Tablesorter pager and ajax

2008-11-21 Thread Balazs Endresz

http://tablesorter.com/docs/example-ajax.html

inside the callback (the third argument for .load )
// let the plugin know that we made a update
$("table").trigger("update");


On Nov 21, 5:43 pm, led <[EMAIL PROTECTED]> wrote:
> I've noted that tablesorter and the pager don't work in ajax response
> such as the content returned in the jquery load(), with or without
> previous Table tags
> How can i fix this .
> See this demo of the problem in  http://realferias.com/pager.asp


[jQuery] Re: Crazy tables with checkboxes

2008-11-21 Thread c.barr

err, correction to what I wrote, shift-selection only works when
selecting top to bottom, not the other way around.


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread Rik Lomas

I would increase the delay to something like 1000, that may help performance

I think the problem with taking the delay out is the comma at the end
of the labelText bit, IE doesn't like those missing commas in objects

Rik

2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
> I see...
>
> All I have there is very basic things
>
> 
> $(document).ready(function () {
> $('table tbody tr').quicksearch({
> position: 'before',
> attached: 'table',
> labelText: 'Search the GPI Fuel Product Manuals',
> delay: 50
>});
> })
> 
>
> If i take the delay:50 out I don't get a search box.  Sorry to be such
> a pain...
>
> On Nov 21, 11:27 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
>> I meant in the options, so when you do $(...).quicksearch( options );
>> there isn't anything other than the basic stuff you need in the object
>> you're passing through
>>
>> Rik
>>
>> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>>
>>
>>
>> > First I must say that I really like your plugin...and I did go and
>> > read some other stuff on your site about your latest
>> > plugin...congrats!
>>
>> > I have the following options in the jquery.quicksearch.js file...I
>> > believe that row striping is off...but I am not much of a programmer
>> > so let me know what I need to do if I haven't done your suggestions.
>>
>> > ;(function( $ ){
>> >$.fn.quicksearch = function(options) {
>>
>> >options = jQuery.extend({
>> >position: 'prepend',
>> >attached: 'body',
>> >formId: 'quicksearch',
>> >labelText: 'Quick Search',
>> >labelClass: 'qs_label',
>> >inputText: null,
>> >inputClass: 'qs_input',
>> >loaderId: 'loader',
>> >loaderClass: 'loader',
>> >loaderImg: null,
>> >loaderText: '',
>> >stripeRowClass: null,
>> >hideElement: null,
>> >delay: 500,
>> >focusOnLoad: false,
>> >onBefore: null,
>> >onAfter: null,
>> >filter: null,
>> >randomElement: 
>> > 'qs'+Math.floor(Math.random()*100)
>> >}, options);
>>
>> >var timeout;
>> >var cache;
>> >var score = {};
>> >var el = this;
>> >var stripeRowLength = (!is_empty(options.stripeRowClass)) ?
>> > options.stripeRowClass.length : 0;
>> >var doStripe = (stripeRowLength > 0) ? true : false;
>>
>> >function is_empty (i)
>> >{
>> >return (i == null || i == undefined || i == false) 
>> > ? true: false;
>> >}
>>
>> >function get_cache (el)
>> >{
>> >cache = 
>> > $(el).not('.'+options.noResultsClass).map(function(){
>> >return 
>> > strip_html(normalise(this.innerHTML));
>> >});
>> >}
>>
>> >function normalise (i)
>> >{
>> >return $.trim(i.toLowerCase().replace(/\n/, 
>> > '').replace(/\s{2,}/, '
>> > '));
>> >}
>>
>> >function get_key()
>> >{
>> >var input = strip_html(normalise($('input[rel="' +
>> > options.randomElement + '"]').val()));
>>
>> >if (typeof options.filter == "function") { input = 
>> > options.filter
>> > (input); }
>>
>> >if (input.indexOf(' ') == -1)
>> >{
>> >return input;
>> >}
>> >else
>> >{
>> >return input.split(" ");
>> >}
>> >}
>>
>> >function test_key(k, value, type)
>> >{
>> >if (type == "string")
>> >{
>> >return test_key_string(k, value);
>> >}
>> >else
>> >{
>> >return test_key_arr(k, value);
>> >}
>> >}
>>
>> >function test_key_string(k, value)
>> >{
>> >return (value.indexOf(k) > -1);
>> >}
>>
>> >function test_key_arr(k, value)
>> >{
>> >for (var i = 0; i < k.length; i++) {
>> >var test = value.indexOf(k[i]);
>> >if (test == -1) {
>> > 

[jQuery] Re: Pause between each()

2008-11-21 Thread d . williams

This works perfectly!

Thanks, Mike!


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho
I see...

All I have there is very basic things


$(document).ready(function () {
$('table tbody tr').quicksearch({
position: 'before',
attached: 'table',
labelText: 'Search the GPI Fuel Product Manuals',
delay: 50
});
})


If i take the delay:50 out I don't get a search box.  Sorry to be such
a pain...

On Nov 21, 11:27 am, "Rik Lomas" <[EMAIL PROTECTED]> wrote:
> I meant in the options, so when you do $(...).quicksearch( options );
> there isn't anything other than the basic stuff you need in the object
> you're passing through
>
> Rik
>
> 2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>
>
>
> > First I must say that I really like your plugin...and I did go and
> > read some other stuff on your site about your latest
> > plugin...congrats!
>
> > I have the following options in the jquery.quicksearch.js file...I
> > believe that row striping is off...but I am not much of a programmer
> > so let me know what I need to do if I haven't done your suggestions.
>
> > ;(function( $ ){
> >        $.fn.quicksearch = function(options) {
>
> >                options = jQuery.extend({
> >                        position: 'prepend',
> >                        attached: 'body',
> >                        formId: 'quicksearch',
> >                        labelText: 'Quick Search',
> >                        labelClass: 'qs_label',
> >                        inputText: null,
> >                        inputClass: 'qs_input',
> >                        loaderId: 'loader',
> >                        loaderClass: 'loader',
> >                        loaderImg: null,
> >                        loaderText: '',
> >                        stripeRowClass: null,
> >                        hideElement: null,
> >                        delay: 500,
> >                        focusOnLoad: false,
> >                        onBefore: null,
> >                        onAfter: null,
> >                        filter: null,
> >                        randomElement: 'qs'+Math.floor(Math.random()*100)
> >                }, options);
>
> >                var timeout;
> >                var cache;
> >                var score = {};
> >                var el = this;
> >                var stripeRowLength = (!is_empty(options.stripeRowClass)) ?
> > options.stripeRowClass.length : 0;
> >                var doStripe = (stripeRowLength > 0) ? true : false;
>
> >                function is_empty (i)
> >                {
> >                        return (i == null || i == undefined || i == false) ? 
> > true: false;
> >                }
>
> >                function get_cache (el)
> >                {
> >                        cache = 
> > $(el).not('.'+options.noResultsClass).map(function(){
> >                                return strip_html(normalise(this.innerHTML));
> >                        });
> >                }
>
> >                function normalise (i)
> >                {
> >                        return $.trim(i.toLowerCase().replace(/\n/, 
> > '').replace(/\s{2,}/, '
> > '));
> >                }
>
> >                function get_key()
> >                {
> >                        var input = strip_html(normalise($('input[rel="' +
> > options.randomElement + '"]').val()));
>
> >                        if (typeof options.filter == "function") { input = 
> > options.filter
> > (input); }
>
> >                        if (input.indexOf(' ') == -1)
> >                        {
> >                                return input;
> >                        }
> >                        else
> >                        {
> >                                return input.split(" ");
> >                        }
> >                }
>
> >                function test_key(k, value, type)
> >                {
> >                        if (type == "string")
> >                        {
> >                                return test_key_string(k, value);
> >                        }
> >                        else
> >                        {
> >                                return test_key_arr(k, value);
> >                        }
> >                }
>
> >                function test_key_string(k, value)
> >                {
> >                        return (value.indexOf(k) > -1);
> >                }
>
> >                function test_key_arr(k, value)
> >                {
> >                        for (var i = 0; i < k.length; i++) {
> >                                var test = value.indexOf(k[i]);
> >                                if (test == -1) {
> >                                        return false;
> >                                }
> >                        }
> >                        return true;
> >                }
>
> >                function strip_html (input)
> >                {
> >                        var regexp = new RegExp(/\<[^\<]+\>/g);
> >                        var output = input.replace(regexp, "");
> >                        output = output.toLowerCase();
> >                   

[jQuery] document.location.hash and iFrame not working. help me please!

2008-11-21 Thread Mr.Ilia

Dear guys, hi!

Please I need a help! I have stuck with applying a click into iFrame.

I have a page with navigation. so when i need to open a page from URL
with a certain tabs opened and clicked. i just use
document.location.hash property.

It works perfectly if I put the desired (that has to be clicked)
content into div.
then when I type in address line

index.html?tab=0#members_menu1_submenu1

it clicks all off them correctly.

BUT

if the last part that contains submenu i cut and put into  the
whole
thing doesn't get initilized.

I'm sure it is working correctly with divs. but how to force the
document.location.hash click it in a iFrame?? so 2 clicks on the same
page (#members_menu1) and third one (submenu1) in to iFrame??

PLEASE HELP! SPEND 3 days already with that!!

here is .js for document.location.hash



$(document).ready( function () {

if (document.location.hash) {
var pnp = document.location.hash.split('_');


$("a[href='"+pnp[0]+"']").click();

if (pnp[1]) {
$("a[href='"+pnp[0]+'_'+pnp[1]+"']").click();
}

if (pnp[2]) {
$("a[href='"+location.hash+"']").click();
}


}
if ($.browser.mozilla) {
$('a').click(function() {
this.blur();
});
}

});


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread Rik Lomas

I meant in the options, so when you do $(...).quicksearch( options );
there isn't anything other than the basic stuff you need in the object
you're passing through

Rik

2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>
> First I must say that I really like your plugin...and I did go and
> read some other stuff on your site about your latest
> plugin...congrats!
>
> I have the following options in the jquery.quicksearch.js file...I
> believe that row striping is off...but I am not much of a programmer
> so let me know what I need to do if I haven't done your suggestions.
>
> ;(function( $ ){
>$.fn.quicksearch = function(options) {
>
>options = jQuery.extend({
>position: 'prepend',
>attached: 'body',
>formId: 'quicksearch',
>labelText: 'Quick Search',
>labelClass: 'qs_label',
>inputText: null,
>inputClass: 'qs_input',
>loaderId: 'loader',
>loaderClass: 'loader',
>loaderImg: null,
>loaderText: '',
>stripeRowClass: null,
>hideElement: null,
>delay: 500,
>focusOnLoad: false,
>onBefore: null,
>onAfter: null,
>filter: null,
>randomElement: 'qs'+Math.floor(Math.random()*100)
>}, options);
>
>var timeout;
>var cache;
>var score = {};
>var el = this;
>var stripeRowLength = (!is_empty(options.stripeRowClass)) ?
> options.stripeRowClass.length : 0;
>var doStripe = (stripeRowLength > 0) ? true : false;
>
>function is_empty (i)
>{
>return (i == null || i == undefined || i == false) ? 
> true: false;
>}
>
>function get_cache (el)
>{
>cache = 
> $(el).not('.'+options.noResultsClass).map(function(){
>return strip_html(normalise(this.innerHTML));
>});
>}
>
>function normalise (i)
>{
>return $.trim(i.toLowerCase().replace(/\n/, 
> '').replace(/\s{2,}/, '
> '));
>}
>
>function get_key()
>{
>var input = strip_html(normalise($('input[rel="' +
> options.randomElement + '"]').val()));
>
>if (typeof options.filter == "function") { input = 
> options.filter
> (input); }
>
>if (input.indexOf(' ') == -1)
>{
>return input;
>}
>else
>{
>return input.split(" ");
>}
>}
>
>function test_key(k, value, type)
>{
>if (type == "string")
>{
>return test_key_string(k, value);
>}
>else
>{
>return test_key_arr(k, value);
>}
>}
>
>function test_key_string(k, value)
>{
>return (value.indexOf(k) > -1);
>}
>
>function test_key_arr(k, value)
>{
>for (var i = 0; i < k.length; i++) {
>var test = value.indexOf(k[i]);
>if (test == -1) {
>return false;
>}
>}
>return true;
>}
>
>function strip_html (input)
>{
>var regexp = new RegExp(/\<[^\<]+\>/g);
>var output = input.replace(regexp, "");
>output = output.toLowerCase();
>return output;
>}
>
>function select_element (el)
>{
>if(options.hideElement == "grandparent")
>{
>return $(el).parent().parent();
>}
>else if (options.hideElement == "parent")
>{
>return $(el).parent();
>}
>else
>{
>return $(el);
>}
>   

[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho

First I must say that I really like your plugin...and I did go and
read some other stuff on your site about your latest
plugin...congrats!

I have the following options in the jquery.quicksearch.js file...I
believe that row striping is off...but I am not much of a programmer
so let me know what I need to do if I haven't done your suggestions.

;(function( $ ){
$.fn.quicksearch = function(options) {

options = jQuery.extend({
position: 'prepend',
attached: 'body',
formId: 'quicksearch',
labelText: 'Quick Search',
labelClass: 'qs_label',
inputText: null,
inputClass: 'qs_input',
loaderId: 'loader',
loaderClass: 'loader',
loaderImg: null,
loaderText: '',
stripeRowClass: null,
hideElement: null,
delay: 500,
focusOnLoad: false,
onBefore: null,
onAfter: null,
filter: null,
randomElement: 'qs'+Math.floor(Math.random()*100)
}, options);

var timeout;
var cache;
var score = {};
var el = this;
var stripeRowLength = (!is_empty(options.stripeRowClass)) ?
options.stripeRowClass.length : 0;
var doStripe = (stripeRowLength > 0) ? true : false;

function is_empty (i)
{
return (i == null || i == undefined || i == false) ? 
true: false;
}

function get_cache (el)
{
cache = 
$(el).not('.'+options.noResultsClass).map(function(){
return strip_html(normalise(this.innerHTML));
});
}

function normalise (i)
{
return $.trim(i.toLowerCase().replace(/\n/, 
'').replace(/\s{2,}/, '
'));
}

function get_key()
{
var input = strip_html(normalise($('input[rel="' +
options.randomElement + '"]').val()));

if (typeof options.filter == "function") { input = 
options.filter
(input); }

if (input.indexOf(' ') == -1)
{
return input;
}
else
{
return input.split(" ");
}
}

function test_key(k, value, type)
{
if (type == "string")
{
return test_key_string(k, value);
}
else
{
return test_key_arr(k, value);
}
}

function test_key_string(k, value)
{
return (value.indexOf(k) > -1);
}

function test_key_arr(k, value)
{
for (var i = 0; i < k.length; i++) {
var test = value.indexOf(k[i]);
if (test == -1) {
return false;
}
}
return true;
}

function strip_html (input)
{
var regexp = new RegExp(/\<[^\<]+\>/g);
var output = input.replace(regexp, "");
output = output.toLowerCase();
return output;
}

function select_element (el)
{
if(options.hideElement == "grandparent")
{
return $(el).parent().parent();
}
else if (options.hideElement == "parent")
{
return $(el).parent();
}
else
{
return $(el);
}
}

function stripe (el)
{
if (doStripe)
{
var i = 0;

select_element(el).filter(':visible').each(function () {

for (var j = 0; j < stripeRowLength; 
j++)
   

[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread Rik Lomas

Hi, I'm the author of the quicksearch plugin, unfortunately the code
*is* a bit slow when dealing with large sets of data and it is one of
the issues I'm trying to fix, I would recommend not having any extra
features enabled to help speed it up (e.g. row striping)

Someone might correct me, but I do think that Javascript in general
isn't particularly speedy when dealing with that much data, so I might
be able to make that much difference to the speed, but I will carry on
working to get it faster

Rik


2008/11/21 abovegaucho <[EMAIL PROTECTED]>:
>
> I am having issues with the jquery.quicksearch plugin.  I first
> created some php code to pull a csv file into a table.  Then I used
> the plugin to search the table that was loaded through the php code.
>
> The table wasn't very large so it worked like a charm.  However, I
> tried doing the same thing with a much larger csv file (about 4000
> rows and 3 columns).  The plugin was very slow to respond.
>
> I also just ran some tests and it is slow in IE7 but it will
> work...now I did the same thing in firefox and it crashes firefox.  It
> also works in IE6 slow but it works.
>
> I did some google searches and found this:
>
> http://orderedlist.com/articles/live-search-with-quicksilver-style-fo...
>
> However this code is for list items  I am not much of a programmer
> so I don't know how to modify to search the large table that is loaded
> through the csv file.
>
> Any suggestions!?
>
> Thanks
>



-- 
Rik Lomas
http://rikrikrik.com


[jQuery] jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho

I am having issues with the jquery.quicksearch plugin.  I first
created some php code to pull a csv file into a table.  Then I used
the plugin to search the table that was loaded through the php code.

The table wasn't very large so it worked like a charm.  However, I
tried doing the same thing with a much larger csv file (about 4000
rows and 3 columns).  The plugin was very slow to respond.

I also just ran some tests and it is slow in IE7 but it will
work...now I did the same thing in firefox and it crashes firefox.  It
also works in IE6 slow but it works.

I did some google searches and found this:

http://orderedlist.com/articles/live-search-with-quicksilver-style-fo...

However this code is for list items  I am not much of a programmer
so I don't know how to modify to search the large table that is loaded
through the csv file.

Any suggestions!?

Thanks


[jQuery] Tablesorter pager and ajax

2008-11-21 Thread led

I've noted that tablesorter and the pager don't work in ajax response
such as the content returned in the jquery load(), with or without
previous Table tags
How can i fix this .
See this demo of the problem in  http://realferias.com/pager.asp


[jQuery] Re: set default action for all links

2008-11-21 Thread Richard D. Worth
On Fri, Nov 21, 2008 at 11:28 AM, Pierre Bellan <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I don't know what lightbox is but it's not important.
> Like you said, you just need an selector for all links.
>
> $('a').click(function(){
> myUrl = $(this).attr('href');
> openLightbox(myUrl);
> });


Don't forget the var keyword for myUrl, and return false; so the link
doesn't get followed.

$('a').click(function(){
  var myUrl = $(this).attr('href');
  openLightbox(myUrl);
  return false;
});

- Richard


[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Sjeiti

:-) heh... will do in just a minute... got a beer right here... just
waiting for some people to show up so we can hit the streets.
IE sucks though: can't see what is wrong there yet, guess I'm gonna
have to make the php write a log file .


On Nov 21, 5:17 pm, Mickster <[EMAIL PROTECTED]> wrote:
> Leave the drawing board and have a beer at Rembrandtpleijn(?)
> instead :)


[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Mickster

Found it.
The config.php wasn't included but I didn't get any error message from
my php...
So in index.php, I changed line 10 to include the config.php before
the init.php:


Works and looks really good!

Keep up the good job!

On Nov 21, 5:17 pm, Mickster <[EMAIL PROTECTED]> wrote:
> Using Firefox 3, PHP 5.2.2. Firefox is quiet, says nothing.
>
> But don't worry about it - there's obviously something wrong on my
> side when not even the constants work - your code is good!
> I'll look into it again later!
>
> Leave the drawing board and have a beer at Rembrandtpleijn(?)
> instead :)
>
> Thanks!
>
> On Nov 21, 5:04 pm, Sjeiti <[EMAIL PROTECTED]> wrote:
>
> > I checked it here on two webservers :-(
> > What version php are you running?
> > And if you have Firebug installed, what does the console say?
> > or maybe...
> > ah... bloody... you must be running IE
> > The last version ran just fine in IE so I didn't bother to check
> > (Firefox and Chrome were working so I presumed...)
> > oh well... back to the drawing board :.(
>
> > On Nov 21, 4:37 pm, Mickster <[EMAIL PROTECTED]> wrote:
>
> > > Thanks for your quick answer!
>
> > > I've downloaded it but I can't get it to work - for some reason the
> > > define constants doesn't work (suspect my setup has a bad day :) ).
> > > Anyhow, I changed all the constants and got all js-files to load.
> > > But when I click the examples, nothing happen - no errors, no
> > > nothing...
>
> > > Most likely something is wrong with my setup, so I'll keep checking...
>
> > > Thanks!


[jQuery] Re: set default action for all links

2008-11-21 Thread Pierre Bellan
Hi,

I don't know what lightbox is but it's not important.
Like you said, you just need an selector for all links.

$('a').click(function(){
myUrl = $(this).attr('href');
openLightbox(myUrl);
});

I think this code works, but i have not test it.

Pierre

Yogi Berra  - "I never said most of the things I said."

2008/11/21 EC <[EMAIL PROTECTED]>

>
> Hi, i would like to know if is possible to set a default action for
> all href in a page...
>
> I know i can use selectors to find all href but i don't know what to
> put in function.
>
> I just would like that all link open in a lightbox...
>
> Someone can help me?
>
> Thanks
>


[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Mickster

Using Firefox 3, PHP 5.2.2. Firefox is quiet, says nothing.

But don't worry about it - there's obviously something wrong on my
side when not even the constants work - your code is good!
I'll look into it again later!

Leave the drawing board and have a beer at Rembrandtpleijn(?)
instead :)

Thanks!

On Nov 21, 5:04 pm, Sjeiti <[EMAIL PROTECTED]> wrote:
> I checked it here on two webservers :-(
> What version php are you running?
> And if you have Firebug installed, what does the console say?
> or maybe...
> ah... bloody... you must be running IE
> The last version ran just fine in IE so I didn't bother to check
> (Firefox and Chrome were working so I presumed...)
> oh well... back to the drawing board :.(
>
> On Nov 21, 4:37 pm, Mickster <[EMAIL PROTECTED]> wrote:
>
> > Thanks for your quick answer!
>
> > I've downloaded it but I can't get it to work - for some reason the
> > define constants doesn't work (suspect my setup has a bad day :) ).
> > Anyhow, I changed all the constants and got all js-files to load.
> > But when I click the examples, nothing happen - no errors, no
> > nothing...
>
> > Most likely something is wrong with my setup, so I'll keep checking...
>
> > Thanks!


[jQuery] Re: Load JQuery only once

2008-11-21 Thread Eric Martin

Raphael,

Since you are creating a WordPress plugin, I suggest looking at the
wp_enqueue_script() function[1].

Using your example, you'd include your scripts with something like:



And WordPress will handle the loading of jQuery and your plugin
scripts.

-Eric

[1] http://codex.wordpress.org/Function_Reference/wp_enqueue_script



On Nov 20, 4:16 pm, Raphael Jolivet <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've developped several plugins for wordpress that require JQuery.
> As I have packaged and distributed these plugins separately, they come
> all with one version of JQuery.
>
> The problem is that if someone uses two of these plugins, the HTML
> header will look like :
> http://mysite/plugin1/jquery.js";>
>
> http://mysite/plugin1/
> jquery.plugin1.js" >
> http://mysite/plugin2/jquery.js";>
>
> http://mysite/plugin2/
> jquery.plugin2.js" >
>
> There are two issues here :
> * JQuery is loaded twice
> * The plugin declared by plugin1 will be erased by the second load of
> Jquery.js.
>
> Can I load Jquery dynamically by testing it is not already loaded ?
>
> I'm searching for a way to replace :
>
>  script>
>
> by
>
>