<div id="container1">
<span>...</span>
</div>
<div id="container2">
<span>...</span>
</div>
Say if I have get the jQuery object $('container1'),how to find the <span> in it?
|
I'm wanting to select some DOM elements using jQuery, modify some attributes, and then write the DOM elements back out as xhtml snippets for post processing. I want the resulting ... |
I have the following selector
$('#navigation ul li a').click(function(evt) {}
this get the elements i need, but also retries child elements.
ie i get me this as well
#navigation ul li li a ...
|
I'm trying to select the inner value of the first sibling - using jQuery - in an environment where I cannot alter the html markup.
I have the following:
<tr>
...
|
eg. [I've removed attributes, but it's a bit of auto-generated html]
<img class="p"/>
<div> hello world
<p>
...
|
I want to be able to search for a substring inside the href's in the below code and select the link AFTER the selected string. So, for example the string "page=2" ... |
I'd like to be able to run a search for the copyright, reg and tm symbols that were pasted in along with copy from something like Word and replace them with ... |
|
Is it possible, in either the jQuery API or the DOM, to check if an element exists on the page or not?
Consider these two variables:
var selected = $('span#mySpan');
var created = $('<span ...
|
I have a DOM element C which is a descendant of DOM element A. There are several layers between them, one of which is an class of element named B.
If ... |
Does anyone know how to select any element (possibly on click) on page like body is selected, div is selected, div#foo etc... so i can place it to some variable and ... |
I have a jQuery selection that either originated as a newly created element (e.g. $("<div/>")) and has no parent, or is actually an element in the DOM.
What's the most efficient way ... |
Which is better to use and why?
if ($(target).parents('div#test').length) {
or
var target = $(evt.target);
if (target.parents('div#test').length){
|
I'm trying to load just a portion of the resulting html file into a particular div. This one supposedly should work. Can't get anything to work. Any help appreciated.
... |
Is there any good way to see/debug the result of a jQuery selector ?
Let's say we have something like this
var arr = $('div > span').parent();
How can I see what the selector ... |
Imagine, for a moment
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
As well as another identical select box
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
...
|
Without using jQuery, what is the most efficient way to select all dom elements that have a certain data- attribute (let's say data-foo). The elements may be different tag elements.
<p ...
|
I'd like to do this simply without saving the starting value of the select in an object.
if i have (when i load the dom):
<select>
<option value='1' selected>one</option>
<option value='2' ...
|
I have a jQuery statement as;
$("a[target="+iframeId+"]").attr("href", url);
What is the best way to write this in normal Javascript DOM such that the perofrmance is not affected much?
|
|
|
|
Hi, I have a javascript tool in which I can supply a listener function, which has the parameter 'div', which is a dom element. Now I would like to apply $('a.enlargement').fancyzoom({Speed:0,showoverlay:true}); to that div, but I only have the reference. I know about the 'find' function, but that can only be run on a selection object. So how can I do ... |
Problems with correct selecting in DOM in Using jQuery 1 year ago Hi, I am one of the newbies and just started with jQuery (in Drupal CMS).I have menu which I want to foldout when hovering over the parent element. The code is generated by Drupal CMS, so my idea was to use jQuery to hang ... |