Friday, 21 December 2012

Link Scraper TextBox - Jquery Plugin


This jquery plugin displays a textbox to enter text. When you enter a URL in the textbox, the plugin creates a data box for a link having the link title, description and an image. The plugin works like a URL scrapper and these scrapped values about the URL are available to you as javascript variables.








How to use:

The download pack contains two files - linkScrapper.html and the plugin file linkScrapper.min.js.

1. The HTML

Include the plugin in your head section.


Create a div with the id - linkScrapper. The textarea to enter text or links will be created inside this div.

I have created another div with id - displayArea. My custom display function in the javascript shows the scrapped values of the URL in the displayArea.


2. Javascript (Input Variables)


This is what they mean.



3. Javascript (Output Variables)

Output variables are as shown. The function displayScrapperData() will be called when the post button is clicked. You may use the output variables to display data about the URL as shown.


Let me know if you face any issues. Thank You.

4 comments:

  1. it's like in facebook share link...xixixi
    ty for tutor master :)

    ReplyDelete
  2. awesome. It's what i need. Thanks a lot.

    ReplyDelete
  3. missing many images. How about adding relative url to absolute url

    ReplyDelete