Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of adding prompts in loading for WordPress article title link

Shulou Source: shulou.com Published: 2022-06-02 05:00:00 10月04日 Update

This article mainly introduces the WordPress article title link to add tips in the loading method, the article is very detailed, has a certain reference value, interested friends must read it!

WordPress article title link how to add a prompt in the process of loading?

We will see a lot of friends who use wordpress blog when we click on the article title, we will first prompt that it is loading, and then enter the article, here we will introduce the WordPress article title link to add the prompt effect in loading.

First open the header.php template file for the theme you are using and add the following code in front of the tag:

The code is as follows:

If your theme has already loaded JQuery, you don't need to do this, and add the following code to the tag as follows:

The code is as follows:

$(document) .ready (function () {$('h3a dint h4a') .click (function () {myloadoriginal = this.text; $(this) .text (' being loaded...') ; var myload = this; setTimeout (function () {$(myload) .text (myloadoriginal);}, 2011);};})

Among them, "H3a" is the tag selector for the title of the theme article, which can be modified according to the specific theme template. If changed to "a", you can add this special effect to all links. The following number 2011 is the display time (milliseconds) of this special effect, which can be modified as appropriate.

The above is all the content of the WordPress article title link to add the method that is being loaded, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Articles titles being links prompts code themes tags methods content templates special effects values interests blogs guys buddies effects numbers files Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Apple vpn Shulou Technology OPPO Reno