I have a link and a button placed side by side. When the user clicks on the button the text of the link should become editable.
I m using jquery editInPlace for making the text of the link editable. The text of the link becomes editable but I m not able to restore the link property after the text edit. Here are my html and javasrcript files
demo.js
1 $(document).ready(function(){
2 $("img.modifyButton").click(function(){
3 $(this).prev().editInPlace({
4 success: function(){
5 $(this).unbind('.editInPlace');
6 $(this).unbind('click');
7 },
8 url:'Admin/p.inline_coupon_edit_frontend.php',
9 text_size:55,
10 show_buttons: false,
11 params:"field=Title"
12 });
13
14 $(this).prev().on('click', function(event)
15 {
16 event.preventDefault();
17 });
18 $(this).prev().click();
19 });
20
21 });
html file
16 <div class="crux">
17 <a href="www.google.com">title</a>
18 <img class="modifyButton" src="./editInPlace_files/modifyButton.png" alt="None" width="13" height="13">
19 </div>
git repo of code : git clone https://github.com/VihaanVerma89/dummy.git