Home Web Front-end JS Tutorial How to modify the Wordpress ThickBox click on the picture to display the next picture_javascript skills

How to modify the Wordpress ThickBox click on the picture to display the next picture_javascript skills

May 16, 2016 pm 06:14 PM
wordpress

Taking wordpress 3.0.2 as an example, open wp-includes/js/thickbox/thickbox.js and find the following line of code:

Copy code The code is as follows:

About line 135, below // End Resizing, modify the id='TB_ImageOff' to id='TB_nextImage',
Then if (!(TB_NextHTML === "" not far below the line )){} add:
Copy code The code is as follows:

jQuery("#TB_nextImage ").click(goNext);

Place jQuery("#TB_next").click(goNext); on the next line.
Update:

Suddenly discovered I forgot to change the title of the link. The above code allows you to click on the picture to directly view the next picture. However, the title of the picture link (the yellow block when the mouse is placed on it) has not changed. This is very simple. Change

title ='" thickboxL10n.close "' can be changed to title='" thickboxL10n.next "'. This will read the language pack to display the prompt, or you can write it directly as a string. The effect is as follows:

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP vs. Flutter: The best choice for mobile development PHP vs. Flutter: The best choice for mobile development May 06, 2024 pm 10:45 PM

PHP vs. Flutter: The best choice for mobile development

How to change page width in wordpress How to change page width in wordpress Apr 16, 2024 am 01:03 AM

How to change page width in wordpress

In which folder are wordpress articles located? In which folder are wordpress articles located? Apr 16, 2024 am 10:29 AM

In which folder are wordpress articles located?

How to create a product page in wordpress How to create a product page in wordpress Apr 16, 2024 am 12:39 AM

How to create a product page in wordpress

Where is the wordpress template file? Where is the wordpress template file? Apr 16, 2024 am 11:00 AM

Where is the wordpress template file?

How to search for authors in WordPress How to search for authors in WordPress Apr 16, 2024 am 01:18 AM

How to search for authors in WordPress

Which version of wordpress is stable? Which version of wordpress is stable? Apr 16, 2024 am 10:54 AM

Which version of wordpress is stable?

What language is used to develop WordPress? What language is used to develop WordPress? Apr 16, 2024 am 12:03 AM

What language is used to develop WordPress?

See all articles