tag:blogger.com,1999:blog-6729541215652149967.post7268869824385031794..comments2024-03-21T13:01:18.480+02:00Comments on Yet Another Blogger Tips Blog: Automatic image caption from img titleMS-potilashttp://www.blogger.com/profile/05137522196636058302noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-6729541215652149967.post-74328548877392187572018-02-19T17:29:05.657+02:002018-02-19T17:29:05.657+02:00Is there any way to modify this script so that it ...Is there any way to modify this script so that it simply grabs the img file name from the src attribute of the omg tag and use that for the caption? I am looking to eliminate the need to manually add a class and title to each tag.Temporaryhttps://www.blogger.com/profile/10771714264710440807noreply@blogger.comtag:blogger.com,1999:blog-6729541215652149967.post-8808361847818109762014-10-21T09:25:01.230+03:002014-10-21T09:25:01.230+03:00@Deepak Awasthi
Sorry for late answer, I've b...@<a href="#c4281391099111893794" rel="nofollow">Deepak Awasthi</a> <br />Sorry for late answer, I've been away from the blog. You have to edit your template, and copy the code and paste it before </head>. Then save the template and the script is installed.<br /><br />After the script is installed, you use it in your posts. When editing a post in html mode (must use html, compose mode does not work), you can give img element the class "caption" and set its title attribute. The script places contents of title attribute below the img when viewing the post.MS-potilashttps://www.blogger.com/profile/05137522196636058302noreply@blogger.comtag:blogger.com,1999:blog-6729541215652149967.post-42813910991118937942014-10-12T15:11:59.535+03:002014-10-12T15:11:59.535+03:00And i cant see the code now... why is that???And i cant see the code now... why is that???Deepak Awasthihttps://www.blogger.com/profile/02182293409391578545noreply@blogger.comtag:blogger.com,1999:blog-6729541215652149967.post-57190039620764757522014-10-10T11:53:21.068+03:002014-10-10T11:53:21.068+03:00I didnt get it.. first i have to copy that whole c...I didnt get it.. first i have to copy that whole code just before my < / head> tag.. then what??? please explain..Deepak Awasthihttps://www.blogger.com/profile/02182293409391578545noreply@blogger.comtag:blogger.com,1999:blog-6729541215652149967.post-60554957884688254432013-11-19T09:07:25.388+02:002013-11-19T09:07:25.388+02:00@MS-potilas
Thanks for the great reply, thanks ...@<a href="#c6349048651287826696" rel="nofollow">MS-potilas</a> <br /><br /> Thanks for the great reply, thanks you very much, it is perfect for me. You're wonderful.Olohttps://www.blogger.com/profile/12512175248022527701noreply@blogger.comtag:blogger.com,1999:blog-6729541215652149967.post-63490486512878266962013-11-18T18:37:56.042+02:002013-11-18T18:37:56.042+02:00@Olo
I did not test this thoroughly, but try some...@<a href="#c8736728888579401508" rel="nofollow">Olo</a> <br />I did not test this thoroughly, but try something like this: <br /><br /><script src='http://code.jquery.com/jquery-latest.js' type='text/javascript'></script><br />$(window).load(function() {<br /> $("div.post-body img").each(function() {<br /> title = $(this).parent().parent().parent().find("h3").text().trim();<br /> $(this).attr("alt", title)<br /> $(this).attr("title", title)<br /> });<br />});<br /><br />Place the code before </head>. Hope this helps. :)MS-potilashttps://www.blogger.com/profile/05137522196636058302noreply@blogger.comtag:blogger.com,1999:blog-6729541215652149967.post-87367288885794015082013-11-18T13:21:36.641+02:002013-11-18T13:21:36.641+02:00Thank you very much, but I was looking for somethi...Thank you very much, but I was looking for something else...<br />Can you make a tip that automatically adds alt and title tags for all images on blog post from post title?Olohttps://www.blogger.com/profile/12512175248022527701noreply@blogger.comtag:blogger.com,1999:blog-6729541215652149967.post-26846690077495762592012-02-16T07:48:23.242+02:002012-02-16T07:48:23.242+02:00@Nirmal Shah Thank you :)@<a href="#c7722477774326622786" rel="nofollow">Nirmal Shah</a> Thank you :)MS-potilashttps://www.blogger.com/profile/05137522196636058302noreply@blogger.comtag:blogger.com,1999:blog-6729541215652149967.post-77224777743266227862012-02-15T21:54:39.061+02:002012-02-15T21:54:39.061+02:00Great implementation of jQuery. Keep sharing such ...Great implementation of jQuery. Keep sharing such useful tips. Thanks!Nirmal Shahhttps://www.blogger.com/profile/10381678758764279961noreply@blogger.com