Я хочу переключить div с помощью функции переключения jQuery.jQuery toggle не работает на моей странице
Вот мой код:
$(document).ready(function() {
$("#removeSongButton").click(function() {
$("#radioButton1").toggle();
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div>
<asp:Button runat="server" ID="removeSongButton" Text="remove song" />
</div>
<div id="radioButton1">
<asp:RadioButtonList runat="server" ID="radioButton">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="2" Value="2"></asp:ListItem>
<asp:ListItem Text="3" Value="3"></asp:ListItem>
</asp:RadioButtonList >
</div>
, когда я нажимаю "removeSongButton" ДИВ тог ע ле и немедленно переключаться вниз. Я думаю, может быть, перезагрузка страницы.
Возможный дубликат [Jquery ПЕРЕКЛЮчЕНИЕ не работает] (http://stackoverflow.com/questions/3708086/jquery-toggle-not-working) –
не говорят осина, чтобы запустить его на сервере – charlietfl