current location:Home > Technical Articles > Web Front-end

  • jQuery's JSONP Explained with Examples
    jQuery's JSONP Explained with Examples
    Summary of key points JSONP (JSON with padding) allows cross-domain Ajax calls, circumventing homologous policies that restrict scripts from accessing data from different sources. This is done by having the server return JSON data containing the function call, which the browser can interpret. While JSONP is valuable for getting data from different sources and accessing content for various services, it also has some limitations. JSONP can only perform cross-domain GET requests and must be explicitly supported by the server. It also has potential security issues as it opens up possibilities for cross-site scripting (XSS) attacks. Other solutions for homologous policies include the use of proxy or the implementation of cross-origin resource sharing (CORS)
    JS Tutorial 191 2025-02-17 10:34:10
  • How to Pass Command Line Parameters to Gulp Tasks
    How to Pass Command Line Parameters to Gulp Tasks
    Core points The simplicity of Gulp.js is one of its most attractive features, allowing developers to write task functions in gulpfile.js and execute them from the command line. However, it does not support passing command line parameters to tasks for use. Although Gulp tasks usually do not require parameters, parameters can be useful in some cases. For example, passing FTP credentials as parameters can enhance security and prevent hard-coded sensitive information. The process.argv property in Node.js returns an array containing processes, scripts, and all command line parameters. This array can be parsed in gulpfile.js to create an object containing parameter values. Although Gul
    JS Tutorial 680 2025-02-17 10:32:10
  • JavaScript Functional Testing with Nightwatch.js
    JavaScript Functional Testing with Nightwatch.js
    Eric Elliott once wrote an article about JavaScript testing: JavaScript Testing: Unit Testing, Functional Testing, and Integration Testing, which explains different types of tests and when to use which test. This article will explore JavaScript functional testing in more depth and demonstrate using the Nightwatch.js library. Before we get started, let's review what functional testing is and why it is important. Simply put, functional testing is designed to ensure that the application works as expected from a user's perspective. What we are talking about here is not technical testing such as unit testing or integration testing. The goal here is to ensure that users can perform seamlessly
    JS Tutorial 430 2025-02-17 10:26:10
  • Getting Started with PouchDB Client-Side JavaScript Database
    Getting Started with PouchDB Client-Side JavaScript Database
    This article has been reviewed by Sebastian Seitz and Taulant Spahiu. Thanks to SitePoint's peer reviewers for their contributions! Modern client-side web applications demand sophisticated data handling capabilities. Browsers now offer robust JavaS
    JS Tutorial 976 2025-02-17 10:24:15
  • 5 jQuery Print Page Options
    5 jQuery Print Page Options
    The jQuery Print Plugin allows you to control and customize which parts of a website are printed, providing an alternative to browser default printing capabilities (usually printing the entire window). This article will explore several popular jQuery printing plugins and demonstrate how to build this feature yourself. Key points: The jQuery Print Plugin allows you to control and customize which parts of the website are printed, providing an alternative to the browser's default printing function (usually printing the entire window). The jQuery Print Preview plugin opens a new browser window to display specific parts of the website for printing. This plugin is very useful for printing data parts such as information cards or a row in a table. j
    JS Tutorial 201 2025-02-17 10:23:14
  • Creating Media Queries for Responsive Web Designs
    Creating Media Queries for Responsive Web Designs
    This article explores responsive web design using media queries, a crucial tool for adapting websites to various devices. It focuses on how media queries allow developers to detect device properties and apply different CSS styles based on those prop
    CSS Tutorial 370 2025-02-17 10:21:10
  • 15 Ways to Write Self-documenting JavaScript
    15 Ways to Write Self-documenting JavaScript
    Key points for writing self-documented JavaScript code This article will explore how to write self-documented and maintained self-documented JavaScript code through structured techniques, naming conventions, and syntax techniques. While self-documented code can reduce the need for comments, it does not completely replace good comments and comprehensive documentation. Core skills Structured technology: Move code into functions, replace conditional expressions with functions, and use pure functions to make the code clearer and easier to understand. Naming convention: Use meaningful names to name variables, functions, and classes to improve code readability. Syntax tips: Avoid using syntax tips, use named constants and make the code clearer. Extract code with caution: Avoid
    JS Tutorial 788 2025-02-17 10:16:09
  • jQuery Pagination Plugins
    jQuery Pagination Plugins
    This article reviews several jQuery pagination plugins, updated in February 2017 for accuracy. Displaying extensive results lists inefficiently is a common problem; pagination offers a superior solution. While server-side pagination fetches paged co
    JS Tutorial 764 2025-02-17 10:14:10
  • Animating the DOM with Anime.js
    Animating the DOM with Anime.js
    Anime.js: A Lightweight JavaScript Animation Library for Dynamic DOM Effects Looking for a fast and lightweight animation library for your web projects? Anime.js, created by Julian Garnier, is a strong contender, especially for dynamic DOM animati
    JS Tutorial 922 2025-02-17 10:13:10
  • Pseudo-classes - The Basics
    Pseudo-classes - The Basics
    (Adapted from "HTML5 & CSS3 for the Real World" by Alexis Goldstein, Louis Lazaris and Estelle Weyl) Core points CSS pseudo-classes are used to define the special state of elements, including structure, user operations, input and negation pseudo-classes and other types. They can style elements based on the location of the element in the document tree, user interaction, form element state, or elements that do not match a particular selector. Some pseudo-classes may have security issues, such as: visited pseudo-classes, which can be used by an attacker to check the user's browsing history. Modern browsers are restricted to:visite
    CSS Tutorial 441 2025-02-17 10:12:10
  • Getting Started With Vue.js
    Getting Started With Vue.js
    Quick look at the core concept of Vue.js Vue.js is a JavaScript library based on the MVVM architecture, used to build user interfaces. It is simpler, easier to learn and flexible than AngularJS. Its core functions include: Data binding: Supports one-way and two-way data binding, v-model instructions implement bidirectional binding, and model changes are reflected in the view in real time. Instructions and Filters: Instructions are used to operate the DOM, and filters are used to process data. Componentization: Create reusable custom HTML elements, improve code readability and maintenance, and use props attributes to pass component attributes. Note: This tutorial is based on Vue.js 1.x version. Please refer to other resources for Vue 2.x tutorial
    JS Tutorial 620 2025-02-17 10:10:10
  • 10 Need-to-Know RxJS Functions with Examples
    10 Need-to-Know RxJS Functions with Examples
    This article was reviewed by Florian Rappl and Moritz Kröger. Thanks to all the peer reviewers at SitePoint for making SitePoint’s content perfect! With the growing interest in functional reactive programming (FRP), RxJS has become one of the most popular JavaScript libraries in this paradigm. In this article, we will explore the top ten must-know functions in RxJS. Note: This article assumes that you are familiar with the basics of RxJS, as described in the article "Beginning with Functional Reactive Programming with RxJS". Key Points RxJS utilizes observable objects similar to arrays filled over time
    JS Tutorial 232 2025-02-17 10:08:10
  • Quick Tip: How to Throttle Scroll Events
    Quick Tip: How to Throttle Scroll Events
    Key Points Listening to scroll events can cause performance degradation because the browser executes a callback function every time the user scrolls; throttling and debounce are two common functions to manage this problem. Throttle ensures a constant flow of events over a given time interval, while de-bumping combines a series of events into a single event. Implementing event throttling in JavaScript can be complicated, and it is recommended to use a third-party implementation like lodash, which is the standard for event throttling. Lodash's throttling function simplifies rolling event throttling and provides options to determine whether the callback function is executed at the front and/or back edge of the event. The key to choosing throttling and debounce is to see the nature of the problem to be solved. Throttle is suitable for events that occur within a given time span
    JS Tutorial 936 2025-02-17 10:07:11
  • Fun Functional Programming with the Choo Framework
    Fun Functional Programming with the Choo Framework
    Choo: A Minimalist JavaScript Framework for Single-Page Applications Choo is a lightweight JavaScript framework perfect for crafting single-page applications (SPAs) using functional programming principles. It cleverly integrates the best aspects of
    JS Tutorial 1026 2025-02-17 10:06:10
  • How to Easily Share Code Between Projects with Bit
    How to Easily Share Code Between Projects with Bit
    Bit: Simplify code sharing and improve team efficiency Bit is a powerful tool that simplifies the process of code sharing among projects without splitting the code base or refactoring the project. You can share code snippets directly from any code base and install them into other projects using npm. Bit provides a scalable code sharing solution. You can specify the code component to share, Bit defines its dependency tree, and then share it to a shared location called "Scope". These components can be installed using npm and Yarn, just like any other package. Bit also simplifies the modification of shared code. You can import the source code into any path in the code base, make changes, and Bit will track
    JS Tutorial 678 2025-02-17 10:05:10

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28