diff --git a/assets/touchTouch/touchTouch.css b/assets/touchTouch/touchTouch.css index 314919e..a535d3b 100644 --- a/assets/touchTouch/touchTouch.css +++ b/assets/touchTouch/touchTouch.css @@ -137,3 +137,56 @@ background-position:right top; right:40px; } + +/* ****** gallery content ******* */ +.gallery_content { + display : inline; + width : 250px; + color : white; +} +.gallery_content a.image_link { + display : block; + width : 100%; + min-height: 25px; + color: #FFF; + padding-top: 20px; + +} + +.gallery_content .other_contents{ + width:100%; + display:block; + position: absolute; +} +.gallery_content p.image_title { + display : block; + width : 100%; + min-height: 25px; + top: 15px; + position:relative; +} +.gallery_content p.image_caption { + display : block; + width : 100%; + min-height: 25px; + position:relative; + top:15px; +} + +#galleryOverlay #closeOverlay{ +border: 2px solid #fff; +border-radius: 25px; +color: hsl(0, 100%, 100%); +cursor: pointer; +display: block; +font-size: 17px; +font-family: Arial; +line-height: 23px; +position: absolute; +right: 10px; +text-align: center; +top: 10px; +vertical-align: middle; +width: 25px; +height: 25px; +} diff --git a/assets/touchTouch/touchTouch.jquery.js b/assets/touchTouch/touchTouch.jquery.js index 16498e6..a40dc62 100644 --- a/assets/touchTouch/touchTouch.jquery.js +++ b/assets/touchTouch/touchTouch.jquery.js @@ -15,6 +15,7 @@ slider = $('
'+placeholders.eq(index).find('img').attr('title')+'
'); + } + // Checking the caption attr, if availabe then displaying + if(placeholders.eq(index).find('img').attr('caption') != '' && placeholders.eq(index).find('img').attr('caption') != undefined){ + placeholders.eq(index).find('.other_contents').append(' '); + } + }); } // Load the image and execute a callback function. // Returns a jQuery object - function loadImage(src, callback){ + function loadImage(src, link, title, caption, callback){ var img = $('').on('load', function(){ callback.call(img); }); - img.attr('src',src); + if(link != '' && link != undefined){ + img.attr('link',link); + } + if(caption != '' && caption != undefined){ + img.attr('caption',caption); + } + if(title != '' && title != undefined){ + img.attr('title',title); + img.attr('alt', title) + } + else{ + img.attr('alt', "") + } } function showNext(){ diff --git a/index.html b/index.html index 1e73798..a8f167c 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@