…
…
…
Nel tutorial jQuery di oggi vi mostreremo come aggiornare il tag SRC trasformando un percorso relativo in assoluto.
(function ($) { $(document).ready(function () { $('img').each(function (i, v) { var $el = $(this), s = $el.attr('src'), sRx = /[\/res\/images\/.*]+/igm; console.log(s); console.log(s.test(sRx)); if (s.test(sRx)) { console.log('match'); s = 'http://splash.abc.net.au' + s; …
…
Nel tutorial di oggi vi mostreremo come creare una funzione che permette di impostare l’altezza e la larghezza di un iFrame in base al suo contenuto.
$("#modalIFrame").bind('load', function () { var newheight, newwidth; newheight = this.contentWindow.document.body.scrollHeight; newwidth = this.contentWindow.document.body.scrollWidth; $(this).height(newheight); $(this).width(newwidth); } ); $("#modalIFrame").attr('src', url); …
…
…