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...
-
This is a 5 step process: Install hudson.war in your download directory : ~/Downloads Create a hudson directory in your home folder : mk...
No comments:
Post a Comment