Update separate count element with AJAX
1
2
3
4
5
(1)
- The first
span
is a container for the rating stars and holds the standard data-mjf_ajax_XYZ
attributes.
- The
<a>
tags trigger the AJAX call when clicked.
data-mjf_magic_ratings_state
determines if the bg_rating_off.png
or bg_rating_on.png
CSS background image will be shown. Valid values are on
and off
.
data-mjf_magic_ratings_value
is the value that will be sent to the server when clicked. It will be named magic_rating
.
- The
innerHTML
will be hidden from visitors.