[jQuery] [OT] Wordpress plugin release using jQuery and it plugins

2007-11-19 Thread Benjamin Sterling
Hey guys,
Just wanted to drop a line and hopefully get some feedback on a Wordpress
plugin I put together using some of jQuery plugins as well as the gallery
plugins I put together.

Have a look at the demo:
http://galleries.benjaminsterling.com/wp-admin
 un/pw: demo/demo

Once in, click on the BSG tab.

And the blog post and download at:
http://benjaminsterling.com/2007/11/20/benjamin-sterling-galleries-wordpress-photoimage-gallery-plugin-for-flickr-picasa/

Any bugs, please post them on the blog so I can keep track of them better.

Thanks.

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


[jQuery] Re: Accordion Header Image Replacement

2007-11-19 Thread Karl Swedberg



On Nov 19, 2007, at 3:11 PM, yetanother wrote:



I have a simple accordion set up with the code below, but I want to be
able to change the header's background image from an up arrow state to
down arrow state and back automatically. Any ideas on where to go from
here?

$(document).ready(function() {
$('div.acc> div').hide();
  $('div.acc> h1').click(function() {

var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div:visible');

if ($visibleSiblings.length ) {
  $visibleSiblings.slideUp('slow', function() {
$nextDiv.slideToggle('slow');
  });
} else {
   $nextDiv.slideToggle('slow');
}
  });
});

-



Test
Hidden Text

Test
Hidden Text




Hi Will,

(sorry if this is a double post)

After the .click() line, you could do something like this...

  var currImage = $(this).css('backgroundImage');
  $(this).css({backgroundImage: currImage == 'first-image.jpg' ?  
'second-image.jpg' : 'first-image.jpg'});


... replacing 'up-arrow.jpg' and 'second-image.jpg' with the real  
names of the files.




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



[jQuery] Re: Preloading images with a callback function

2007-11-19 Thread Flesler

var $img = $('').load(function()
{ alert('loaded!'); }).appendTo('body').attr('src','.jpg');

Ariel Flesler

On 19 nov, 03:59, Bodom78 <[EMAIL PROTECTED]> wrote:
> I was about to post the exact question, Basically I'm changing the src
> value and fading in new images but I don't want the fade to begin
> until the image has loaded.
>
> Anyone?
>
> On Oct 17, 4:40 pm, Steax <[EMAIL PROTECTED]> wrote:
>
>
>
> > I understand how topreloadimages. Well, at least to an extent
> > (although I'm sure jQuery must have some easier solution for this).
> > But now I need to be able to send a callback function the moment 
> > thepreloadiscomplete. Anyone have any code on this?- Ocultar texto de la 
> > cita -
>
> - Mostrar texto de la cita -


[jQuery] Re: Totally lost: scroll the page to put a div at the top

2007-11-19 Thread Flesler

How come you didn't see this ? http://jquery.com/plugins/project/ScrollTo
:)

Ariel Flesler

On 19 nov, 19:55, pbarney <[EMAIL PROTECTED]> wrote:
> Hey guys... I'm lost on this. I've been searching all over for a
> simple solution and I can't seem to find it outside of something like
> interface or a large plugin.
>
> Is there a way to get jquery to scroll the whole page so a specified
> div is at the top of the screen?
>
> Specifically, when I enter into a form field within a div, I want that
> div to move to the top of the screen.
>
> I thought it would be fairly straightforward, but so far, no dice.
>
> Any thoughts?
>
> Thanks.
> Peter


[jQuery] [SITE SUBMISSION] songza.com

2007-11-19 Thread Jake McGraw
This is one of the first sites I saw and the following events took place:

1. "They've got to have some slick-ass library running underneath"...
2. Click "firebug"...
3. and what do you know jQuery.

Enjoy it while it's still legal.

- jake


[jQuery] Re: Image replacement

2007-11-19 Thread Wil Everts
I have tried using: $(this).find('.arrow').attr("src", "images/down.jpg");
and the opposite to replace the image source using the "arrow" class to find
it. It works for the down arrow replacement but I'm clearly on the w go back
to the up state...

New Code:

$(document).ready(function() {
$('div.acc> div').hide();
  $('div.acc> h1').click(function() {

var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div:visible');

if ($visibleSiblings.length ) {

  $visibleSiblings.slideUp('slow', function() {
$nextDiv.slideToggle('slow');
$(this).find('.arrow').attr("src", "images/up.jpg");
});

} else {

$nextDiv.slideToggle('slow');
$(this).find('.arrow').attr("src", "images/down.jpg");
}
  });
 });


[jQuery] Re: IE7 Tabs are invisible

2007-11-19 Thread Moonwalker

lol...I seem to write a little fast. I won't post anything more I
promiss, it's just that IE 6 bug driving me crazy.

I also thought of the bandwidth consuming, so I won't do that I
promiss, 'cause now I've finally found what I was searching for in the
link you have provided.

Thank you again for your effort and your great work Mr. Klaus.

Sincerely,

moonwalker

On Nov 19, 11:38 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On Nov 19, 6:23 pm, Moonwalker <[EMAIL PROTECTED]> wrote:
>
>
>
> > Ok I found the solution. It appears like I'm not using the last CSS
> > theme. I downloaded the one 
> > here:http://dev.jquery.com/view/trunk/themes/dark/dark.tabs.css
>
> > And it worked fine. Just one final question. Is it possible to use the
> > link in my applications? So let's say:
> > http://dev.jquery.com/view/trunk/themes/
> > dark/dark.tabs.css" type="text/css" media="screen" title="Dark
> > (Default)">
>
> > Instead of:
> > 
>
> > The first one is linked to the CSS online hosted by jquery.com, the
> > second one is to my local files. I would like to know if it's allowed
> > to link to the one hosted on jquery.com and what are the disadvantages
> > of it. Until know I seem always to work with an older version of
> > something.
>
> It's possible, but you shouldn't be doing it. First of all, if you do,
> you're consuming bandwidth for jquery.com which needs to be paid for -
> not by you unless you're donating continously ;-)
>
> Moreover these files are worked on and you may get a file that doesn't
> work well in one or the other browser from time to time if you use
> that URL. And last not least, the file's URL may change without you
> noticing it.
>
> So you're well advised to get a copy of the file via SVN and put it
> onto your own server.
>
> --Klaus


