j-FloatingBox
- Wsparcie - mody ciemne
Konfiguracja:
zindex {Number}standardowy indeks z dla formularzy (default:10)
Metody:
component.show(opt)pokazuje pudełkoopt.id {String}wymagane - identyfikator pudełkaopt.element {HTML Element}wymagane - element docelowy- Możesz użyć absolutnej pozycji:
opt.x {Number}opt.y {Number}
opt.offsetX {Number}wpływa na offset Xopt.offsetY {Number}wpływa na offset Yopt.align {String}alignleft(default),centerlubrightopt.position {String}aligntop(podstawowe),bottomopt.minwidth {Number}opt.maxwidth {Number}opt.mouseleave {String}jest linkem do metody, wykonuje się, gdy kursor myszy opuszcza pudełkofunction(e, close)}opt.autofocus {Boolean}próbuje skupić się na pierwszym wejściu / teksturzeopt.hide {String}- link do metodyfunction(box_element)opt.show {String}- link do metodyfunction(box_element)opt.autohide {Boolean}umożliwia ukrywanie pudełka po kliknięciu na niegoopt.delay {Number}- prosty opóźnienie w renderowaniu (default:0)opt.scrolltop {Boolean}odciąga pozycję górną z bieżącego offset Y (default:false)opt.url {String}opcjonalny, adres URL dla treściopt.path {String}zastąpi wszystkie frazy~PATH~w pobranym szablonieopt.ID {String}zastąpi wszystkie frazy~ID~w pobranym szablonie
component.hide()ukrywa ostatnią otwartą skrzynkęcomponent.hide([box_id])ukrywa konkretną skrzynkę i wszystkie jej pudełkacomponent.hide(true)ukrywa wszystkie pudełka
Pudełko
<div class="floatingbox" data-id="yourid" data-config="">
Your content
</div>Konfiguracja:
init {String}jest linkem do metody, wykonuje się, gdy pudełko jest inicjalizowane po raz pierwszyfunction(element)reload {String}- link do metodyfunction(element)hide {String}jest linkem do metody, wykonuje się, gdy pudełko będzie ukrywaćfunction(element)scope {String}- nazwa obsługi / wtyczkizindex {Number}jest indeksem z dla tej skrzynki
Użyj go z <ui-component name="floatingbox">Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu DEF.fallback (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.
<ui-component name="exec"></ui-component>
<ui-component name="floatingbox" config="zindex:10"></ui-component>
<!-- Form templates -->
<div class="floatingbox" data-id="1" style="width:200px">
<div class="padding">
<div>Box 1</div>
<br />
<br />
<br />
</div>
</div>
<div class="floatingbox" data-id="2" data-config="init:box2init">
<div class="padding">
<div>Box 2</div>
<br />
<br />
<br />
<span class="exec" data-exec="showbox" data-id="3" style="color:#2A6CEC;cursor:pointer;text-decoration:underline">Show box 3</span>
</div>
</div>
<div class="floatingbox" data-id="3">
<div class="padding">
Box 3
</div>
</div>
<!-- Executors -->
<div class="row">
<div class="col-xs-4">
<span class="exec" data-exec="showbox" data-id="1" style="color:#2A6CEC;cursor:pointer;text-decoration:underline" class="block">Show box 1</span>
</div>
<div class="col-xs-4">
<span class="exec" data-exec="showbox" data-id="2" style="color:#2A6CEC;cursor:pointer;text-decoration:underline" class="block">Show box 2</span>
</div>
<div class="col-xs-4">
<span class="exec" data-exec="showbox" data-id="3" style="color:#2A6CEC;cursor:pointer;text-decoration:underline" class="block">Show box 3</span>
</div>
</div>
<script>
function showbox(el) {
var opt = {};
opt.element = el;
opt.id = el.attrd('id');
SETTER('floatingbox/show', opt);
}
function box2init(el) {
console.log('Box 2 is initialized', el);
}
</script>