selector « element « Javascript HTML CSS Q&A

Home
Javascript HTML CSS Q&A
1.animation
2.audio
3.background
4.browser
5.button
6.canvas
7.checkbox
8.Cookie
9.Development
10.DIV
11.dom
12.dropdown
13.editor
14.element
15.Event
16.Firefox
17.flash
18.font
19.Form
20.frame
21.hide
22.hyperlink
23.IE
24.iframe
25.image
26.innerHTML
27.json
28.layout
29.Library
30.localStorage
31.Menu
32.mobile
33.onclick
34.popup
35.Render
36.scroll
37.scrollbar
38.svg
39.tab
40.table
41.tag
42.text
43.TextArea
44.TextBox
45.validation
46.video
47.window
48.xml
Javascript HTML CSS Q&A » element » selector 

1. PrototypeJS: Selecting visible elements    stackoverflow.com

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 ...

2. Best way to find DOM elements with css selectors    stackoverflow.com

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] // ...

3. Could it be possible to make css selector affect other elements in the page without javascript?    stackoverflow.com

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" ...

4. Help registering an event listener on an element    stackoverflow.com

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. ...

5. Mootools - selecting a DOM element by its classes    stackoverflow.com

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 ...

6. Syntax vs Element vs Tag vs attributes vs property vs selector?    stackoverflow.com

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 ...

7. How to find an element using CSS2 Selector in Motoools and hide it?    stackoverflow.com

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 ...

8. How to let css selector exclude an element?    stackoverflow.com

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 ...

9. Select Element By CSS style (all with given style)    stackoverflow.com

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 ...

10. Are there any known issues with putting invalid CSS characters (@,:,!) in the class attribute of a HTML element?    stackoverflow.com

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' ...

11. Getting all visible elements using MooTools    stackoverflow.com


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 ...

12. Get CSS path from Dom element    stackoverflow.com

I got this function to get a cssPath :

var cssPath = function (el) {
  var path = [];

  while (
    (el.nodeName.toLowerCase() != 'html') && 
  ...

13. Changing CSS pseudo-element styles via JavaScript    stackoverflow.com

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 ...

14. Get element's CSS Selector (without element id)    stackoverflow.com

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 ...

15. selecting pseudo-elements with mootools    stackoverflow.com

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 ...

16. JavaScript for Searching an Element's Specific Ancestor Like in XPath?    stackoverflow.com

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 ...

17. accessing element attributes with mootools selector    stackoverflow.com

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);
 ...

18. Is there a way to have querySelectorAll search only the children of an element, and not all descendants?    stackoverflow.com

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. -->
 ...

19. Javascript find pseudo elements    stackoverflow.com

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 ...

20. How do I select elements from the DOM using Mootools?    stackoverflow.com

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="#">
  ...

21. Identity selector for element.querySelector?    stackoverflow.com

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 ...

22. Selecting a CSS element by attribute(s) [plural!]    stackoverflow.com

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 ...

23. Get Elements by CSS selector question...    sitepoint.com

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" ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.