[jQuery] Code evaluation

2009-09-05 Thread Calvin
I have some jquery code that does what I want it to do but I was wondering if I could get some input/ suggestions/ opinions on how it could be better. Thanks for your time! here is the code: jQuery.fn.swapFade = function() { if (this.is(':hidden')) { this.fadeIn('slow

[jQuery] Re: refactoring help/ suggestions?

2009-08-10 Thread Calvin
w').fadeIn('slow'); $('p.' + hash[this.className]).swapFade(); return false; }); $('.three').hover(function() { $('a.three').fadeOut('slow').fadeIn('slow'); $('p.' + hash[this.className]

[jQuery] refactoring help/ suggestions?

2009-08-09 Thread Calvin
Hi, I wrote this code for a simple "hide and show" effect and I am looking for any advice or examples of how I can refactor the code. I tried using a hash but it didn't work out right and I am thinking that maybe I should make a object method. here is the code: $(document).ready(function() {

[jQuery] Re: A better way of writing this code?

2009-05-14 Thread Calvin Stephens
ove'); } >     ); > )}; > > On May 14, 3:47 pm, James wrote: >> $(document).ready(function() { >>      $('li.a').hover( >>           function() { $(this).addClass('move'); }, >>           function() { $(this).removeClass('move')

[jQuery] A better way of writing this code?

2009-05-14 Thread Calvin
i.a').mouseLeave(function() { $(this).removeClass('move'); )}; )}; Thanks for your time, Calvin Stephens

[jQuery] refactoring code

2009-04-24 Thread Calvin
. Thank you for your time, Calvin

[jQuery] CMS book question

2009-04-18 Thread Calvin
Has anyone here used this book? : Drupal 6 JavaScript and jQuery I don't know much about using a CMS, but do see alot of call for them in job postings... is drupal pretty good or is there a better CMS to use/learn? Cheers, Calvin

[jQuery] Re: jQuery script simplification question

2009-04-17 Thread Calvin Stephens
Hi Richard, Thanks for taking time out of your schedule to help me learn how to write simplified code! Cheers, Calvin On Thu, Apr 16, 2009 at 9:47 PM, Richard D. Worth wrote: > You only need one document.ready, and there's a shorthand: > > $(function() { > >   $(&quo

[jQuery] jQuery script simplification question

2009-04-16 Thread Calvin
I'm having trouble simplifying my jQuery script... I tried but I am at beginner level with this stuff. Here is the jQuery script: $(document).ready(function() { ("li.one").click(function() { $("div.a").toggle("highlight", {}, 1000); }); }); $(document).ready(function() {

[jQuery] Re: Has anyone used these jQuery books?

2009-04-15 Thread Calvin Stephens
I think compatability is important Karl. Also, thanks for the heads up on the reference guide. Cheers, Calvin On Wed, Apr 15, 2009 at 2:32 PM, Karl Swedberg wrote: > As one of the authors of jQuery Reference Guide, I'd have to recommend that > you not buy it, especially if you a

[jQuery] Has anyone used these jQuery books?

2009-04-15 Thread Calvin
Hi everybody, Has anyone here read/ used these books: jQuery UI 1.6 by Dan Wellman jQuery Reference Guide by Chaffer & Swedberg I am wondering which one is better for learning how to make front-end interfaces for applications. p.s- Learning jQuery 1.3 is a awesome book!

[jQuery] Re: Simple HTML swap question

2009-04-11 Thread Calvin Stephens
Thanks for offering to help out more Karl! I was able to get it to work! Cheers, Calvin On Sat, Apr 11, 2009 at 5:16 PM, Karl Swedberg wrote: > Yeah, I thought that looked familiar. ;-) Glad you like the book. Let me > know if you need any more help with that. > --Karl > ___

[jQuery] Re: Simple HTML swap question

2009-04-11 Thread Calvin Stephens
the links. Your book is pretty good by the way! Thanks for your time, Calvin On Sat, Apr 11, 2009 at 4:39 PM, Karl Swedberg wrote: > Hi Calvin, > One way you can simplify things is to give each of those containers > (#letters-a, #letters-b, etc.) the same class -- for example, "

[jQuery] Simple HTML swap question

2009-04-11 Thread Calvin
I have a simple index page with 3 links(with separate ids) and a empty tag(with an id). I am able to get content to load into the empty div tags but I am also repeating jquery code to do so. I have limited experience creating variables and switch/case statements and I'm thinking that's the best w