Category: JavaScript

  • querySelector


    querySelector is pretty versatile! It can select elements by classes, IDs, attributes, and even more complex CSS selectors.

  • Trigger Click after Scroll

    Trigger Click after Scroll

    Ah, triggering an event after scrolling a certain distance down the page is a pretty common task. You can use the window.scrollY and document.documentElement.scrollHeight properties along with the scroll event to achieve this in JavaScript.

  • Extend jQuery Example

    Extend jQuery Example

    The $.extend() method is used to add a new property to the $.expr[“:”] object, which contains all of the custom selectors that jQuery supports.

  • Trigger JS After An Element Has Changed. MutationObserver

    Trigger JS After An Element Has Changed. MutationObserver

    You can use the MutationObserver API to observe changes to the DOM and trigger a function when a specific element is added to the DOM.

  • Vue Directives

    Vue Directives

    Vue provides a number of built-in directives. The exact number might depend on the version you’re using, but here’s a general list of some commonly used directives in Vue 2.x and Vue 3.x

  • Vue Life Cycle Hooks

    Vue Life Cycle Hooks

    Vue’s lifecycle hooks give you a way to run custom logic at different stages of a component’s life. It’s a lot like those milestones in life—being born, going to school, getting a job, etc. Each stage presents a unique opportunity to do something meaningful.

  • Computed Property in Vue

    Computed Property in Vue

    Computed properties are a super handy feature that allows you to define functions that are cached based on their dependencies and are only re-evaluated when one of those dependencies changes.

  • Vue.js Models

    Vue.js Models

    In Vue.js, models are used to bind data to form inputs and update the data when the input changes. This allows for two-way data binding between the view and the model.

  • Understanding Vue.js Components and Props: A Practical Example

    Understanding Vue.js Components and Props: A Practical Example

    In the world of web development, Vue.js has rapidly gained popularity as a progressive JavaScript framework for building interactive and dynamic user interfaces. With its simplicity and versatility, Vue.js has become a developer favorite.

  • Typical .ajax call in jQuery

    Typical .ajax call in jQuery

    Here’s what each part does: Remember, these are just some of the options available in a jQuery AJAX call. There are many other options and methods available, which can provide more control and flexibility over your AJAX requests. You can find more details in the jQuery AJAX documentation.