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
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
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
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
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
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
$('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
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.
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
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
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
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
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
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)?
>
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
15 matches
Mail list logo