Found a total of 10000 related content
10 jQuery Floating Menu and Message Plugins
Article Introduction:This post showcases ten exceptional jQuery floating menu plugins to enhance your website's navigation. The key feature? A menu that smoothly "floats" above the page content as you scroll. Let's dive in! Related articles: jQuery Floating
2025-02-25
comment 0
962
jQuery Check if Vertical Scroll is Present
Article Introduction:Use a simple jQuery code snippet to determine whether the main window vertical scroll bar exists. This feature is very useful, for example, when the user scrolls to the bottom of the page, an event that displays the relevant page can be triggered.
// Check whether the vertical scroll bar exists
// Also applicable to FF8
verticalScrollPresent: function() {
return (document.documentElement.scrollHeight !== document.documentElement.clientHeight);
}
// A lengthy version of the above method
verticalScrol
2025-03-01
comment 0
759
jQuery Auto Scroll To Top Of Page
Article Introduction:Use jQuery for Smooth, Automated Scrolling to the Top
This simple jQuery code snippet provides a smooth, automated scroll to the top of your webpage. Why use it? It saves users time scrolling on long pages and adds a visually appealing touch.
[Live
2025-03-11
comment 0
1200
jQuery Detect Scroll to Bottom - Read T&C
Article Introduction:Use jQuery detection to scroll to the bottom and enable the terms and conditions checkbox after the user scrolls to the bottom of the page (or div with scrolling).
The following jQuery code snippet can detect whether the user has scrolled to the bottom of the page:
jQuery(document).ready(function() {
jQuery("input#TERMS_ACCEPTED_YN").attr("disabled", true);
var $box = $("#scrollPane"),
2025-03-04
comment 0
1042
jQuery Reload an iFrame
Article Introduction:Simple jQuery code snippet to reload an iFrame by accessing the contentWindow property to obtain the location object. The jQuery snippet code actually loops through and refreshes all the iFrames on the page.
Also see:
Check if window is in an ifr
2025-03-03
comment 0
1014
What does vue multi-page development mean?
Article Introduction:Vue multi-page development is a way to build applications using the Vue.js framework, where the application is divided into separate pages: Code Maintenance: Splitting the application into multiple pages can make the code easier to manage and maintain. Modularity: Each page can be used as a separate module for easy reuse and replacement. Simple routing: Navigation between pages can be managed through simple routing configuration. SEO Optimization: Each page has its own URL, which helps SEO.
2025-04-07
comment 0
620
Scroll to Top Using jQuery (Setup time: 2mins)
Article Introduction:Quickly create a website back to top scrolling function (set time: 2 minutes)
This guide will guide you step by step how to set up the Back to Top feature on your website. Just scroll down this page to view the demo.
Download the scrollTo plugin and include it.
Get an image (arrow or similar).
Contains the following HTML code.
Contains the following jQuery/JavaScript code to capture window scrolling and process the display of images.
It's that simple!
HTML
jQuery
This jQuery code displays the image when the user scrolls down, hides the image when scrolling up, and processes click events.
$(document).ready(funct
2025-02-24
comment 0
885
jQuery Detect % Scrolled on Page
Article Introduction:Detect web page scrolling percentage using jQuery
The following jQuery code snippet demonstrates how to trigger an event action when a user scrolls to a specific percentage of the webpage. Tests show that when capturing mouse scroll events, it is best to use values ??between 55% and 100%.
$(document).ready(function(){
// Example: Show a div when scrolling to 75% of the web page
var webpage = $("body");
var webpage_height = webpage.height();
var trigger_height = webpage_hei
2025-03-10
comment 0
910
jQuery Change Current Page Title
Article Introduction:Although jQuery itself cannot directly modify web page titles, the same effect can be easily achieved using pure JavaScript. The following JavaScript code snippet can modify the full title of the current web page (i.e. the title displayed in the browser title bar):
document.title = 'New title';
FAQs about modifying page titles using jQuery (FAQs)
How to modify the title of a specific page using jQuery?
To modify the title of a specific page using jQuery, use the document.title property. This property allows you to get or set text in the title bar. Here is a simple example:
$(document).re
2025-03-04
comment 0
556
Back to Top button with smooth scroll
Article Introduction:The "Back to Top" button on long pages is a simple yet useful navigation feature. This button allows users to quickly return to the top of the page without scrolling excessively. Check out the Codepen demo below: Full text: Back to top button CSS code snippet with smooth scrolling
2025-01-07
comment 0
1240
jQuery Get Timestamp getTime() Example
Article Introduction:Simple jQuery code snippet to get the time since an event happened. Useful for tracking how long the user is taking to interact with the page elements.
var last, diff;
$('div').click(function(event) {
if ( last ) {
diff = event.timeStamp - las
2025-03-07
comment 0
266
jQuery Slide Element Up/Toggle Up
Article Introduction:Simple jQuery code snippet to slide page elements up or toggle up using jquery.slideToggle(). The difference is that jQuey’s slideUp() function is primarily used to slide elements out of view and then use slideDown() to make them reappear whereas jQu
2025-03-03
comment 0
318
Make a Simple JavaScript Slideshow without jQuery
Article Introduction:Key Takeaways
This tutorial provides a step-by-step guide to creating a simple JavaScript slideshow without the use of external libraries such as jQuery, which can improve page performance due to less code and allows the slideshow to be used anywh
2025-02-18
comment 0
425
jQuery Check if Window is in iFrame
Article Introduction:Simple JavaScript code to determine whether a web page is in an iframe
Here is a simple JavaScript code snippet to check if the window is in an iframe. It is useful for some functions that may use URLs in the page's address bar. The code is as follows:
var isInIframe = (window.location != window.parent.location) ? true : false;
Related readings:
Get the source href injected iframe
How to reload an iframe
About jQuery and iframe
2025-03-06
comment 0
825
jQuery Encode/Decode URL String
Article Introduction:Simple jQuery code snippet to encode/decode (convert) a href params in a url string (http address) so that they can be properly viewed on a web page. For example, is the html equivalent of a space and @ is an ampersand (@).
Encode URL String
2025-03-04
comment 0
875
A Comprehensive Look at Events in jQuery
Article Introduction:This article was reviewed by Wern Ancheta and Camilo Reyes. Thanks to all the peer reviewers at SitePoint for getting SitePoint content to its best!
jQuery is able to capture almost all user interaction behaviors in a web page and define it as events. The importance of events is that they allow you to respond accordingly based on the actions of the user. For example, you can write code to change the background color of a web page based on button clicks or scroll events.
jQuery has many shortcut methods, such as contextmenu(), hover() and keyup(), used to handle different events. In addition to special methods, jQuery also provides a general on
2025-02-18
comment 0
555
How to Replace jQuery with Vue
Article Introduction:Say goodbye to jQuery and embrace Vue.js: build a simpler and more efficient web application
Want to learn Vue.js from scratch? Join SitePoint Premium now for a complete collection of Vue.js books covering Vue.js basics, project practices, tips and more for just $14.99 per month!
Many developers still rely on jQuery when building simple applications. While sometimes you only need to add a small amount of interactivity to your page, using JavaScript frameworks seems too complicated - extra code volume, boilerplate code, build tools and module packers, and more. Introducing jQuery from CDN seems like a breeze to choose.
This article is intended to convince you, even if it is right
2025-02-14
comment 0
925
Better Living Through Bookmarklets
Article Introduction:Core points
Bookmark applets are small JavaScript code embedded in browser bookmarks that enhance the functionality of a web browser and simplify the workflow of web developers.
Bookmark applets have a wide range of uses, ranging from simple navigation tasks to more complex operations, such as modifying page content, analyzing page structure, and even automating tasks on the website.
While bookmark applets are generally safe and reliable, they can cause namespace conflicts. This problem can be avoided by creating anonymous functions with its own variable scope as bookmark applets.
For complex bookmark applets, there is a way to bypass the length limit of bookmarks in some browsers. The actual bookmark applet implementation can be used as external .js
2025-03-08
comment 0
1243