开发者

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

开发者 https://www.devze.com 2022-12-12 02:39 出处:网络
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 wi

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 s开发者_如何学Pythonection 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消