| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- if ($('.content').height() > 750) {
- $('#iframe-main', parent.document).css('height', $('.content').height() + 20)
- } else {
- $('#iframe-main', parent.document).css('height', '750px')
- }
- function addQuestion() {
- layer.open({
- type: 1,
- title: '我要提问',
- area: '600px',
- content: $('#addQuestion'),
- btn: ['发布', '取消'], //可以无限个按钮
- yes: function (index, layero) {
- alert(1)
- }
- , btn2: function (index, layero) {
- $('#addQuestionForm')[0].reset();
- $('#addQuestion').hide();
- },
- cancel: function (index, layero) {
- $('#addQuestionForm')[0].reset();
- $('#addQuestion').hide();
- }
- });
- }
- // 分页初始化
- layui.use('laypage', function () {
- var laypage = layui.laypage;
- laypage.render({
- elem: 'page' //注意,这里的 test1 是 ID,不用加 # 号
- , count: 1
- , layout: ['prev', 'page', 'next', 'skip']
- , jump: function (obj, first) {
- $.ajax({
- url: '',
- type: 'get',
- success: function (data) {
- console.log(obj.curr)
- }
- })
- if (!first) {
- $("#data_table tr:not(:first)").remove();
- }
- }
- });
- });
|