I am trying to formulate a selector to select a set of visible elements. Our application uses the Prototype JavaScript framework, version 1.6.0.3.
The markup I'm working with is as follows:
<ul>
<li ...
|
What's the easiest way to find Dom elements with a css selector, without using a library?
function select( selector ) {
return [ /* some magic here please :) */ ]
};
select('body')[0] // ...
|
For example, I want to make two textboxes have the same style when either is focused:
<div class="divTxt">
<input type="text" id="a" class="a" />
<input type="text" id="b" ...
|
This is the structure of HTML. I have to add an event listener when user click on div with className "next_button". I try to add an event listener by using prototype. ... |
I use MooTools, and I need to find the element which has both classes "a" and "b" (the innermost div in my example below).
The HTML structure is:
<div class="a">
<div ...
|
Can anyone give me details on each?
for example?
Is #ID an attribute or property or selector or anchor?
Is default property and default attributes are different thing?
Are all these Tags or elements?
What we ... |
How can i find this span element with class="rocon.rocon-br" in #conttile2 by Mootools' Css Selector? This element is created dynamically by Javascript (rounded corner), so this is what i see in ... |
|
For example I have a css style like this :
input.validation-passed {border: 1px solid #00CC00; color : #000;}
The javascript validation framework I use will inject every input tag ... |
Is there a way to select all elements that have a given style using JavaScript?
Eg, I want all absolutely positioned elements on a page.
I would assume it is easier to find ... |
I wrote a comparison validator, that compares two inputs values.
Originally in tried using the primary input's name attribute to store the secondary inputs id.
//example: does not work in IE7
<input id='txtPrimary' type='text' ...
|
I am moving from jQuery to MooTools (for the fun..) and I have this line of code :
$subMenus = $headMenu.find('li ul.sub_menu:visible');
How I can write this in mootools?
I know that I ... |
I got this function to get a cssPath :
var cssPath = function (el) {
var path = [];
while (
(el.nodeName.toLowerCase() != 'html') &&
...
|
Is it possible to change a CSS pseudo-element style via JavaScript?
For example, I want to dynamically set the color of the scrollbar like so:
document.querySelector("#editor::-webkit-scrollbar-thumb:vertical").style.background = localStorage.getItem("Color");
and I also want to be ... |
tl;dr: need DOM path or CSS selector for a element in a page, post-render. The element doesnt have a ID or a unique class.
details:
Im trying to modify a page through javascript/css ... |
Using MooTools,is it possible to select elements generated using the css pseudo-selectors ':before' and ':after'? Specifically, I'm defining the element below, and trying to adjust its height with javascript, but I ... |
Searching downwards from a given node works wonderfully and crossbrowser-compatible with Javascript functions querySelectorAll() and querySelector().
This functions allow to state any CSS3 selector for searching child elements. As far as I ... |
I'm trying to attach a mouseover event to all img elements of a gallery in a page (using Mootools). This is easy enough using something like
$$('img.mygalleryclass').addEvents({
mouseover: function(){
alert(id);
...
|
For example, if I have a snippet of a document:
<div> <!-- I have a reference to this: "outerDiv". -->
<p> <!-- This is the <p> I want to select. -->
...
|
So I've been work on a CSS selector engine, and I want to support pseudo-elements (::before, ::after, ::selection, ::first-line, etc). I noticed Slick, Sizzle, and some other popular engines ... |
I'm new to Mootools and I'm stuck on the following problem.
I have this ul based menu.
<ul class="moo_mmenu">
<li>
<a href="#">
...
|
I'm writing an application where I am storing relative references to elements as a CSS selector suitable for passing into querySelector. When I want to store a relative reference to ... |
I've been using CSS3 selectors to select specific elements based on their attributes, although today, I have programmed myself into a corner, where I need a select a specific element based ... |
So, I'm going to attempt to create a method for getting elements using a CSS selector. I'm starting with some basics - single selectors like #id, .class, and tag - descendant selectors like #id .class tag - combined selectors like #id.class - and group selectors like #id, .class, tag. My question has to do with selectors like "tag#id" or "#id1 #id2" ... |