Automatically change text into a link

Posted by Andi Syahputra | 4:22 PM
Still about BjQuery, now I'll explain about how to use text to link features. This widget will automatically change the targeted word into a hyperlink. You can define many word to make it into hyperlink.





Very useful for you to build an internal link to your site. Besides text to link, there are some features that similar such as bold to link, underline to link, and italic to link. You can use it together with text to link.

- bold to link = change all BOLD word into a link

- italic to link = change all ITALIC word into a link

- underline to link = change all UNDERLINE word into a link



Well, here's the instruction manual. Assume that you use blogger:

- Open edit HTML, then tick expand widget template

- add this script below the <body> tag

<script src="http://bjquery.xtgem.com/v_1_19" type="text/javascript"></script>

- Find <data:post.body/>. Cover it with a div, for example I named the div as c_content

<div id='c_content'>

<data:post.body/>

</div>

- Below that div, add the text to link script:

<script>

jb_bold_to_link("URL","c_content");//add this lineif you want to activate bold to link feature

jb_italic_to_link("URL","c_content");

jb_underline_to_link("URL","c_content");

jb_text_to_link("WORD","URL","c_content");

jb_text_to_link("WORD2","URL","c_content");

</script>

- save the template



Note:

- URL refer to the link you want to add.

For example if you set the URL into http://google.com, then the hyperlink become http://google.com

- WORD dan WORD2. Change it with the word you want to make it a link.

For example if you change the word to ADMIN. so if the word ADMIN exist on the post, it will automatically changed into ADMIN word with URL you specify :D You can add more word and specify the URL one by one.



Try it, very cool widget..

If you had any question you can comment below.... :D

hi folks, visit my other tutorial blog at Kumpulan tutorial menarik
0 comments