I am working on jQuery mouseleave event here I have ckeditor I need to show ckeditor when I enter the mouse and need to fire when mouse leave here I had done that when mouse entered it showing its working and in ckeditor writing some text and when applying some color it firing means the colors opening in some div I think so but I need to fire it once mouse or of div please check it once
Here is my code:
<script type="text/javascript">
$(document).ready(function () {
$('#btndiv1').hide();
$('#btndiv').hover(function () {
$('#btndiv1').show();
});
});
</script>
<script type="text/javascript">
$(document).ready(function () {
var editor = CKEDITOR.editor.replace('editor1');
$('#btndiv').mouseleave(function (event) {
$('#btndiv1').hide("slow");
alert(1);
var value = editor.getData();
alert(value);
$('#btndiv').append(value);
});
});
</script>
and here my div
<h4>design your own text</h4>
<div id="btndiv" >
<div id="btndiv1" style="height:auto;width:auto; border:solid 1px;">
<textarea rows="10" id="editor1" "></textarea>
<p id="text" ></p>
</div>
</div>
Here it's working I am having only problem is when opening for applying some color or for heading it's opening sode div k the its firing means it become hidden.
But I need to hide it once mouse moves out of div any help appriciated
Thanks in advance