Permalink
Browse files

String id for caption and clear element params

  • Loading branch information...
1 parent 573f4d8 commit 13118a5a4b2b0b8c094cc410c8a4377dce50a427 @kartik-v committed May 29, 2014
Showing with 5 additions and 5 deletions.
  1. +3 −3 js/star-rating.js
  2. +2 −2 js/star-rating.min.js
View
@@ -1,6 +1,6 @@
/*!
* @copyright © Kartik Visweswaran, Krajee.com, 2014
- * @version 2.0.0
+ * @version 2.5.0
*
* A simple yet powerful JQuery star rating plugin that allows rendering
* fractional star ratings and supports Right to Left (RTL) input.
@@ -146,9 +146,9 @@
self.clearCaption = options.clearCaption;
self.clearCaptionClass = options.clearCaptionClass;
self.clearValue = options.clearValue;
- self.$clearElement = options.clearElement;
- self.$captionElement = options.captionElement;
self.$element.removeClass('form-control').addClass('form-control');
+ self.$clearElement = $(options.clearElement);
+ self.$captionElement = $(options.captionElement);
if (typeof self.$rating == 'undefined' && typeof self.$container == 'undefined') {
self.$rating = $(document.createElement("div")).html('<div class="rating-stars"></div>');
self.$container = $(document.createElement("div"));
View
Oops, something went wrong.

1 comment on commit 13118a5

@mchubby

From the docs:

captionElement

DOM element the container element selector for displaying the caption. Defaults to a div container with .caption class inside the rating control.

clearElement

DOM element the container element selector for displaying the clear button. Defaults to a div container with .clear-rating class inside the rating control.

The isEmpty() call in renderClear and renderCaption will always return true for the default $( options.clearElement ) i.e. $( null ).

Please sign in to comment.