My jquery/java skills are non-existant.... I need some quick help:
My boss wants to have a form where customers write a review and stars for discounts then hit submit; if they select more than 3 stars it takes them to a separate page than someone who submitted a review with less stars.
Is it possible to have a j query button that changes the link on the fly depending on stars chosen?
I'm using the j query Star-rating plugin:
<script type="text/javascript" src="../src/rating.js"></script>
<link rel="stylesheet" href="../src/rating.css" type="text/css" media="screen" title="Rating CSS">
<script type="text/javascript">
$(function(){
$('.container').rating();
});
</script>
</head>
<body>
<h1><a title="Full Documentation" href="http://irfandurmus.com/projects/jquery-star-rating-plugin/">jQuery Star Rating Plugin</a></h1>
<section class="container">
<input type="radio" name="example" class="rating" value="1" />
<input type="radio" name="example" class="rating" value="2" />
<input type="radio" name="example" class="rating" value="3" />
<input type="radio" name="example" class="rating" value="4" />
<input type="radio" name="example" class="rating" value="5" />
</section>
<script type="text/javascript">
if $('.container').rating(4,5) {
echo "<a href="eventual link> Click here to receive your discount code</a>" ;
}
else $('.container').rating(1,2,3) {
echo "<a href="eventual link>Click here to recieve your discount code</a>";
}
</script>