File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ To see this working please check http://www.tristanperry.com/lightweight-lightbo
88
99## Install Instructions
1010
11- - Ensure that JQuery (v1 .x) is referenced
11+ - Ensure that JQuery (v3 .x) is referenced
1212
1313- Include the CSS (from Styles.css) and the Javascript (from Scripts.js) in the page(s) you want the lightbox to appear in.
1414 - The JS can go anywhere on the page - in the ` <head> ` or within the ` <body> ` . The ` $(function() { ` notation is shorthand for ` $( document ).ready() `
Original file line number Diff line number Diff line change @@ -2,10 +2,9 @@ function showLbox(url) {
22 $ ( "#lboxinner" ) . html ( 'Loading image...' ) ;
33 $ ( "#lbox" ) . show ( 300 ) ;
44
5- $ ( '<img src="' + url + '">' ) . load ( function ( ) {
6- $ ( "#lboxinner" ) . html ( '' ) ;
7- $ ( this ) . appendTo ( '#lboxinner' ) ;
8- } ) ;
5+ var img = $ ( "<img>" ) ;
6+ img . attr ( "src" , url ) ;
7+ $ ( "#lboxinner" ) . html ( img ) ;
98}
109
1110function hideLbox ( ) {
You can’t perform that action at this time.
0 commit comments