Link to home
Start Free TrialLog in
Avatar of maqskywalker
maqskywalker

asked on

adding a href tag to a table cell with javascript

i have this fiddle:

https://jsfiddle.net/tkwpztkf/

Is there a way to use either JavaScript or jQuery

So that on page load my page renders this:

        <table id="table1">
            <tr>
                <td>
                    <span><a href="http://www.google.com" target="_blank">Google<a></span>
                </td>
                <td>
                    <span><a href="http://www.yahoo.com" target="_blank">Yahoo<a></span>
                </td>
                <td>
                    <span><a href="http://www.bing.com" target="_blank">Bing<a></span>
                </td>
            </tr>
        </table>

Open in new window


Basically I want to add the hyperlink a href tag to my items inside the cells on the jquery page load event.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maqskywalker
maqskywalker

ASKER

Thanks guys. very cool.