forked from field2/shrinkwrap_images
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
.shrink { | ||
display: inline-block; | ||
position: relative; | ||
} | ||
.clear { | ||
width: 100%; | ||
display: block; | ||
height: 100%; | ||
position:absolute; | ||
transform: translateY(-100%); | ||
} | ||
.eol_si_shrink { | ||
display: inline-block; | ||
position: relative; | ||
} | ||
|
||
.eol_si_clear { | ||
display: block; | ||
height: 100%; | ||
position: absolute; | ||
transform: translateY(-100%); | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
// Get directory path of plugin directory | ||
var plugindir = php_vars.plugindir; | ||
var gifpath = '<img src="' + plugindir + '" class="clear">'; | ||
var swimg = function() { | ||
jQuery("img").wrap('<div class="shrink"></div>'); | ||
jQuery("img").after(gifpath); | ||
}; | ||
|
||
// | ||
var gifpath = '<img src="' + plugindir + '" class="eol_si_clear">'; | ||
|
||
// Use jQuery to wrap each img tag in the shrinkwrap div | ||
var eol_si_img = function() { | ||
jQuery("img").wrap('<div class="eol_si_shrink"></div><!-- /.eol_si_shrink -->'); | ||
jQuery("img").after(gifpath); | ||
}; | ||
|
||
// Run shrinkwrap on doc load | ||
jQuery(document).ready(function() { | ||
|
||
swimg(); | ||
|
||
|
||
}); | ||
|
||
|
||
jQuery(document).on('change', '#swipebox-overlay',function(){ | ||
|
||
alert("gfdfgdf"); | ||
|
||
|
||
eol_si_img(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters