cycle2 carousel conflict with cycle2 slidershow - carousel

Cycle2 carousel conflicting with cycle2 slideshow at the same page.
Means i setup two different slider .Each of them having different Images.
Carousel works fine with $.fn.cycle.defaults.autoSelector = '.carousel'; and
Slider works fine with $( $.fn.cycle.defaults.autoSelector ).cycle();
but not at the same page. How to work them at same page?
I 've tried $.fn.cycle.defaults.autoSelector = '.carousel,.slidershow'; did't work.

I had the same problem with a slideshow and a carousel on the same page. In the slideshow section I used this:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery( '.cycle-slideshow' ).cycle();
});
</script>
In the carousel section I used:
<script>
$.fn.cycle.defaults.autoSelector = '.carousel';
</script>

Related

Adding custom html inside Mapbox GL JS Popup on click event

I am creating a pop up using official docs per https://docs.mapbox.com/mapbox-gl-js/example/popup/
But inside the html I would like to set custom Quasar Vue components, such as images, buttons, .etc
I am wondering if that is even possible and if so what would be the syntax for it.
Below is an example of what I would like to achieve with popup.setHTML().
The simple p tag will render correctly but the button wont work using q-btn quasar directive.
map.on('click', layerID, (e) => {
const popup = new mapboxgl.Popup({offset: [0, -15]})
.setLngLat(LngLat)
.setHTML(
`<div>
<p>Some Text</p>
<q-btn #click="alert('hello world')" >Button Title</q-btn>
</div>`
);
popup.addTo(map);
});

CharJs scrolling page on mobile

We have an application in VueJs, in the home page everything works fine.
When we load the page on mobile, we have few problems on scrolling, if we touch the chart and try to scroll the page down, the touch it's like intercepted from the chart and make the scoll impossible.
So in order to scroll the page we have to start scrolling from outside the chart.
I tried to add in the chart options the following events: ['mousemove', 'mouseout', 'click',], thinking that like so it would exclude the touch options, but it dosen't work as well.
I've also tried with the following but no success.
tooltips: {
enabled: false
},
events: [],
Any suggestion? Thankyou so much.
after few hours I've found a solution.
Seems like that in the canvas of the chart there is a css propriety touch-action: none; setting that one to touch-action: unset solved my problem.
<template>
<canvas class="chart-mobile" ref="canvas"/>
</template>
<style scoped>
.chart-mobile {
touch-action: unset !important;
}
</style>

Bootstrap carousel start autoplay when it scrolls on to the screen

myI have a bootstrap 3 carousel on my page and I've got it set so that on load the autoplay is disabled
$('#myCarousel').carousel({
interval: false
});
I've added some more code so that when the text appears on the screen it should start autoplaying
function myCarouselPlay(){
$('#myCarousel').carousel({
interval: 5000
});
}
Unfortunately this isn't working. Any ideas why?
Hello Can you please try this
<script type="text/javascript">
$(document).ready(function () {
$('.carousel').carousel({
interval: 3000
});
$('.carousel').carousel('cycle');
});
</script>

ReferenceError: videojs is not defined

I am using video.js (in CDN-Mode) and everything seems to work fine (with Firefox 26.0). The video is embedded and works fine. But when I want to access the video-Object, I'm getting the console-error:
ReferenceError: videojs is not defined on the code-line where I want to access the object:
var myPlayer = videojs('example_video_1');
Googling arround could not solve my problem. I saw implementations where users used: V as constructor instead of videojs but this did not solve my problem).
This is my script, where I want to access the object:
<script type="text/javascript">
$("#button1").on("click", function(){
console.log( "You clicked a paragraph!" );
var myPlayer = videojs('example_video_1');
});
</script>
This is my header
<link href="http://vjs.zencdn.net/4.5/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.5/video.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
And this is my video-declaration
<video id="example_video_1" class="video-js vjs-default-skin" controls
preload="auto" width="1270" height="720" poster="videos/search.png"
data-setup="{}">
<source src="videos/search.webm" type='video/webm'>
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video</p>
</video>
I would be happy for any kind of support.
A year and a half later and this issue occurred for me as well. I just installed it via npm install --save video.js and moved the file from the dist folder into my public scripts folder and it worked.
You must install or use from #videojs/http-streaming. I had same problem and solved by it.
I just made sure that the video.js file was the last attached script tag in the HTML. It worked for me.
import videojs from 'video.js';
try:
<script type="text/javascript">
$("#button1").on("click", function(){
console.log( "You clicked a paragraph!" );
var myPlayer = window.videojs('example_video_1');
});
</script>
add the event listener 'DOMContentLoaded' before calling the videojs object:
window.addEventListener('DOMContentLoaded', (event) => {
videojs('element-id', {
controls: true,
autoplay: false,
preload: 'auto'
});
});

Modal ExtJS Window not masking everything behind it in Safari and Chrome

I was wondering if somebody could help me with this problem. Everytime I show an Ext.Window with its modal config set to true, in FF and IE, it works fine, i mean everything behind the popup window is masked, whereas in Safari and Chrome, it doesn't. When i try to scroll down the page, I can see the mask is limited, which is not what i wanted to happen because one can easily do some stuff on the parent page even when the window is not yet closed. Can somebody help me? Thanx in advance. :D
I thought maybe this would happen if you were not running in a Viewport, so I put together a simple example. It turns out that the modal mask works just fine in Safari in this example. Give it a try and see where your code differs.
<html>
<head>
<link rel="stylesheet" href="ext-3.1.1/resources/css/ext-all.css" />
<script src="ext-3.1.1/adapter/ext/ext-base.js"></script>
<script src="ext-3.1.1/ext-all-debug.js"></script>
<script>
Ext.BLANK_IMAGE_URL = 'ext-3.1.1/resources/images/default/s.gif';
Ext.onReady(function(){
var p = new Ext.Panel({
renderTo: 'panel',
html: 'this is the panel',
tbar: [{
text: 'Show a Modal Window',
handler: function() {
new Ext.Window({
title: 'Title',
html: 'Try scrolling - the entire page should be modal',
modal: true
}).show();
}
}]
});
});
</script>
</head>
<body>
<h1 style="height:100px;background-color:green;">html page</h1>
<div id="panel"></div>
<h1 style="height:1200px;background-color:green;">html page</h1>
</body>
</html>
It should work fine in Safari and Chrome out of the box. I just verified this page in Safari 4.0.4 Mac and it works fine with scrolling and/or resizing the browser. There's a chance maybe there's a bug in Ext for your particular browser/platform, but this is such a basic functionality that I doubt that. Does that page work for you?
This helped set the z-index for Ext.Msg.show() alerts to be infront of the window they were opened from for me.
Ext.WindowMgr.zseed = 10000;