[jQuery] Re: jquery json

2009-05-31 Thread Chuck Harmston
jQuery actually has built-in methods for loading and parsing JSON. Check out the $.getJSON method, which is actually a wrapper for the $.ajax function with most parameters already handled for you. http://docs.jquery.com/Ajax/jQuery.getJSON http://docs.jquery.com/Ajax/jQuery.ajax Chuck Harmston

[jQuery] Re: show element if class matches current bod y id (Please help) « View previous topic :: View next topi c » Author

2009-04-18 Thread Chuck Harmston
Hi Matt, Give this a shot: $(document).ready( function(){ $( '#menu ul' ).hide(); $( '#menu li.' + $( 'body' ).attr( 'id' ) + ' ul' ).show(); }); Demo here: http://jsbin.com/ehape Chuck Harmston http://chuckharmston.com On Sat

[jQuery] Re: Function Problem

2009-04-12 Thread Chuck Harmston
d here: http://jsbin.com/udamo Chuck Harmston http://chuckharmston.com On Sun, Apr 12, 2009 at 12:49 PM, djn12313 wrote: > > New to jQuery and trying to port a simple Select-Box-Value-Hides/Shows- > a-Text-Box script from JS to jQuery. I'm sure this must be something > simple

[jQuery] Re: simple query does not work

2009-04-12 Thread Chuck Harmston
I'm not quite sure what you're trying to do here. The $.get() function is used to submit an HTTP GET request. See: http://docs.jquery.com/Ajax/jQuery.get Are you trying to return the first response? Try using $("div#photolinks img:first"). Chuck Harmston http://chuckharmst

[jQuery] Re: jQuery Cycle -- Thumbnail Paging

2009-04-11 Thread Chuck Harmston
Hi Amy, Do the thumbnails follow any naming convention? It wouldn't be terribly difficult to use a callback to replace the standard Cycle pager with thumbnails if we are easily able to determine the thumbnail URLs. Chuck Harmston http://chuckharmston.com On Fri, Apr 10, 2009 at 7:24 AM, am

[jQuery] Re: How to remove error messages from Validation Plugin

2009-04-11 Thread Chuck Harmston
I don't recommend this, as it will stop users from submitting the form without giving them a reason for it. Talk about a usability nightmare. However, if you insist on it, there is a simple enough solution: just use CSS to style the .error class: label.error{display:none} Chuck Harmston

[jQuery] Re: How to select :inp...@type=text] OR :inp...@type=password]

2009-04-09 Thread Chuck Harmston
$('input[type="text"],input[type="password"]') Chuck Harmston http://chuckharmston.com On Thursday, April 9, 2009, Nick Boutelier wrote: > > How do you use an OR statement in a selector function? For example... > > $(':inp...@type=text,passwor

[jQuery] Re: JSON , PHP, MySQL, and jQuery

2009-04-09 Thread Chuck Harmston
Alternatively, you can use jQuery's $.getJSON() function, which automatically parses the JSON data and returns if as a Javascript object. Chuck Harmston http://chuckharmston.com On Thursday, April 9, 2009, donb wrote: > >        $.get("includes/functions_inside.

[jQuery] Re: How do I access global variables for id's, etc.?

2009-04-07 Thread Chuck Harmston
Heh, duh. document.write(myGlobalVariable)”>xyz That's not best practice, though. You should use DOM scripting to ensure unobtrusive Javascript (see http://www.alistapart.com/articles/behavioralseparation). Chuck Harmston http://chuckharmston.com On Tue, Apr 7, 2009 at 12:09 PM, bria

[jQuery] Re: first child

2009-04-07 Thread Chuck Harmston
This will return the tag name of a container's first child: $('#container > *')[0].tagName; Hope it's useful! Chuck Harmston http://chuckharmston.com On Tue, Apr 7, 2009 at 11:37 AM, bart wrote: > > Hello all, > > Let's say I'd have a div#conten

[jQuery] Re: How do I access global variables for id's, etc.?

2009-04-07 Thread Chuck Harmston
well-versed in jQuery selector system, then there is likely a cleaner way to do it than using a placeholder ID. Hope this is useful! Chuck Harmston http://chuckharmston.com On Tue, Apr 7, 2009 at 11:53 AM, Rick Faircloth wrote: > I would like to be able to do something as simple as > > my

[jQuery] Re: Cycle plugin pager over image

2009-04-07 Thread Chuck Harmston
It seems to me that this code should have the pager positioned absolutely over the top left of the image. Do you have a live example that I could take a look at? P.S. It probably makes semantic sense to turn the images into an unordered list :) Chuck Harmston cpharms...@gmail.com Cell: (612) 961

[jQuery] Re: Cycle plugin pager over image

2009-04-07 Thread Chuck Harmston
ng, I can give you more detailed instructions. Hope this helps! Chuck Harmston http://chuckharmston.com On Tue, Apr 7, 2009 at 8:57 AM, martijn397 wrote: > > Hello everyone! > > After using the Cycle plugin for quite some time now i was wondering > if there is any way to get

[jQuery] Re: [validate] Make at least one input field required

2009-04-07 Thread Chuck Harmston
helps! Chuck Harmston http://chuckharmston.com On Tue, Apr 7, 2009 at 4:02 AM, Cpt. Archie wrote: > > html looks like: > > > > > i want people to fill in at least one of these fields > > how can this be done using the jquery (validation plugin)? >

[jQuery] Re: Debugging jQuery in Firebug

2009-04-07 Thread Chuck Harmston
many levels as you'd like. - - You can track Javascript performance by running console.profile() before the code you want to track, then console.profileEnd() afterward. Firebug will give detailed information on each method called between the Chuck Harmston http://chuckharmston.com