Question: function($) { $.fn.blackjack = function(options) { var o = $.extend({ dealerName: Dealer, playerName: Player, bet: 5 }, options); return this.each(function() { /* the code for
function($) {
$.fn.blackjack = function(options) {
var o = $.extend({
"dealerName": "Dealer",
"playerName": "Player",
"bet": 5
}, options);
return this.each(function() {
/* the code for the plugin goes here */
};
};
})(jQuery);
If the plugin is called with the following options, what are the resulting values?
$("#blackjack").blackjack({
playerName: "Mary",
bet: 10
});
| a. | dealerName is “Dealer”, playerName is “Player”, bet is 5. | |
| b. | dealerName is “Dealer”, playerName is “Player”, bet is 10. | |
| c. | dealerName is “Dealer”, playerName is “Mary”, bet is 10. | |
| d. | dealerName is “Dealer”, playerName is “Mary”, bet is 5. |
Step by Step Solution
There are 3 Steps involved in it
In the given jQuery plugin code a blackjack function is defined as a ... View full answer
Get step-by-step solutions from verified subject matter experts
