Where is my wrong? I have a button in html
<a class="btn btn-warning btn-mini publish-btn" href="#" data-rowid="@computer.id" data-toggle="modal" data-target="#myModal">Outdated</a>
and my model
<fieldset style="text-align:center;vertical-align:middle;">
<input type="radio" name="options" id="option1" /> : Publish Now<br/>
<input type="radio" name="options" id="option2" /> : Schedule Publish<br/>
</fieldset>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="submitBtnPublishId" >OK</button> <button type="button" class="btn btn-primary" data-dismiss="modal" id="submitBtnSpublishId" >Cancel</button>
and my js
$(function(){
$/-("a.publish-btn").click(function(e) {
var obj = $(this);
e.preventDefault();
$('#submitBtnPublishId').click(clickOnPublish);
function clickOnPublish()
{}})})
is not working when click OK button. Why??
You have wrong $ sign correct it as follow
$(function(){
$("publish-btn").click(function(e) {
var obj = $(this);
e.preventDefault();
$('#submitBtnPublishId').click(clickOnPublish);
function clickOnPublish()
{}})})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.