Hi there,
is it possible to modify the widget in order to have what in the subject??
See below example with Steak Pie:
Thanks
Stefano
www.movi-menti.it
// add overlays
widget.find('.gk-image').each(function(i, img) {
img = jQuery(img);
if(img.find('.gk-img-overlay').length == 0) {
// create overlays
var overlay = jQuery('<div class="gk-img-overlay"></div>');
overlay.html('<span></span>');
img.append(overlay);
// add overlay events
img.mouseenter( function() {
var overlay = img.find('.gk-img-overlay');
var realImg = img.find('img');
overlay.css({
'margin-left': (-1.0 * (realImg.width() / 2.0)) + "px",
'width': realImg.width() + "px"
});
overlay.attr('class', 'gk-img-overlay active');
});
img.mouseleave(function() {
var overlay = img.find('.gk-img-overlay');
overlay.attr('class', 'gk-img-overlay');
});
}
});
// add overlays
widget.find('.gk-image').each(function(i, img) {
var img = jQuery(img);
var title = jQuery(img).attr('title');
if(img.find('.gk-img-overlay').length == 0) {
// create overlays
var overlay = jQuery('<div class="gk-img-overlay"></div>');
overlay.html('<span><i>'+title+'</i></span>');
img.append(overlay);
// add overlay events
img.mouseenter( function() {
var overlay = img.find('.gk-img-overlay');
var realImg = img.find('img');
overlay.css({
'margin-left': (-1.0 * (realImg.width() / 2.0)) + "px",
'width': realImg.width() + "px"
});
overlay.attr('class', 'gk-img-overlay active');
});
img.mouseleave(function() {
var overlay = img.find('.gk-img-overlay');
overlay.attr('class', 'gk-img-overlay');
});
}
});
.gk-portfolio .gk-images-wrapper > a > .gk-img-overlay > span:before {
border: 2px solid #fff;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
color: #fff;
content: "\f0c1";
font-family: FontAwesome;
font-size: 22px;
height: 52px;
left: 50%;
line-height: 50px;
margin: -32px 0 0 -32px;
opacity: 0; filter: alpha(opacity=0);
position: absolute;
text-align: center;
top: 65%;
-webkit-transition: all .2s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out;
width: 52px;
}
.gk-portfolio .gk-images-wrapper > a > .gk-img-overlay > span > i {
color: #fff;
font-size: 22px;
height: 52px;
line-height: 50px;
margin: -32px 0 0 0;
left: 0px;
opacity: 0; filter: alpha(opacity=0);
position: absolute;
text-align: center;
top: 65%;
-webkit-transition: all .2s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out;
width: 100%;
}
.gk-portfolio .gk-images-wrapper > a > .gk-img-overlay.active span:before {
opacity: 1; filter: alpha(opacity=100);
top: 50%;
}
.gk-portfolio .gk-images-wrapper > a > .gk-img-overlay.active i {
opacity: 1; filter: alpha(opacity=100);
top: 50%;
}
Cyberek wrote:The only thing that is possible is that you have made the changes wrong.
Could You please post an url to your site?
Cyberek wrote:It seems you have found a bug in our template.
Please provide an information how would you modify the background - what colour should it be, Ill provide correct override.css declaration to fix that.
Ill also inform you when the fix for template will be ready.
Cyberek wrote:Ok, that above responce should not go to this post :/
I have checked the js file and it seems to be working fine.
Could you post a link to a site, where those changes was made?
Cyberek wrote:Now I see where the problem lies.
In your portfolio.js you will find same block of code added twice. You have modified it in first block of code, but scroll down few lines and same code will be there again - please correct it also there.
// add overlays
widget.find('.gk-image').each(function (i, img) {
img = jQuery(img);
if (img.find('.gk-img-overlay').length === 0) {
// create overlays
var overlay = jQuery('<div class="gk-img-overlay"></div>');
overlay.html('<span></span>');
img.append(overlay);
// add overlay events
img.mouseenter(function () {
var overlay = img.find('.gk-img-overlay');
var realImg = img.find('img');
overlay.css({
'margin-left': (-1.0 * (realImg.width() / 2.0)) + "px",
'width': realImg.width() + "px"
});
overlay.attr('class', 'gk-img-overlay active');
});
img.mouseleave(function () {
var overlay = img.find('.gk-img-overlay');
overlay.attr('class', 'gk-img-overlay');
});
}
});
Cyberek wrote:Please check this file:
http://wp.paulgiordano.com/wp-content/t ... ?ver=3.8.1
Scroll it to the bottom, and slowly up. Find this block:
- Code: Select all
// add overlays
widget.find('.gk-image').each(function (i, img) {
img = jQuery(img);
if (img.find('.gk-img-overlay').length === 0) {
// create overlays
var overlay = jQuery('<div class="gk-img-overlay"></div>');
overlay.html('<span></span>');
img.append(overlay);
// add overlay events
img.mouseenter(function () {
var overlay = img.find('.gk-img-overlay');
var realImg = img.find('img');
overlay.css({
'margin-left': (-1.0 * (realImg.width() / 2.0)) + "px",
'width': realImg.width() + "px"
});
overlay.attr('class', 'gk-img-overlay active');
});
img.mouseleave(function () {
var overlay = img.find('.gk-img-overlay');
overlay.attr('class', 'gk-img-overlay');
});
}
});
It is still not changed.
title = img.attr('title');
title = jQuery(img).attr('title');
Cyberek wrote:In both places please replace:
- Code: Select all
title = img.attr('title');
with:
- Code: Select all
title = jQuery(img).attr('title');
var img = jQuery(img);
var title = jQuery(img).attr('title');
Cyberek wrote:
- Code: Select all
var img = jQuery(img);
var title = jQuery(img).attr('title');
and this way?
Cyberek wrote:Ok, Ill update info in thread.