Vishal Gupta
asked on
Change display property of a div on select some text in another content editable div
<div id="myDiv" contenteditable="true"></d iv>
<div id="arrowBox" style="display:none;">Some buttons Here</div>
Now i want to change display block of arrowBox div when select some text in myDiv..
Please Help me
Thanks
<div id="arrowBox" style="display:none;">Some
Now i want to change display block of arrowBox div when select some text in myDiv..
Please Help me
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
here is a solution with jQuery
https://jsfiddle.net/6w5goer3/
html
js
* you can also use focus / keydown / keypress / click instead of keyup
https://jsfiddle.net/6w5goer3/
html
<div id="myDiv" contenteditable="true">
Name: <input>
Password: <input type=password>
</div>
<div id="arrowBox" style="display:none;">
<button>Cancel</button>
<button>Save</button>
</div>
js
$("#myDiv input").on("keyup", function() {
$("#arrowBox").show();
});
* you can also use focus / keydown / keypress / click instead of keyup
ASKER
thank you,
for solving my problem..
It's working correctly.
for solving my problem..
It's working correctly.
Include the follow JQuery code in the head section via script :
Open in new window
And thenOpen in new window