<div>select this<strong>dfdfdf</strong></div>
<div><span>something</span>select this<strong>dfdfdf</strong></div>
how do i use jquery or just javascript to select the value of the div tag but not include any child elements
//output
select this
|
I need to select an element based on its text in jQuery.
For instance:
<span>this text</span>
I know I can use .contains() to select based on text, but it's not exclusive.
I don't want to ... |
I have a contentEditable iframe with line numbers and text. The line numbers are contained in a div and all text is in a <pre>-element.
It looks like this:
<body>
<div id="line_numbers">
...
|
as said in the title
for example:
<input id="User_Type_0" type="radio" name="User_Type" value="1" checked="checked" />
<label for="User_Type_0">User1</label>
<input id="User_Type_1" type="radio" name="User_Type" value="2" />
<label for="User_Type_1">User2</label>
how can I get the text:User 1
|
Simple question which I can't find the answer to: how can I use JavaScript (or jQuery) to deselect any text which may be selected on a webpage? E.G. user clicks and ... |
In my web app the user can sometimes click the same button a number of times, skipping through messages and things, causing the </a> to be selected.
So how can I prevent ... |
I have been using the following code (with jQuery v1.4.2) to set the 'selected' attribute of a select list based on its 'text' description rather than its 'value':
$("#my-Select option[text=" + ...
|
|
I've got several select elements on a page e.g.
<select class="dd" id="dropdown1">
<option value="123">Option A</option>
<option value="234">Option B</option>
</select>
<select class="dd" id="dropdown2">
<option value="456">Option C</option>
</select>
etc ... |
I have a HTML document which llokes like this:
<div class="this_can_be_selected">Some text here</div>
<div>No text in the div above is selected</div>
<div class="this_can_be_selected">Some text here</div>
<div>No text in the div above is selected</div>
<div class="this_can_be_selected">Some text ...
|
I am making a HTML text editor.
For this,i have a div with contenteditable set to true.
For making a selected text "bold",i am trying to find node of the selected text.
How should ... |
For example :
<span id=1>this is my </span><span id=2>selected text</span><span id=3> but this is not selected</span>
I want to catch the list of span id of the text selected by user with jquery.
In ... |
I'm trying to get the text of some selected options from a select list with the jQuery.each function.
I select all selected options like this: $('#IdOfSelect option:selected')
This works just fine.
If I iterate ... |
I'm trying to insert form data through ajax and then get the ROW id of inserted data in order to lead the user to a new URL where he/she could see ... |
Possible Duplicate:
How to get selected text in textarea?
Are there any cross browser way to get just the selected text in a textarea? By selected ... |
Possible Duplicate:
How to know if the text in a textbox is selected?
Is there any way to check if user has selected text inside input ... |
Due to copyright laws and licensing agreements, I'm unable to allow copy+paste on certain parts of text we're displaying. So selecting is disabled and right click is disabled. It ... |
|
|
|
This table is editable, meaning I have an event to swap in a input box into the table cell. What I want is to keep the table contents unselectable (I have an excel like cell selection in place instead), but I need the input box text selectable, and for the life of me I cannot get it to work. ... |
|
Hey all, I have somewhat an issue in jquery i have a dropable content from one list to another easy enough, on dropping i dynamically create divs that are editable. So now i have a div and want to be able to highlight text and then click on a few buttons that give options such as Bold Underline and Italics. I ... |
|
Is there a particularly jQuery-ish way to determine if there is textselected on the screen? I've googled around for some code on thissubject, but I want to be sure that whatever I use is cross-browsercompatible. It's been my experience that if I let jQuery do the heavylifting for me, that my solutions are always compatible across themajor browsers.What I'm specifically needing ... |
|
|
|