Colorbox isnt working? - colorbox

I´ve got a problem with the jQuery colorbox.
$('a[data-lightbox]').map(function() {
$(this).colorbox({
loop:false,
rel:$(this).attr('data-lightbox'),
opacity: '0.6'
})
$(".inline").colorbox({inline:true, width:"50%"});
Somehow the colorbox wont open but I dont know why:
http://jsfiddle.net/Lgdez0dn/7/
Tanks for the help

Related

how to remove videojs's seekbar click event?

I just want to keep the drag event of seekbar, and I don't want users to click on it to adjust the video schedule.
I've tried to do this:
this.player.controlBar.progressControl.seekBar.disable()
this.player.controlBar.progressControl.seekBar.handleClick = () => {}
But none of this is helpful.
Please help me. I've tried my best.
Using only CSS, putting these 3 lines in your html seems to solve it:
<style>
.video-js .vjs-progress-holder .vjs-play-progress { display: none; }
</style>
myPlayer.controlBar.progressControl.disable();
this worked for me.

How to improve the display of images?

After installing the template, there was a problem with displaying images on the listing. I will just add that everything was fine on the old template, I reloaded all the pictures, and as I upload them, they all have a dimension of 800x800 px. How can I fix this problem?
Here is the image:
And here is the link to view problem.
Add the following CSS rules in your global.css:
#media(min-width:992px) {
.products-block.grid.first-in-line {
clear: left
}
.rtl .products-block.grid.first-in-line {
clear: right
}
}

Can't scroll inside a div after applying -webkit-transform in Safari

I am building a slide menu.
The menu is long and I need to be able to scroll inside of it, so I have set overflow-y: scroll on it.
I am using -webkit-transform (and variants on other browsers) as the transition property.
Now I can't scroll inside the div, using the scrollwheel when on top of the div will make the whole page scroll.
If I change the menu's behavior and transition the right property (setting the menu to right: -320px and animating it back to right: 0), the scroll works.
This bug only happends in Safari, it works fine in Chrome and other browsers. Also works on iOS.
Anybody know a workaround? Anyone experienced this issue before? I can't seem to find any info on it. Thank you.
I had the same issue with the difference that I use an animation instead of a transition and overflow: auto instead of overflow: scroll.
This fixed the issue for me (el is the DOM element to which the animation is applied):
function fixSafariScrolling(event) {
event.target.style.overflowY = 'hidden';
setTimeout(function () { event.target.style.overflowY = 'auto'; });
}
el.addEventListener('webkitAnimationEnd', fixSafariScrolling);

Bootstrap Gallery with Lightbox

I'm using the ekko lightbox along with bootstrap modal to create a gallery. However I cant seem to get the image navigation controls to appear/work like they do on this example: http://ashleydw.github.io/lightbox/#image-gallery
As you can see when you hover over an image you get navigation control arrows. I've tried adding the data attribute data-gallery="multiimages" to my images but this hasnt helped.
You can see my development code here: http://agtdesigns.co.uk/bootstrap-gallery/
Any help appreciated,
tia
I had the same problem,
see https://github.com/ashleydw/lightbox/issues/33 for the answer.
In summary, you need to add a wrapping div, eg
<div class="gallery">
Then as JS code
$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
event.preventDefault();
return $(this).ekkoLightbox({
always_show_close: true,
gallery_parent_selector: '.gallery',
});
});

How to refresh on closing dijit.dialog

I'm using dijit.dialog to show the popup dialog. How do I refresh the parent page on closing dijit.Dialog? Please advise. thanks
You need to add a listener to the hide event, and you need location.reload(). It will be a lot easier to answer your question if you post some code and list what you've tried already.
Here's a jsfiddle illustrating how to use location.reload() when a dijit/Dialog closes with Dojo 1.8.
The relevant code:
d.on('hide', function() {
console.log('closed');
location.reload();
});
You can use code as below, you just need to now your modal object's name.
var dialog = registry.byId("modalDialogObjectName");
var url = dialog.get("href");
dialog.set("href", url);