View w-global-tools.js
/** | |
In example make all images of website content (maybe insterted trough editor) | |
openable trough gallery | |
[this work with Blueimp Gallery https://github.com/blueimp/Gallery] | |
*/ | |
$(".auto-gallery-content").each(function(){ | |
var data_gallery = $(this).data("autoGallery") ? $(this).data("autoGallery") : "gallery"; | |
$("img", $(this)).each(function () { | |
if (!$(this).hasClass('no-auto-gallery')) { |
View bootstrap4-media-breakpoints.css
/** | |
* Bootstrap 4 all media queries #wMQ | |
* https://getbootstrap.com/docs/4.5/layout/overview/ | |
* up > sm, md, lg, xl | |
* down < sm, md, lg | |
* only = xs, sm, lg, xl | |
* between <> sm-lg, sm-xl, md-xl | |
*/ |
View instagram_api.php
<?php | |
// yo can follow this guide to http://www.benrlodge.com/blog/post/how-to-generate-an-instagram-access-token# | |
#1 first you need to create a Client in Instgram Developer Dashboard | |
// https://www.instagram.com/developer/clients/manage/ | |
#2 after you need to retrive a oAuth code for after get access_token | |
// https://www.instagram.com/developer/authentication/ | |
// change the params with your one and open link in browser |
View on_before_unload.js
// Message to be displayed on unload | |
var message = $('#jtrnslt #leavemess').text(), submitting = false; | |
// On Form submition set submitting to true for not fire onbeforeunload | |
$(document).on("submit", "form", function(event){ | |
submitting = true; | |
}); | |
// Window onbeforeunload fired when leave page but not if it a form submition or element with .noBeforeUnload class | |
window.onbeforeunload = function (e) { | |
e = e || window.event; | |
// Determine if you want to allow unload |
View withAlert.js
/** | |
* withAlert() | |
* | |
* @dependencies [css: bootstrap(.alert), withstyle(.withAlert), jquery] | |
* | |
* @param string message | |
* @param string type warning|success|danger|primary|secondary|info | |
* @param object options {autohide: true/false, hidetime: 6000, placement: top|bottom} | |
*/ | |
function withAlert(message, type, options) { |
View w-whatsapp.js
/** | |
* Replace mobile URL of WhatsApp with Desktop | |
* The mobile first strategy is used cause most people decide to not show WhatsApp on Desktop but only on mobile where it is very useful | |
* | |
* @dependencies [ core/w-ismobile.js ] | |
*/ | |
if(withOptions.whatsappWeb && !jQuery.browser.mobile && $(".whatsapp-weburl").length > 0){ | |
clog('WhatsApp Enabled and Present'); | |
clog($(".whatsapp-weburl")); |
View AJS-jQ_showhide.html
<!-- AngularJS ng-show and ng-click --> | |
<div class="checkbox"> | |
<label ng-click="show = !show"> | |
<input type="radio" name="cat_id" value="1"> | |
<strong>Residenziale</strong> Immobili in vendita oppure in affitto<br> | |
</label> | |
<span ng-show="show"> | |
<label class="checkbox-inline"> | |
<input type="radio" value="A" name="res_sell_type"> |
View merge_options.php
<?php | |
/* | |
* spesso abbiamo bisogno di parametri default obbligatori | |
* ma che possono essere sovrascritti con quelli custom passati alla funzione ad ogni chiamata | |
* ... la suluzione in 4 righe e' questa | |
* --- | |
* [EN] often we need a mandatory options parameters that can be overriden by custom params passed each time | |
* the solution is here in 4 rows of code | |
*/ |
View am-bs.css
/* OVERWRITED */ | |
.modal-footer {margin-top:0px;} | |
.center-block { | |
float:none; | |
} | |
/* Tables * / | |
.table-striped > thead > tr { | |
background-color: #D196A4; |
NewerOlder