nashio / star-rating-svg

A star rating jQuery plugin that uses SVG for easier customization
http://nashio.github.io/star-rating-svg/demo
MIT License
355 stars 156 forks source link

Not working inside Bootstrap Tabs #18

Open RajuMenon opened 8 years ago

RajuMenon commented 8 years ago

Hi,

I have placed the star rating code inside Bootstrap Tabs.

In Chrome, the star icons only show empty stars, when I click on any tab then the stars rating plugin is initialized and works properly. In Safari, the stars show a black background on page load, again if I click on any tabs then the it renders properly.

I understand this is because it's placed inside tabs which are hidden initially and I have tried the following code but doesn't work. Please help.

$(document).on( 'shown.bs.tab', 'a[data-toggle=\'tab\']', function (e) { $(".product-rating-view").starRating({ starSize: 15, activeColor: 'red', readOnly: true, emptyColor: '#ffffff', starGradient: { start: '#ffbd00', end: '#ffbd00' } }); });

Thanks for creating this cool plugin.

nashio commented 8 years ago

Hello, any chance you could upload your code so I can give you a couple of options?