How to Toggle CSS Classes and Styles with Vue.js

Sometimes it is required to control the flow of the CSS classes and style properties of the element based on the expression at runtime.

In Vue.js there is a v-bind directive to update the HTML attribute.

In this tutorial, I am using this on class v-bind:class and style v-bind:style.

The v-bind:class adds and removes classes from the elements without affecting the value of the class attribute.

In the demonstration, I am using the v-bind directive to dynamically toggle CSS class and style property from the element on a click.

How to Toggle CSS Classes and Styles with Vue.js

Read more

How to Add Speech Recognition to the Website – JavaScript

With the use of Speech Recognition API, you can enable the web browser to take speech input on the page and convert it into text.

For accessing this on the page need to allow microphone access by the user.

In this tutorial, I am creating an example where allowing the users to search posts by speech. On the basis of speech recognition display response on the screen using jQuery AJAX.

How to Add Speech Recognition to the Website – JavaScript

Read more

Delete Multiple Selected Records with PHP

It is time-consuming to delete records one by one from the list.

To make the deletion process easier for the users by allowing them to select multiple records using checkboxes.

Execute delete query according to the selected checkboxes.

In the demonstration, I am displaying records from the MySQL database table and add a checkbox on each row. Use single submit button to delete selected records with PHP.

Delete Multiple Selected Records with PHP

Read more