Web Development Articles

Page 770 of 801

How to call a VueJS component method from outside the component ?

Mayank Agarwal
Mayank Agarwal
Updated on 13-Apr-2023 7K+ Views

Generally, we cannot call a Vue component method from outside the component. But we have a way to call the component from outside. We can use the Vue’s ref Directive. This metthod allows a component to be referenced from the parent for direct access. To apply the ref Directive, we will first create a div element with id ‘app’. Once the div element is created, we can apply the ref to the element by initializing the its data. Syntax Following is the syntax to call a component method from outside the component in Vue.js − Here, the ...

Read More

How to call a function with Mouse hover in VueJS?

Mayank Agarwal
Mayank Agarwal
Updated on 13-Apr-2023 2K+ Views

While hovering over a div or an element sometimes we require to display some information. This information or data is displayed while hovering over it with the mouse. Therefore, to display this data, we basically use the JS function @mouseover to display data. In the above specific case, we will make the mouseover function which will return data on hover. Please look at the below example for more clarification. Syntax Following is the syntax to call a function with mouse hover in Vue.js − mouseOver: function(){ this.active = !this.active; } Here mouseOver ...

Read More

How to bind the background image in Vue.js?

Mayank Agarwal
Mayank Agarwal
Updated on 13-Apr-2023 7K+ Views

The value for v-bind:style is just a plain JavaScript object that works upon some rules for binding the content. The value of the background image should be a string. So we can apply or data-bind the background image in Vue.js using the style tag and then defining the backgroundImage URL in it. It will automatically retrieve the url from the string and then display the same data content on the browser webpage. To access the background image, make a div element and define the background image in it with url. The url will be retrieved from the JS file. Example ...

Read More

How to apply Switch in Vue using Filters?

Mayank Agarwal
Mayank Agarwal
Updated on 13-Apr-2023 925 Views

Vue can be defined as a progressive framework for building the user interfaces. It has multiple directives that can be used as per the user needs. The basic core library is mainly focused on building the view layer only and is also easy to pick up other libraries or integrate with them. The vue components provides the filter functionality to filter out the requests and response that lets the user to apply different formatting and transformations to the template dynamic data. Filters are used in two places : mustache interpolation and v-bind expressions. Functions are appended in the end of ...

Read More

How to add or apply global variables in Vue.js?

Mayank Agarwal
Mayank Agarwal
Updated on 13-Apr-2023 5K+ Views

In a Vue.js application there may be data or utilities that are used in many components, but you don’t want to change its scope and keep its value same for all the components. These types of variables are called the global variables. In such cases, the user can use the following syntax for defining the prototype − Vue.prototype.$appName = 'My App' Now this $appName will be available on all the Vue instances, even before creation. The $ defined before the appName is the convention used for properties that are available to all the instances. The user can also ...

Read More

Setting Up Full Video Background using video.js

Prince Yadav
Prince Yadav
Updated on 13-Apr-2023 2K+ Views

Video.js is a powerful tool for working with video on the web, providing a common interface for different types of video players including HTML5, Flash, and others. It is designed to be easy to use and customize, with a wide range of options for controlling the look and feel of the player. In this tutorial, we will show how you can set up a full video background for a video player using this open-source JavaScript library called video.js. For the purpose of this tutorial, we will focus on how to set up a full video background using video.js. This can ...

Read More

How to initially mute videos in the video.js player?

Prince Yadav
Prince Yadav
Updated on 13-Apr-2023 2K+ Views

In this tutorial, we're going to learn how to initially mute videos in the video.js player. For this tutorial, we're not going to make use of the standard HTML tags like 'muted' which are available for a video element, instead, we're going to use the method specific to video.js. So, let's move on to the subsequent section of this tutorial and understand how to initially mute videos in the video player using just video.js. For muting the videos of our video.js player, we'll make use of the 'muted' method and 'volume' method provided by video.js. We can make use ...

Read More

Callback Functions for video.js Player

Prince Yadav
Prince Yadav
Updated on 13-Apr-2023 2K+ Views

In this tutorial, we'll learn about the various event listeners and how to use them with callback functions for a video.js player. Video.js is a popular, open-source library used for creating video players in browsers. Using video.js you can tweak every single part of a video player without much problems or hassle. Aside from that, video.js provides a plethora of default events like play, pause, playing, loadedmetadata, timeupdate, canplaythrough, loadeddata etc. So, for the purpose of this tutorial, we're going to learn about the callback functions of various event listeners in video.js. Callback functions are really crucial as they are ...

Read More

Video.js – Callback a Function in the Event that a Video is 50% Buffered

Prince Yadav
Prince Yadav
Updated on 13-Apr-2023 1K+ Views

In this tutorial, we will show how you can get the buffer percentage of a video in video.js and use a callback function when the video has buffered more than 50%. Video.js is a well-known online video player JavaScript toolkit that is used to create web browser video players for a range of video formats. Video.js is a very flexible and customizable library to create modern web video players. It supports a wide range of packages, plugins, and options. Using video.js any part of an HTML video player can be configured as per your liking. For the purpose of this ...

Read More

How to create lists and links using jQuery EasyUI Mobile?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 13-Apr-2023 364 Views

In the world of mobile web development, creating lists and links that are both functional and visually appealing is crucial for user engagement. jQuery EasyUI Mobile, a robust JavaScript framework, offers developers the tools to achieve this objective with ease. While some may find the process of creating lists and links with jQuery EasyUI Mobile daunting, mastering this skill is crucial for crafting high-quality mobile web applications. In this article, we will explore the step-by-step approach to creating lists and links using jQuery EasyUI Mobile, delving into the underlying syntax and parameters that allow developers to create captivating and dynamic ...

Read More
Showing 7691–7700 of 8,010 articles
« Prev 1 768 769 770 771 772 801 Next »
Advertisements