简体   繁体   中英

With MovableType, how do I make my banner image clickable?

I have been having trouble getting my banner image on my blog to be clickable. If my site has an image named "banner.jpg", is it possible to make a generic javascript function that makes all images with that particular name on the page be clickable with a hard coded link?

I would like to be able to drop in a short code snippet into the "head" tag section and not have any requirement to edit a style sheet or a movable type template, or anything else.

I don't think you need Javascript at all. Just edit the template for the page in question. In my MovableType blog, index.html has a div called "banner". Find the element you want clickable there and wrap in in an anchor (A element) with the URL you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM