{"id":54,"date":"2010-07-09T19:01:00","date_gmt":"2010-07-09T19:01:00","guid":{"rendered":"http:\/\/www.codeboss.in\/web-funda\/?p=54"},"modified":"2010-07-09T19:01:00","modified_gmt":"2010-07-09T19:01:00","slug":"open-thickbox-with-onclick","status":"publish","type":"post","link":"https:\/\/codeboss.in\/web-funda\/2010\/07\/09\/open-thickbox-with-onclick\/","title":{"rendered":"Open Thickbox With Onclick"},"content":{"rendered":"<p>There might be certain times when you would want to open a thickbox with onclick instead of the regular a href. Say you want to make a whole td cell clickable. To do so follow the below steps.<\/p>\n<p>1. Open thickbox.js<\/p>\n<p>2. Find the line &#8211;<br \/>   tb_init(&#8216;a.thickbox, area.thickbox, input.thickbox&#8217;);\/\/pass where to apply thickbox<\/p>\n<p>3. Add td.thickbox. The line would look like &#8211; <br \/>   tb_init(&#8216;a.thickbox, area.thickbox, input.thickbox, td.thickbox&#8217;);\/\/pass where to apply thickbox<\/p>\n<p>4. Next look for the line &#8211;<br \/>   var a = this.href || this.alt;<\/p>\n<p>5. Add the abbr attribute which would contain the link to open. The line would look like &#8211;<br \/>   var a = this.href || this.alt || this.abbr;<\/p>\n<p>6. Now add thickbox to td like<br \/>   td class=&#8221;thickbox&#8221; abbr=&#8221;openthis.html&#8221;<\/p>\n<p>Enjoy \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There might be certain times when you would want to open a thickbox with onclick instead of the regular a href. Say you want to make a whole td cell clickable. To do so follow the below steps. 1. Open thickbox.js 2. Find the line &#8211; tb_init(&#8216;a.thickbox, area.thickbox, input.thickbox&#8217;);\/\/pass where to apply thickbox 3. Add&hellip; <a class=\"more-link\" href=\"https:\/\/codeboss.in\/web-funda\/2010\/07\/09\/open-thickbox-with-onclick\/\">Continue reading <span class=\"screen-reader-text\">Open Thickbox With Onclick<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,16],"tags":[51,53],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-javascript","category-jquery","tag-javascript-2","tag-jquery-2","entry"],"_links":{"self":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":0,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}