[jQuery] Re: Working with cluetip and validate

2007-11-19 Thread Josh Nathanson
You do not have to use inline validate messages.  You can use the configuration 
variable for this:

$("#myform").validate({ messages: { myfield: "you must enter a value." } });

-- Josh


  - Original Message - 
  From: Alessandro Feijó 
  To: jquery-en@googlegroups.com 
  Sent: Monday, November 19, 2007 4:04 AM
  Subject: [jQuery] Working with cluetip and validate


  I just set a form using both plugins

  (jquery.validate.js and jquery.cluetip.js)

  Both use Title to set his content.

  So, a natural conflit is heppening.

  The cluetip title (before the pipe) its been the actualy content of validate 
red warning string. 

  How can I circunvent that?

  If I can give a sugestion, both plugins could offer the possibility to set a 
custom attribute:

   

  or, more simple to read:

  

  I use custom attr in my drupal project without problems!  Very pratical


  Thanks
  Feijó



[jQuery] Re: New Plugin: jQuery Fx Queues

2007-11-19 Thread Rick Faircloth

Very interesting, Luciano!

Rick

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> Luciano G.
> Panaro
> Sent: Monday, November 19, 2007 1:56 PM
> To: jQuery (English)
> Subject: [jQuery] New Plugin: jQuery Fx Queues
> 
> 
> (Sorry if I'm double posting)
> 
> Hi,
> 
> I created a new plugin that reimplements the queueing system, allowing
> the possibility of having global queues for jquery's animations
> (similar to what Scriptaculous has).
> 
> http://jquery.com/plugins/project/fxqueues
> http://www.decodeuri.com/jqueryfxqueues/
> 
> New arguments added to animate:
> 
> * queue: (string) Name of the queue. If it doesn't exist, it creates
> the new queue.
> * scope: (string) Name of the scope.
> * queuePosition: ("front"|"end") Queue position where animation (or
> scope, if passed) is queued.
> * wait: (int) Milliseconds to wait before starting the animation.
> 
> Queues:
> A queue is an array that may contain animations to perform and/or
> scopes.
> 
> Scopes:
> What happens if you needed to enqueue not a single effect, but a group
> of effects to be played altogether? This is where scopes come to save
> the day. A scope is an object that can be contained in a queue. It is
> an array that contains only animations to perform. When a scope is
> dequeued, it automatically plays all the animations it contains.
> 
> This is just a brief introduction, but I hope you get it and find it
> useful. Any comments, bugs, enhancements, ideas, whatever are more
> than welcomed :).
> 
> Thanks!




[jQuery] Re: Performing actions at specific times of day, or at random?

2007-11-19 Thread Flesler

The easiest option is to make the href absolute. Meaning
'www.domain.com/stylesheet-xxx.css' instead of just 'stylesheet-
xxx.css'.
That should be enough, if you need to use the site in more than one
domain... then you will have to find another way. :)

Ariel Flesler

