0.8.5 • Published 9 years ago

jpub v0.8.5

Weekly downloads
2
License
-
Repository
github
Last release
9 years ago

jpub

A jQuery plugin to make a PopUpBox easier.

npm version

view at GitHub

notice:

  • not finished yet,just "can use".
  • I will not change the API as far as possibly.
  • Not support UC mobile browser !(╯‵□′)╯︵┻━┻

DEMO (More demo coming soon..)


Function List

idnamedescription
1$(Selecoter).jShow()the target PopUpBox has been in the html
2$.jCreateForm()create automatically generated PopUpBox

use

1、 $(Selecoter).jShow();

the target PopUpBox has been in the html

$(".jpub-div").jShow({
    'close_mode':2,
    'box_padding_top':'30px',
    'animate_in':1,
    'animate_out':1,
    'show_pre_func':test.abc,
    'show_pre_param':test.param,
    'show_after_func':function(){
            alert('show_after');
        },

});

Parameters

idnamedescriptiondefaultvaluerequire id
1isScroll-falsetrue/false-
2close_mode1-you can click the background div to hide2-you can't click the background and specify a html tag to hide11/2-
3animate_inanimate-in-direction:1:↓、2:←、3:↑、4:→31/2/3/4-
4animate_outanimate-out-direction:1:↑、2:→、3:↓、4:←00/1/2/3/4-
5ok_btnthe attribute name of the "ok" button.jpub-btn-ok'.btn_1'/'#btn_1'-
6cancel_btnthe attribute name of the "cancel" button.jpub-btn-cancel'.btn_2'/'#btn_2'-
7ok_functhe onclick function of the "ok" buttonfuncs.testFunc(an "alert" function)type of function5
8ok_func_paramthe parameter of ok_funcundefinedAny6
9show_pre_functhe function run before the div showundefinedobj.func/funcName()/function(){alert()}-
10show_after_functhe function run after the div showundefinedobj.func/funcName()/function(){alert()}-
11hide_pre_paramthe function run before the div hideundefinedobj.func/funcName()/function(){alert()}-
12hide_after_functhe function run after the div hideundefinedobj.func/funcName()/function(){alert()}-
13show_pre_paramthe parameter of show_pre_funcundefinedAny9
14show_after_paramthe parameter of show_after_funcundefinedAny10
15hide_pre_paramthe parameter of hide_pre_paramundefinedAny11
16hide_after_paramthe parameter of hide_after_funcundefinedAny12
17bgbackground divtruetrue/false-
18bg_colorbackground div color'rgba(0,0,0,0.5)''rgba(x,x,x,x)'-
19close_tagthe specified html tag to hideundefined'#demo'/'.example'/...2
20 box_padding_top the distance from the WINDOS's top'30%''20%'/'20px'/...-

2、 $.jCreateForm().jShow();(TODO:More Themes)

create automatically generated PopUpBox

$(function(){
    $.jCreateForm({
        'tag_id':'hahaha',
    });
});
$(".btn").click(){
    $("#hahaha").jShow();
}

Parameters

idnamedescriptiondefaultvaluerequire id
1tag_idthe PopUpBox's tag id you want namejpub_auto_form--
2parent_tagthe parent tag you want to append'body''#demo'/'.class:eq(x)'-
3head_textthe head text of the box'Notice'Any word-
4ok_textthe text of the "ok" button'Ok'Any word-
5cancel_textthe text of the "cancel" button'Cancel'Any word-
6contentthe Information you want to show in the PopUpBox'Information you want to show'Any Html tag-
0.8.5

9 years ago

0.8.4

9 years ago

0.8.2

10 years ago

0.8.1

10 years ago

0.8.0

10 years ago

0.7.3

10 years ago

0.7.2

10 years ago

0.7.0

10 years ago

0.6.3

10 years ago

0.6.2

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago