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
w').fadeIn('slow');
$('p.' + hash[this.className]).swapFade();
return false;
});
$('.three').hover(function() {
$('a.three').fadeOut('slow').fadeIn('slow');
$('p.' + hash[this.className]
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() {
ove'); }
> );
> )};
>
> On May 14, 3:47 pm, James wrote:
>> $(document).ready(function() {
>> $('li.a').hover(
>> function() { $(this).addClass('move'); },
>> function() { $(this).removeClass('move')
i.a').mouseLeave(function() {
$(this).removeClass('move');
)};
)};
Thanks for your time,
Calvin Stephens
.
Thank you for your time,
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
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
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() {
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
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!
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
> ___
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, "
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
14 matches
Mail list logo