Which one of the following will break the chain and Why?
A-
$(…)
.html('Breaks chain')
.addClass('chainbreaker')
B-
$(…)
.html()
.addClass('chainbreaker')
Solution:
In A, .html('Breaks chain') behaves like a setter and returns object, on which .addClass(…) adds the given class. But in B, .html() behaves like a getter and returns a string, on which .addClass(…) methods fails to perform and gives runtime error.
Subscribe to:
Post Comments (Atom)
Scheduling Repeating Local Notifications using Alarm Manager
Learn about Scheduling Repeating Local Notifications using Alarm Manager in this post .
-
Couple of days ago, I started using Google's code projects for Git as well. It required me to setup and use .netrc file. Here are steps...
-
Normal structure of build.gradle for an Android library looks like this: apply plugin : 'com.android.library' android { comp...
-
I've been struggling to get this working for about 2 days now. I was able to POST a request directly from sockets, but it took me a whi...
No comments:
Post a Comment