Raty stars rating disappears on refresh with jquery mobile.
The Code:
Layout:
<body>
<div data-role="page">
<div data-role="header" data-position="fixed" style="height:12px"></div>
<div class="ui-content" role="main">@RenderBody()</div>
<div data-role="footer" data-position="fixed" style="text-align:center;"></div>
</div>
</body>
The votation page:
@{
Layout = "~/Views/Shared/_Layout.Mobile.cshtml";
}
<script>
$('#star').raty({
number: 5,
path: '/Images',
size: 24,
width: 150,
click: function (score)
{
$("#Valor").val(score);
}
});
</script>
@using (Html.BeginForm("AvaliarOrador", "Mobile", FormMethod.Post, new { @id = "frmAvaliarOrador" }))
{
<input type="hidden" id="Valor" name="Valor" />
<div id="star" style="padding-top: 20px; padding-bottom: 10px; margin-left: auto; margin-right: auto; cursor: pointer; width: 170px"></div>
}
If I refresh the page, the stars disappears and I have to go back to the homepage again, refresh it and start again.