On 19 nov, 18:54, zarino <[EMAIL PROTECTED]> wrote:
> Ahh... one more question...
>
> Since I have index.html pages on two levels of my site (both
> 'www.domain.com/'and 'www.domain.com/stuff') the generated 
> element needs to contain one href for pages on the root level, and
> then a different href for pages one directory up. At the moment, the
> javascript (stored in an external file) simply serves up one href,
> which means the stylesheet can't be found for pages anywhere other
> than the root level.
>
> I hope that makes sense. How can I ensure the  element's
> relative href points to the correct file, no matter which level it's
> accessed from?
>
> Thanks,
>
> Zarino Zappia
>
> On Nov 17, 7:26 pm, Flesler <[EMAIL PROTECTED]> wrote:
>
>
>
> > I don't think there's a plugin like that, but you definitely don't
> > need jQuery to get the hour of the day and check for a range.
>
> > var hour = new Date().getHours();
> > var id = hour < 12 ? 'morning'
> >: hour < 13 ? 'noon'
> >: hour < 19 ? 'afternoon'
> >: 'night';
>
> > document.getElementById('stylesheet-'+id).disabled = false;
>
> > That is just a simple example of how to do that, that works if you add
> > 4 css, with the attribute disabled="disabled" and you only enable the
> > one you want. You can add this right after the stylesheets, no need
> > for document.ready, so the style will be applied earlier.
>
> > The other option, is to use document.write, instead of
> > document.getElementById you write:
> > document.write(' > src="stylesheet-'+id+'.css" \/>).
> > or do the same, using DOM methods.
>
> > You can find info about Date's methods 
> > here:http://www.w3schools.com/jsref/jsref_obj_date.asp
>
> > with random:
> >   var ids = [ 'one', 'two', 'three' ];
> >   var index = Math.round( Math.random()*10 ) % 3;
> >   var id = ids[ index ]
>
> > Ariel Flesler
>
> > On Nov 16, 1:05 pm, zarino <[EMAIL PROTECTED]> wrote:
>
> > > Hi there!
>
> > > I'd like to load a different css stylesheet depending on the time of
> > > day. If it's 6am-12noon, it'll be one sheet. If it's 12noon-6pm it'll
> > > be another. And 6pm-6am, it'll be a third.
>
> > > I'm sure there must be an easy way of getting jQuery to take the
> > > browser's time and date, check which time range it falls within, and
> > > summon up the correct stylesheet (or simply add a class to the body
> > > tag, to which I'll hook css rules).
>
> > > Similarly, how would I get it to choose a stylesheet at random, from
> > > the list of three possibilities?
>
> > > Many thanks,
> > > Zarino Zappia- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -


[jQuery] Totally lost: scroll the page to put a div at the top

2007-11-19 Thread pbarney

Hey guys... I'm lost on this. I've been searching all over for a
simple solution and I can't seem to find it outside of something like
interface or a large plugin.

Is there a way to get jquery to scroll the whole page so a specified
div is at the top of the screen?

Specifically, when I enter into a form field within a div, I want that
div to move to the top of the screen.

I thought it would be fairly straightforward, but so far, no dice.

Any thoughts?

Thanks.
Peter


[jQuery] Re: New plugin: Jquery Fx Queues

2007-11-19 Thread SterlingK

That's pretty darn cool.  I can see a lot of good uses for that in
filling various animation needs.  While jquery is certainly cool in
it's own right, many of us spend much of our time trying to fill the
try-to-replace-flash gap.  This is a helpful step in that direction.

Thanks!

On Nov 19, 9:25 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Since I needed a global queueing system for jquery's effects for a
> project, I decided to develop it myself.
>
> The 
> result:http://jquery.com/plugins/project/fxqueues(http://www.decodeuri.com/jqueryfxqueues/)
>
> As the introduction explains:
>
> "The jQuery Fx Queues plugin is a global queueing (duh!) system that
> allows to enqueue effects of different elements, but also keeps
> jQuery's default
> queueing option.
> A wait argument was also added to be able to
> specify the time to wait before starting the animation."
>
> The plugin introduces two concepts: queues and scopes.
>
> Queues:
> A queue is an array that may contain animations to perform and/or
> scopes.
>
> Scopes:
> What happens if you needed to enqueue not a single effect, but a group
> of effects
> to be played altogether? This is where scopes come to save the day.
> A scope is an object that can be contained in a queue. It is an array
> that contains
> only animations to perform. When a scope is dequeued, it automatically
> plays all the animations it contains.
>
> To understand better these two ideas, I've made a simple example page
> (http://www.decodeuri.com/fxqueues/fxqueues.html) which should (and
> please let me know if it doesn't) be self explanatory about the uses
> of the plugin.
>
> I would appreciate feedback of any kind (bugs, comments, enhancements,
> things to document, etc.). Hope you find it useful!


[jQuery] Re: Performing actions at specific times of day, or at random?

2007-11-19 Thread zarino

Ahh... one more question...

Since I have index.html pages on two levels of my site (both
'www.domain.com/' and 'www.domain.com/stuff') the generated 
element needs to contain one href for pages on the root level, and
then a different href for pages one directory up. At the moment, the
javascript (stored in an external file) simply serves up one href,
which means the stylesheet can't be found for pages anywhere other
than the root level.

I hope that makes sense. How can I ensure the  element's
relative href points to the correct file, no matter which level it's
accessed from?

Thanks,

Zarino Zappia





On Nov 17, 7:26 pm, Flesler <[EMAIL PROTECTED]> wrote:
> I don't think there's a plugin like that, but you definitely don't
> need jQuery to get the hour of the day and check for a range.
>
> var hour = new Date().getHours();
> var id = hour < 12 ? 'morning'
>: hour < 13 ? 'noon'
>: hour < 19 ? 'afternoon'
>: 'night';
>
> document.getElementById('stylesheet-'+id).disabled = false;
>
> That is just a simple example of how to do that, that works if you add
> 4 css, with the attribute disabled="disabled" and you only enable the
> one you want. You can add this right after the stylesheets, no need
> for document.ready, so the style will be applied earlier.
>
> The other option, is to use document.write, instead of
> document.getElementById you write:
> document.write(' src="stylesheet-'+id+'.css" \/>).
> or do the same, using DOM methods.
>
> You can find info about Date's methods 
> here:http://www.w3schools.com/jsref/jsref_obj_date.asp
>
> with random:
>   var ids = [ 'one', 'two', 'three' ];
>   var index = Math.round( Math.random()*10 ) % 3;
>   var id = ids[ index ]
>
> Ariel Flesler
>
> On Nov 16, 1:05 pm, zarino <[EMAIL PROTECTED]> wrote:
>
> > Hi there!
>
> > I'd like to load a different css stylesheet depending on the time of
> > day. If it's 6am-12noon, it'll be one sheet. If it's 12noon-6pm it'll
> > be another. And 6pm-6am, it'll be a third.
>
> > I'm sure there must be an easy way of getting jQuery to take the
> > browser's time and date, check which time range it falls within, and
> > summon up the correct stylesheet (or simply add a class to the body
> > tag, to which I'll hook css rules).
>
> > Similarly, how would I get it to choose a stylesheet at random, from
> > the list of three possibilities?
>
> > Many thanks,
> > Zarino Zappia


[jQuery] Re: New Plugin: jQuery Fx Queues

2007-11-19 Thread Luciano G. Panaro

Thanks for your feedback. I'll see if I can work on the code these
days to pulish it (probably I'll extend the original fx object to make
it simpler). Thanks again =)

On 19 nov, 17:59, Flesler <[EMAIL PROTECTED]> wrote:
> I like it :) , the use of jQuery FX is, at least for me.. a bit
> esoteric.
> IMO, you should shorten the name of methods a bit, to make more jQuery-
> ish.
> For example: jQuery.fxQueues.clearQueue, I'd remove the 'Queue' part,
> as it is obvious what are you clearing.
> Very nice.
>
> Ariel Flesler
>
> On 19 nov, 15:56, "Luciano G. Panaro" <[EMAIL PROTECTED]>
> wrote:
>
> > (Sorry if I'm double posting)
>
> > Hi,
>
> > I created a new plugin that reimplements the queueing system, allowing
> > the possibility of having global queues for jquery's animations
> > (similar to what Scriptaculous has).
>
> >http://jquery.com/plugins/project/fxqueueshttp://www.decodeuri.com/jq...
>
> > New arguments added to animate:
>
> > * queue: (string) Name of the queue. If it doesn't exist, it creates
> > the new queue.
> > * scope: (string) Name of the scope.
> > * queuePosition: ("front"|"end") Queue position where animation (or
> > scope, if passed) is queued.
> > * wait: (int) Milliseconds to wait before starting the animation.
>
> > Queues:
> > A queue is an array that may contain animations to perform and/or
> > scopes.
>
> > Scopes:
> > What happens if you needed to enqueue not a single effect, but a group
> > of effects to be played altogether? This is where scopes come to save
> > the day. A scope is an object that can be contained in a queue. It is
> > an array that contains only animations to perform. When a scope is
> > dequeued, it automatically plays all the animations it contains.
>
> > This is just a brief introduction, but I hope you get it and find it
> > useful. Any comments, bugs, enhancements, ideas, whatever are more
> > than welcomed :).
>
> > Thanks!


[jQuery] Re: IE7 Tabs are invisible

2007-11-19 Thread Klaus Hartl

On Nov 19, 9:37 pm, Moonwalker <[EMAIL PROTECTED]> wrote:
> Is there any place where I can download all the last packages? I don't
> mean just the JS files, but also the themes, CSS and UI.

You can download the full package from here:
http://ui.jquery.com/

Click "Download jQuery UI".


--Klaus


[jQuery] Re: IE7 Tabs are invisible

2007-11-19 Thread Klaus Hartl

On Nov 19, 6:23 pm, Moonwalker <[EMAIL PROTECTED]> wrote:
> Ok I found the solution. It appears like I'm not using the last CSS
> theme. I downloaded the one 
> here:http://dev.jquery.com/view/trunk/themes/dark/dark.tabs.css
>
> And it worked fine. Just one final question. Is it possible to use the
> link in my applications? So let's say:
> http://dev.jquery.com/view/trunk/themes/
> dark/dark.tabs.css" type="text/css" media="screen" title="Dark
> (Default)">
>
> Instead of:
> 
>
> The first one is linked to the CSS online hosted by jquery.com, the
> second one is to my local files. I would like to know if it's allowed
> to link to the one hosted on jquery.com and what are the disadvantages
> of it. Until know I seem always to work with an older version of
> something.

It's possible, but you shouldn't be doing it. First of all, if you do,
you're consuming bandwidth for jquery.com which needs to be paid for -
not by you unless you're donating continously ;-)

Moreover these files are worked on and you may get a file that doesn't
work well in one or the other browser from time to time if you use
that URL. And last not least, the file's URL may change without you
noticing it.

So you're well advised to get a copy of the file via SVN and put it
onto your own server.


--Klaus


[jQuery] Re: updated Tablefilter Feedback please

2007-11-19 Thread James Dempster

Do you think this plugin needs a default UI? Or shall it remain event
driven only requiring the end developer to implement there own UI?
Does some one have any thoughts or comments on the subject?


[jQuery] Re: WAI-ARIA support in jQuery?

2007-11-19 Thread Klaus Hartl

On Nov 19, 9:21 pm, Pete <[EMAIL PROTECTED]> wrote:
> Hi!
>
> Is anyone working on implementing the appropriate WAI-ARIA roles,
> states and properties [1] where relevant in jQuery?
>
> [1]:http://www.w3.org/TR/aria-roadmap/

Not yet, but I'm planning to do so for UI Tabs.

--Klaus


[jQuery] Re: Autosuggest

2007-11-19 Thread Gordon

I've got a matching function that does what I want.  It splits the
input into an array and then checks each word against each string.
Only strings that include all the words will be included in the
dropdown, but the order ceases to be important.

On Nov 19, 9:43 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Gordon schrieb:> For example, if an address is listed as "Mister Foobar, 123 
> Fake
> > street, Quuxville, AS1 23D, then the autocomplete plugin would suggest
> > that address if the user typed in "fake street as1", or "fake
> > foobar".  Are there any autocumplete plugins that support doing this?
>
> I'll try to add a demo that does just that, based on a UL. I'm planning
> one change anyway that should enable support for using the UL.
>
> Though the matching is another story. You want it to match any word in
> any order, with at least one word matched, right? Sounds like you'd need
> to provide your own matcher then.
>
> Jörn


[jQuery] Re: Autosuggest

2007-11-19 Thread Gordon

Thanks for the suggestion, but it came too late.  I've now already
written something that seems to work pretty well.  Will post source
later for comments and in the hopes someone else will find it useful.

On Nov 19, 6:49 pm, Sean O <[EMAIL PROTECTED]> wrote:
> Gordon,
>
> I think the quickSearch plugin:http://rikrikrik.com/jquery/quicksearch/
>
> will help you.
>
> SEAN O
> __www.sean=o.com
>
>
>
> Gordon-35 wrote:
>
> >http://www.vulgarisoip.com/2007/06/29/jquerysuggest-an-alternative-jq...
> > demonstrates a plugin that's really close to what I want, it will pick
> > up on elements where the word entered isn't the first word in the
> > strings being searched.  Unfortunately, it still requires all the
> > words to be in the order they appear in the strings and doesn't seem
> > to match when words are ommited.  Try "eastern", "warbler" and
> > "eastern warbler" to see what I mean.  If this plugin matched on
> > "eastern warbler" or even on "warbler eastern" it would be pretty much
> > just what I needed functionality wise.  Additionally it doesn't need
> > any ajax support as the UL with all the addresses in it is already on
> > the page.  I just need to process that list, and use it as the basis
> > of the autocomplete.
>
> > On Nov 19, 10:16 am, Gordon <[EMAIL PROTECTED]> wrote:
> >> I currently have a brief to develop a system to help people find
> >> addresses in a list loaded into a web page.  At the moment they're
> >> displayed as a single long list (a ul), and the oser clicks the one he
> >> wants to use.  The problem is that in some cases this list can run to
> >> hundreds of entries.
>
> >> The first plan was to simply have a button to click on the page that
> >> invokes the browser's ctrl-f behaviour, but there doesn't seem to be a
> >> sensible cross-browser way to do it.
>
> >> My second idea was to use jQuery and one of the autocomplete plugins,
> >> convert the list into the data the autocomplete plugin needs to
> >> operate on and suggest addresses as users type into the field.  This
> >> seemed a better approach but then I hit a problem that the
> >> autocomplete plugins that I've found so far all seem to search on
> >> exact phrases, which is not going to be very useful.  Addresses in the
> >> list are in the format , ,  so a
> >> user would have to start by entering the name of the recipient
> >> followed by the address and post code for the autocomplete to work.
> >> If the user was to start with a postcode or street address, as most
> >> users would probably consider sensible, then the autocomplete would
> >> return no results.
>
> >> What I really need is something that works in a similar manner to the
> >> autocomplete plugins I've found so far, but that doesn't care about
> >> the order of the words typed into the search box.  The only constraint
> >> should be that the strings being matched against contain all the words
> >> typed.
>
> >> For example, if an address is listed as "Mister Foobar, 123 Fake
> >> street, Quuxville, AS1 23D, then the autocomplete plugin would suggest
> >> that address if the user typed in "fake street as1", or "fake
> >> foobar".  Are there any autocumplete plugins that support doing this?
>
> --
> View this message in 
> context:http://www.nabble.com/Autosuggest-tf4835224s27240.html#a13842444
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: $.getJSON() problem

2007-11-19 Thread Jörn Zaefferer


Josh Nathanson schrieb:


Usually this means that your JSON data has an error in the formatting 
somewhere - perhaps a missing or extra comma.  If JSON data cannot be 
evaluated successfully, it fails silently.
Actually it triggers the global ajaxError event. Though unless you 
register a handler, it just fails silently: 
http://docs.jquery.com/Ajax/ajaxError#callback


Jörn


[jQuery] Re: Autosuggest

2007-11-19 Thread Jörn Zaefferer


Gordon schrieb:

For example, if an address is listed as "Mister Foobar, 123 Fake
street, Quuxville, AS1 23D, then the autocomplete plugin would suggest
that address if the user typed in "fake street as1", or "fake
foobar".  Are there any autocumplete plugins that support doing this?
  
I'll try to add a demo that does just that, based on a UL. I'm planning 
one change anyway that should enable support for using the UL.


Though the matching is another story. You want it to match any word in 
any order, with at least one word matched, right? Sounds like you'd need 
to provide your own matcher then.


Jörn



[jQuery] Re: New Plugin: jQuery Fx Queues

2007-11-19 Thread Flesler

I like it :) , the use of jQuery FX is, at least for me.. a bit
esoteric.
IMO, you should shorten the name of methods a bit, to make more jQuery-
ish.
For example: jQuery.fxQueues.clearQueue, I'd remove the 'Queue' part,
as it is obvious what are you clearing.
Very nice.

Ariel Flesler


On 19 nov, 15:56, "Luciano G. Panaro" <[EMAIL PROTECTED]>
wrote:
> (Sorry if I'm double posting)
>
> Hi,
>
> I created a new plugin that reimplements the queueing system, allowing
> the possibility of having global queues for jquery's animations
> (similar to what Scriptaculous has).
>
> http://jquery.com/plugins/project/fxqueueshttp://www.decodeuri.com/jqueryfxqueues/
>
> New arguments added to animate:
>
> * queue: (string) Name of the queue. If it doesn't exist, it creates
> the new queue.
> * scope: (string) Name of the scope.
> * queuePosition: ("front"|"end") Queue position where animation (or
> scope, if passed) is queued.
> * wait: (int) Milliseconds to wait before starting the animation.
>
> Queues:
> A queue is an array that may contain animations to perform and/or
> scopes.
>
> Scopes:
> What happens if you needed to enqueue not a single effect, but a group
> of effects to be played altogether? This is where scopes come to save
> the day. A scope is an object that can be contained in a queue. It is
> an array that contains only animations to perform. When a scope is
> dequeued, it automatically plays all the animations it contains.
>
> This is just a brief introduction, but I hope you get it and find it
> useful. Any comments, bugs, enhancements, ideas, whatever are more
> than welcomed :).
>
> Thanks!


[jQuery] Re: how to use :empty selector

2007-11-19 Thread Jörn Zaefferer


Brandon Aaron schrieb:

You can use the filter method to select what you need. It would look
something like this:

$(document).ready(function() {
  $('input[type=text]').filter(function() {
return !!$(this).val();
  });
});
  
If you are using the validation plugin 
(http://bassistance.de/jquery-plugins/jquery-plugin-validation/), you 
can leverage the :blank selector - it filters all elements with no value 
or only whitespace.


This is the implementation (also ":filled" and ":unchecked":

jQuery.extend(jQuery.expr[":"], {
   blank: "!jQuery.trim(a.value)",
   filled: "!!jQuery.trim(a.value)",
   unchecked: "!a.checked"
});

Jörn


[jQuery] Re: Superfish v1.3.1 - ie third level menu clipping display problem

2007-11-19 Thread Jared

Hi Joel,

Well, I have found the source of the problem (which isn't superfish
per se). If I un-include the jQuery plugin "interface," the entire
menu works as it should.

Here's a link to the problem in action:

http://web3.unt.edu/riskman/Test/testcases/superfishnav/UNT_RMS-EMP-application.html

If you comment out the script element for interface.js, the problem
goes away in IE. The interface plugin is interfering somehow, I just
have not figured out how yet...

Thanks!
jd

On Nov 17, 12:38 am, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Hi Jared,
>
> I have not been able to reproduce this problem at all so it's hard to
> give any decent advice. The thread you linked to shows that Noobert's
> problem was resolved and his issue turned out to be other CSS on the
> page interfering with the menu.
>
> Quote from that thread:
> "Aha! I found the problem. It has nothing to do with your excellent plugin.
> There was a z-index issue with some of the absolutely positioned elements on
> the page. My mistake."
>
> If this was a Superfish bug then I would think that the vertical 
> example:http://users.tpg.com.au/j_birch/plugins/superfish/vertical-example/
> ...would suffer from it as there are four levels of menu there, but it
> works perfectly for me in IE6 and IE7. Do you have a link we could
> look at so we can investigate further and get to the bottom of the
> matter in your case?
>
> Joel Birch.


[jQuery] Re: Image replacement

2007-11-19 Thread yetanother

Sorry for the double post, didn't see my original one when I returned
from lunch, anyway, this message has more details.

Thanks,

Wil

On Nov 19, 12:38 pm, "Wil Everts" <[EMAIL PROTECTED]> wrote:
> I have an accordion-like setup for several divs to contract and expand when
> the header text is clicked on... On the line with the headers I have an
> arrow image which I would like to swap from up to down on show/hide. Can
> anyone provide some pointers?
>
> jquery:
>
> $(document).ready(function() {
>   $('div.acc> div').hide();
>   $('div.acc> h1').click(function() {
>
> var $nextDiv = $(this).next();
> var $visibleSiblings = $nextDiv.siblings('div:visible');
>
> if ($visibleSiblings.length ) {
>   $visibleSiblings.slideUp('slow', function() {
> $nextDiv.slideToggle('slow');
>   });
> } else {
>$nextDiv.slideToggle('slow');
> }
>   });
> });
>
> html:
>
>   
>
> Option 1    />
> Hidden text
>
> Option 2    />
> Hidden text
>
> Option 3    />
> Hidden text
>
>   
>
> Thanks,
>
> Wil


[jQuery] Re: WAI-ARIA support in jQuery?

2007-11-19 Thread Benjamin Sterling
Peter,
Although I have made my accessible to the aria standards completely yet, I
have a working framework that does pass 508 compliance and works real well
with JAWS over at http://airplume.informationexperts.com/.  There are a few
more things we need to implement to make the site better, things like
shortcut keys, and adding better focus events.

My set up is forever evolving, so what I have may not be the best, but it is
something I am working on.

On 11/19/07, Pete <[EMAIL PROTECTED]> wrote:
>
>
> Hi!
>
> Is anyone working on implementing the appropriate WAI-ARIA roles,
> states and properties [1] where relevant in jQuery?
>
> [1]: http://www.w3.org/TR/aria-roadmap/
>
> Regards,
>
> Peter Krantz
>



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


[jQuery] Image replacement

2007-11-19 Thread Wil Everts
I have an accordion-like setup for several divs to contract and expand when
the header text is clicked on... On the line with the headers I have an
arrow image which I would like to swap from up to down on show/hide. Can
anyone provide some pointers?

jquery:

$(document).ready(function() {
  $('div.acc> div').hide();
  $('div.acc> h1').click(function() {

var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div:visible');

if ($visibleSiblings.length ) {
  $visibleSiblings.slideUp('slow', function() {
$nextDiv.slideToggle('slow');
  });
} else {
   $nextDiv.slideToggle('slow');
}
  });
});


html:

  

Option 1   
Hidden text

Option 2   
Hidden text

Option 3   
Hidden text

  

Thanks,

Wil


[jQuery] Ajax xhtml incompatability?

2007-11-19 Thread Sarah (skatc)

I'm trying to get a simple ajax load going, like the example on this
page: http://docs.jquery.com/Ajax/load#urldatacallback.  My source
page is this xhtml file:




  
  test


  HELLO WORLD



When I try $('#destination').load('/test.xhtml? #content'); nothing
happens.  If I remove the  tag from test.xhtml, it works
perfectly.  But then test.xhtml it is no longer XHTML, it is XML, and
I must be able to view test.xhtml as an independant XHTML file.

Is jQuery incompatible with XHTML, or am I doing something else
wrong?  Any debugging steps would be appreciated.  Thank you.


[jQuery] Re: Performing actions at specific times of day, or at random?

2007-11-19 Thread zarino

That's excellent Ariel! Thank you very much. I'll try it out asap. :-D

Zarino



On Nov 17, 7:26 pm, Flesler <[EMAIL PROTECTED]> wrote:
> I don't think there's a plugin like that, but you definitely don't
> need jQuery to get the hour of the day and check for a range.
>
> var hour = new Date().getHours();
> var id = hour < 12 ? 'morning'
>: hour < 13 ? 'noon'
>: hour < 19 ? 'afternoon'
>: 'night';
>
> document.getElementById('stylesheet-'+id).disabled = false;
>
> That is just a simple example of how to do that, that works if you add
> 4 css, with the attribute disabled="disabled" and you only enable the
> one you want. You can add this right after the stylesheets, no need
> for document.ready, so the style will be applied earlier.
>
> The other option, is to use document.write, instead of
> document.getElementById you write:
> document.write(' src="stylesheet-'+id+'.css" \/>).
> or do the same, using DOM methods.
>
> You can find info about Date's methods 
> here:http://www.w3schools.com/jsref/jsref_obj_date.asp
>
> with random:
>   var ids = [ 'one', 'two', 'three' ];
>   var index = Math.round( Math.random()*10 ) % 3;
>   var id = ids[ index ]
>
> Ariel Flesler
>
> On Nov 16, 1:05 pm, zarino <[EMAIL PROTECTED]> wrote:
>
> > Hi there!
>
> > I'd like to load a different css stylesheet depending on the time of
> > day. If it's 6am-12noon, it'll be one sheet. If it's 12noon-6pm it'll
> > be another. And 6pm-6am, it'll be a third.
>
> > I'm sure there must be an easy way of getting jQuery to take the
> > browser's time and date, check which time range it falls within, and
> > summon up the correct stylesheet (or simply add a class to the body
> > tag, to which I'll hook css rules).
>
> > Similarly, how would I get it to choose a stylesheet at random, from
> > the list of three possibilities?
>
> > Many thanks,
> > Zarino Zappia


[jQuery] Re: IE7 Tabs are invisible

2007-11-19 Thread Moonwalker

Hi Klaus,

First thank you very much for your great work.

I think I did just what you said. I mixed up a lot of things, that's
why I get a lot of troubles. The problem I had was solved when I
downloaded the Dark CSS style I found here:
http://dev.jquery.com/view/trunk/themes/dark/dark.tabs.css

Since then I don't have any trouble with IE6/IE7. It's just because I
didn't know where to find and download them. On the jquery website you
can only download the JS files. (Or I am blind and can't find the
themes)

I just visited the link you provided. That's where I downloaded the IE
specific CSS file.

Is there any place where I can download all the last packages? I don't
mean just the JS files, but also the themes, CSS and UI.

Thank you again for your help!

moonwalker


[jQuery] Re: $(document).scroll() not functioning in IE?

2007-11-19 Thread Paul Irish

btw- found the solution.
this should be $(window).scroll( fn )
window, not document.

Paul Irish wrote:
> (scroll to the bottom to test)
> also safari seems to get halfway in.. so that's an improvement.
>
> On Oct 2, 12:52 pm, Paul Irish <[EMAIL PROTECTED]> wrote:
> > I added some fun infinite scroll functionality to my employer's 
> > blog.http://molecularvoices.molecular.com/
> > All of it is based on a $(document).scroll() event that doesn't seem
> > to fire in IE6 or 7.  My alert() debugging shows that IE won't enter
> > into the function attached to the scroll event..
> > You can test on the above link.
> > Any ideas?


[jQuery] WAI-ARIA support in jQuery?

2007-11-19 Thread Pete

Hi!

Is anyone working on implementing the appropriate WAI-ARIA roles,
states and properties [1] where relevant in jQuery?

[1]: http://www.w3.org/TR/aria-roadmap/

Regards,

Peter Krantz


[jQuery] New Plugin: jQuery Fx Queues

2007-11-19 Thread Luciano G. Panaro

(Sorry if I'm double posting)

Hi,

I created a new plugin that reimplements the queueing system, allowing
the possibility of having global queues for jquery's animations
(similar to what Scriptaculous has).

http://jquery.com/plugins/project/fxqueues
http://www.decodeuri.com/jqueryfxqueues/

New arguments added to animate:

* queue: (string) Name of the queue. If it doesn't exist, it creates
the new queue.
* scope: (string) Name of the scope.
* queuePosition: ("front"|"end") Queue position where animation (or
scope, if passed) is queued.
* wait: (int) Milliseconds to wait before starting the animation.

Queues:
A queue is an array that may contain animations to perform and/or
scopes.

Scopes:
What happens if you needed to enqueue not a single effect, but a group
of effects to be played altogether? This is where scopes come to save
the day. A scope is an object that can be contained in a queue. It is
an array that contains only animations to perform. When a scope is
dequeued, it automatically plays all the animations it contains.

This is just a brief introduction, but I hope you get it and find it
useful. Any comments, bugs, enhancements, ideas, whatever are more
than welcomed :).

Thanks!


[jQuery] Re: (this) question

2007-11-19 Thread milkshake

Thanks Mike, that works great.

(this) is a thing of strange beauty ;)

So if I follow right, (this) (or any variable assigned inside a
function) is only available to that function?

And why $(this) instead of (this)?

Just wondering out loud...

Thanks again.



On Nov 19, 6:14 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> Every function call has its own "this" - that's just the way JavaScript
> works.
>
> To fix it, assign "this" - or better yet in your case, "$(this)" - into a
> variable outside the click function. We can also avoid the repeated calls to
> the same selector by using another variable:
>
> $('.wallpaper').each(function(){
> var $wallpaper = $(this);
> var $anim = $wallpaper.find('.images > .anim').hide();
>
> $wallpaper.find('.buttons > .anim').click(function(event){
> $('p').toggleClass( 'rainbows' );
> $wallpaper.find('p').toggleClass('fraggle');
> // $anim.show();
> // $wallpaper.find('.images > .static').hide();
> return false;
> })
>
> });
>
> -Mike
>
> > From: jquery-en@googlegroups.com
> > [mailto:[EMAIL PROTECTED] On Behalf Of milkshake
> > Sent: Monday, November 19, 2007 8:03 AM
> > To: jQuery (English)
> > Subject: [jQuery] (this) question
>
> > Hello, a beginners question:
>
> > */ JS
> > - */
>
> > $('.wallpaper').each(function(){
>
> >$(this).find('.images > .anim').hide();
>
> >$(this).find('.buttons > .anim').click(function(event){
> >$('p').toggleClass( 'rainbows' );
> >$(this).find('p').toggleClass('fraggle');
> >// $(this).find('.images > .anim').show();
> >// $(this).find('.images > .static').hide();
> >return false;
> >})
> > });
>
> > */ HTML
> > - */
>
> > 
> >
> >
> >
> >Static
> >Animated
> >
> > 
>
> > It seems I'm not able to pass the (this) keyword on to the
> > click/event function.
>
> > $('p').toggleClass( 'rainbows' ); // works
> > $(this).find('p').toggleClass('fraggle'); // not working
>
> > Each ".wallpaper" div should be sandboxed so that the
> > methods(?) only work inside that particular div instance.
> > Is there a better way to do this?
> > (the commented out .show + .hide are what I'm really after,
> > just using toggleClass for testing).
>
> > Thanks in advance :)


[jQuery] Re: Tab that links to another page

2007-11-19 Thread Owen Leonard

Thanks very much, that works beautifully.

  -- Owen


[jQuery] Accordion Header Image Replacement

2007-11-19 Thread yetanother

I have a simple accordion set up with the code below, but I want to be
able to change the header's background image from an up arrow state to
down arrow state and back automatically. Any ideas on where to go from
here?

$(document).ready(function() {
$('div.acc> div').hide();
  $('div.acc> h1').click(function() {

var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div:visible');

if ($visibleSiblings.length ) {
  $visibleSiblings.slideUp('slow', function() {
$nextDiv.slideToggle('slow');
  });
} else {
   $nextDiv.slideToggle('slow');
}
  });
});

-



Test
Hidden Text

Test
Hidden Text




[jQuery] New plugin: Jquery Fx Queues

2007-11-19 Thread [EMAIL PROTECTED]

Hi,

Since I needed a global queueing system for jquery's effects for a
project, I decided to develop it myself.

The result: http://jquery.com/plugins/project/fxqueues (http://
www.decodeuri.com/jqueryfxqueues/)

As the introduction explains:

"The jQuery Fx Queues plugin is a global queueing (duh!) system that
allows to enqueue effects of different elements, but also keeps
jQuery's default
queueing option.
A wait argument was also added to be able to
specify the time to wait before starting the animation."

The plugin introduces two concepts: queues and scopes.

Queues:
A queue is an array that may contain animations to perform and/or
scopes.

Scopes:
What happens if you needed to enqueue not a single effect, but a group
of effects
to be played altogether? This is where scopes come to save the day.
A scope is an object that can be contained in a queue. It is an array
that contains
only animations to perform. When a scope is dequeued, it automatically
plays all the animations it contains.

To understand better these two ideas, I've made a simple example page
(http://www.decodeuri.com/fxqueues/fxqueues.html) which should (and
please let me know if it doesn't) be self explanatory about the uses
of the plugin.

I would appreciate feedback of any kind (bugs, comments, enhancements,
things to document, etc.). Hope you find it useful!


[jQuery] Re: I need use bgIframe plugin with ClockPick puglin

2007-11-19 Thread [EMAIL PROTECTED]

Works great!!! Many thanks for your time!!!

On 19 nov, 14:34, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Andres and anyone else using ClockPick,
>
> I've released a new version, 1.2.  It adds support for the bgIframe plugin
> by setting a configuration variable when calling ClockPick.  All the details
> plus downloads for the new version can be found here:
>
> http://www.oakcitygraphics.com/jquery/clockpick/trunk/ClockPick.cfm
>
> Let me know if you encounter any issues.
>
> -- Josh
>
> - Original Message -
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Friday, November 16, 2007 11:49 AM
> Subject: [jQuery] Re: I need use bgIframe plugin with ClockPick puglin
>
> Hhi Josh,
>
> I´m calling in this way:
>
> 
>
> $(document).ready(function() {
> opts = {};
> opts.starthour = 0;
> opts.endhour = 23;
> opts.military = true;
> opts.valuefield = "ftpHora";
> $("#clockpick2").clockpick( opts, function() {$("div[class^=CP],
> div[id^=CP]").bgIframe();});
> });
> 
>
> The clockPick works ok, but the callback for the bgIframe doesn´t work
> and I don´t really know how to do it.
> If we can make this work I think it would be a good idea to put it in
> the ClockPicks docs page.
>
> andres
>
> On 16 nov, 14:55, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> > Hi Andres,
>
> > I don't see where you are calling ClockPick?
>
> > Also, you will probably need to apply bgIframe to ALL the classes of
> > ClockPick, or else they will appear under the select menu.  They all start
> > with "CP", so probably the easiest way to do that would be like so:
>
> > $("div[class^=CP], div[id^=CP]").bgIframe();
>
> > Finally, since the divs are not added to the DOM until the plugin is
> > executed, you may have to pass the bgIframe call as a callback to the
> > ClockPick call, like so:
>
> > $("#inputelement").clockpick( options,  function() {
> >$("div[class^=CP], div[id^=CP]").bgIframe();
> > });
>
> > Let me know if that works for you, and I will add it to the ClockPick docs
> > page so others can use the information in the future.  Or, if it's still
> > not
> > working please mention exactly what is not working.
>
> > -- Josh
>
> > - Original Message -
> > From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > To: "jQuery (English)" 
> > Sent: Friday, November 16, 2007 7:16 AM
> > Subject: [jQuery] Re: I need use bgIframe plugin with ClockPick puglin
>
> > hi Josh, thanks for your reply. I try to do that, but it didn´t work.
> > Here is how I put the code in the head:
>
> >  > script>
> >