


How to modify the Wordpress ThickBox click on the picture to display the next picture_javascript skills
Taking wordpress 3.0.2 as an example, open wp-includes/js/thickbox/thickbox.js and find the following line of code:
jQuery("#TB_window").append("< img id='TB_Image' src='" url "' width='" imageWidth "' height='" imageHeight "' alt='" caption "'/>"
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:
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:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP vs. Flutter: The best choice for mobile development

How to change page width in wordpress

In which folder are wordpress articles located?

How to create a product page in wordpress

Where is the wordpress template file?

How to search for authors in WordPress

Which version of wordpress is stable?

What language is used to develop WordPress?
