Answer the question
In order to leave comments, you need to log in
How to call a function using different events on bold text?
For example, when clicking on bold text (i.e., one that is framed by <b></b>
tags), this works:
$('#content').on('click', 'b', function() { alert("Вы кликнули на жирном тексте") });
Answer the question
In order to leave comments, you need to log in
The select event is sent to an element when the user makes a text selection inside it. This event is limited to<input type="text">
fields and<textarea>
boxes.
$('#content b').live('click', function() { alert("You clicked on bold text") });
Interest Ask. Not a complete solution, but it will help to find: Fiddle , where they determine the position of the cursor in an editable element with html tags.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question