udatinos/asset/udatinos.js

49 lines
1.4 KiB
JavaScript
Raw Normal View History

2021-04-04 12:59:48 +02:00
var $jq = jQuery.noConflict();
$jq( document ).ready(function() {
console.log( "ready!" );
var b = $jq("body");
b.css("margin-top", "0px");
b.css("margin-left", "0px");
b.css("margin-right", "0px");
b.css("margin-bottom", "0px");
$jq(".modal").css("width","auto");
$jq('input').each(function(){
var self = $jq(this),
label = self.next(),
label_text = label.text();
label.remove();
self.iCheck({
checkboxClass: 'icheckbox_line-purple',
radioClass: 'iradio_line-purple',
insert: '<div class="icheck_line-icon"></div>' + label_text
});
});
//fisso i bottoni ad una certa larghezza
$jq( "div[class^='icheckbox_line']" ).css( "max-width", "200px" );
// sposto i bottoni in alto a dx ma relativamente al loro container
$jq('ul').css({
position: "absolute",
marginLeft: 0, marginTop: 0,
top: 0, left: 0
});
//aggiungo l'on clicked alle checkbox
$jq('input').on('ifChecked', function(event){
2021-04-06 12:42:52 +02:00
//qui ci va un foreach suoi poi
$jq('body').append( $jq('<img id="poiz" src="asset/i_FF_24.png" style="position:absolute;left:588px;top:455px; display: block;visibility: visible;"/>') .click(function(){ // handle click
2021-04-06 10:13:03 +02:00
$jq("#poi_1").modal();
}) );
2021-04-04 12:59:48 +02:00
});
$jq('input').on('ifUnchecked', function(event){
2021-04-06 12:42:52 +02:00
//qui ci va un foreach suoi poi
2021-04-04 12:59:48 +02:00
$jq('#poiz').remove();
});
});