---
title: "How can I add text link in a div using jquery?"  
description: "How can I add text link in a div using jquery?"  
author: "Anonymous User"  
published: 2013-10-05  
updated: 2013-10-05  
canonical: https://www.mindstick.com/forum/1626/how-can-i-add-text-link-in-a-div-using-jquery  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# How can I add text link in a div using jquery?

I want to [place text](https://www.mindstick.com/forum/508/how-do-i-place-text-over-an-image) '[Mindstick](https://yourviews.mindstick.com/view/84668/how-mindstick-is-used-for-marketing-purposes)' with hyperlink <a href="http://www.mindstick.com" inside a div having [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp)-id as "my-[link](https://www.mindstick.com/articles/23633/link-builder)".

How can this be done using jquery or [javascript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript)?

## Replies

### Reply by Dag Hammarskjold

You can do this :

```
$('.my-link').html('<a href="http://www.mindstick.com">Mindstick</a>');
```

But it would add the hyperlink to all .my-link divs, so it's better to add an ID to div and use the ID on jquery code.


---

Original Source: https://www.mindstick.com/forum/1626/how-can-i-add-text-link-in-a-div-using-jquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
