如何使用IDS加我的自定义按钮,对话框模态的jQuery对象 [英] How to add my custom buttons with ids to a dialog-modal jquery object
本文介绍了如何使用IDS加我的自定义按钮,对话框模态的jQuery对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想添加自定义按钮(带身份证,这样他们就可以被点击,并有一个动作发生),加入到我的对话框模式的对象。
I would like to add custom buttons (with ids, so they can be clicked and have an action happen), added to my dialog modal object.
我想那里是一些文字,然后让文字下面的按钮中的模态对话框。
I would like there to be some text, and then have the buttons below the text in the modal dialog box.
现在我有:
使用Javascript:
Javascript:
$("#dialog-modal").dialog({
autoOpen: false,
resizable: false,
draggable: false,
height: 250,
width: 500,
modal: true,
dialogCLass: 'main-dialog-class'
});
$("#dialog-modal").dialog("open");
var text = '';
text = "This is a test";
$('#dialog-modal').text(text);
HTML
<div id="dialog-modal" title="{{$artist->stage_name}} in {{Auth::user()->city}}!"></div>
我想添加一个按钮,看起来像:
I would like to add a button that looks like:
<a class="facebook-button" id="facebook" style="color: white; font:14px / 14px 'DINMedium','Helvetica Neue',Helvetica,Arial,sans-serif;">Share on Facebook</a>
感谢您的帮助。
推荐答案
使用的.html()
来添加HTML内容像按钮或标签等来的div
use .html()
to add html contents like button or a tags etc to div
您可以使用您的标记是这样的: -
you can use to you a tag like this :-
$('#dialog-modal').html('<a class="facebook-button" id="facebook" style="color: white; font:14px / 14px 'DINMedium','Helvetica Neue',Helvetica,Arial,sans-serif;">Share on Facebook</a>');
这篇关于如何使用IDS加我的自定义按钮,对话框模态的jQuery对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文