0

Hi everyone,

I want to get started on learning jQuery Framework.I got the basics of the JavaScript at this stage. But now, I don't know where to start with jQuery.

Other than the jQuery.com website. Would you suggest easy-to-follow introductions to jQuery?
Is there a big difference between jQuery and jQuery for mobile? Would JQM work for desktop websites as well?

Cheers,

8
Contributors
15
Replies
16
Views
4 Years
Discussion Span
Last Post by iamthwee
Featured Replies
  • 1

    @rotten69 - you're not alone..that doesnt make much sense to me as well. I am in the process of learning some more advanced techniques in JavaScript and some of the libraries out there including jQuery. I'd suggest a good book..the sites mentioned only provide you only a basic understanding in … Read More

0

Here use this website for jQuery tourtials: Click Here. jQuery is a very easy library to learn, it will probably take you 2-3 days.

0

@zoreli.. I signed up for this course but I didn't have the time to sit down and follow the tutorials. Thanks for it anyway. I will see that as an encourgement towards taking the course with tutsplus.

Edited by rotten69

0

@godzab... it takes Two to Three days to get the hang of it. That would be awesome, man.

What confuses me is that people assign a function to a variable like the code below
var hug = function(male, female){return male + female};

that is what you call a closure function. What is the advantage of doing that?

0

The advantage of closure is to capture variable scope. Below is a use of closure in order to pass keyboard event which is the only way to pass in or the argument value is wrong. This is the prototype style I do by the way.

// The acceptKeyBoard() function is the AKlass member function which is
// customize & defined inside the class itself.
AKlass.prototype.attachMyKeyboardEvent = function() {
  var self = this
  if (document.addEventListener) {  // anything but IE
    document.addEventListener("keydown", function(e) { self.acceptKeyboard(e) }, false);
  }
  else { // IE
    document.attachEvent("onkeydown", function(e) { self.acceptKeyboard(e) })
  }
}  // attachMyKeyboardEvent
0

Hmm.. OK. How about this... Do you understand static variable in Java? When you create a closure in JavaScript, variable inside the function scope could be seen as static even though it is not exactly the same. In other words, when a function is call, normally its local variable will be removed from the memory once the function is done. Closure keeps its value as it is. Also, if you pass variables to a closure in the way I show you in my example, the variable will function similar to static variable. Hope this help you understand a bit more.

1

@rotten69 - you're not alone..that doesnt make much sense to me as well. I am in the process of learning some more advanced techniques in JavaScript and some of the libraries out there including jQuery.

I'd suggest a good book..the sites mentioned only provide you only a basic understanding in 2-3 days.

Votes + Comments
Well, that is life. Problems are shared. Hehe
0

As far as beginning JQuery goes, you definitely need to download and link to (or just use an online host like Google) it every time you intend to pull from the JQuery library. That's sort of a 101 on the 101 if you understand.

0

That's sort of a 101 on the 101 if you understand

I got no idea what you're talking about, mate.

0

Do you understand static variable in Java?

I defintely do. Static type makes the calling of a method or a variable easier. I still don't understand in JavaScript though. When would I ever have to use it?

0

Err... I may confuse you more and more... How to explain this... Many people use the closure when they do not really gain any benefit from it, so it confuses those that don't know what it is. Anyway, this forum should at least give you a much better idea... I failed to explain it to you... :(

0

I failed to explain it to you

hahaa.. Man, don't panic. it is all good. At least, you've tried explaining to me. Even though I didn't get it for the first time, someone may do.

Thanks for the effort.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.