tagged [element]

Copying Code from Inspect Element in Google Chrome

Copying Code from Inspect Element in Google Chrome I'm currently developing a website in HTML and I want to copy some of the code from other websites. However when I go into the inspect element featur...

25 Sep at 04:32

Access multiple elements of list knowing their index

Access multiple elements of list knowing their index I need to choose some elements from the given list, knowing their index. Let say I would like to create a new list, which contains element with ind...

Skipping every other element after the first

Skipping every other element after the first I have the general idea of how to do this in Java, but I am learning Python and not sure how to do it. I need to implement a function that returns a list c...

14 Jan at 22:29

Number of elements in a javascript object

Number of elements in a javascript object Is there a way to get (from somewhere) the number of elements in a Javascript object?? (i.e. constant-time complexity). I can't find a property or method that...

Setting default selected option for Zend_Form_Element_Select

Setting default selected option for Zend_Form_Element_Select > [Zend Framework - Set 'selected' value in select box dropdown list](https://stackoverflow.com/questions/1588272/zend-framework-set-selec...

CSS :not(:last-child):after selector

CSS :not(:last-child):after selector I have a list of elements, which are styled like this: Outputs `One | Two | Three | Four | Five |` instea

20 Jan at 22:7

Get element type with jQuery

Get element type with jQuery Is it possible, using jQuery, to find out the type of an element with jQuery? For example, is the element a div, span, select, or input? For example, if I am trying to loa...

5 Dec at 17:54

What's the best way to loop through a set of elements in JavaScript?

What's the best way to loop through a set of elements in JavaScript? In the past and with most my current projects I tend to use a for loop like this: ``` var elements = document.getElementsByTagName(...

1 Oct at 11:57

Check if one list contains element from the other

Check if one list contains element from the other I have two lists with different objects in them. I want to check if element from list1 exists in list2, based on specific attribute (Object1 and Objec...

3 Aug at 13:21

CSS pseudo elements in React

CSS pseudo elements in React I'm building [React](https://reactjs.org/) components. I have added CSS inline in the components as suggested in [this brilliant presentation](https://speakerdeck.com/vjeu...

20 Jun at 21:30

Changing CSS pseudo-element styles via JavaScript

Changing CSS pseudo-element styles via JavaScript 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: and I a...

selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element:

selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: I'm trying to automatically generate lots of users on the webpage kahoot.it using selenium to make them appear in ...

9 Sep at 10:57

Get multiple elements by Id

Get multiple elements by Id I have a page with anchor tags throughout the body like this: The ID is always the same but the name changes. I need to populate a list of the names of these anchor tags, f...

14 Jun at 00:19

Match elements between 2 collections with Linq in c#

Match elements between 2 collections with Linq in c# i have a question about how to do a common programming task in linq. lets say we have do different collections or arrays. What i would like to do i...

25 Jan at 02:3

Using :before CSS pseudo element to add image to modal

Using :before CSS pseudo element to add image to modal I have a CSS class `Modal` which is absolutely positioned, z-indexed above it's parent, and nicely positioned with JQuery. I want to add a caret ...

12 Jul at 17:46

Set element width or height in Standards Mode

Set element width or height in Standards Mode Is it possible to set width or height of HTML element (ex. ``) in JavaScript in Standards Mode? Note the following code: ``` function changeWidth(){ ...

jquery find element by specific class when element has multiple classes

jquery find element by specific class when element has multiple classes So I am working on something that wasn't well thought out in the build from the backend team. That leaves me with a document ful...

28 Sep at 18:51

Android ListView with onClick items

Android ListView with onClick items I'm a new programmer and new in Android. I'm using this example [http://www.androidhive.info/2012/09/android-adding-search-functionality-to-listview/](http://www.an...

Can I use a :before or :after pseudo-element on an input field?

Can I use a :before or :after pseudo-element on an input field? I am trying to use the `:after` CSS pseudo-element on an `input` field, but it does not work. If I use it with a `span`, it works OK. Th...

14 Nov at 04:16

list elements by activity

list elements by activity I'm working on automated builds and need to be able to list elements that were worked on under particular activities. I'm new to ClearCase so I apologise for naiivety ... My ...

Combine :after with :hover

Combine :after with :hover I want to combine `:after` with `:hover` in CSS (or any other pseudo selector). I basically have a list and the item with the `selected` class has an arrow shape applied usi...

9 Jun at 08:34

ArrayList-style indexOf for std::vector in c++?

ArrayList-style indexOf for std::vector in c++? i'm coming into C++ from Java, and have a common design situation in which i have an element (a non-primitive) that i'd like to remove from a std::vecto...

22 Nov at 00:28

Counting the occurrences / frequency of array elements

Counting the occurrences / frequency of array elements In Javascript, I'm trying to take an initial array of number values and count the elements inside it. Ideally, the result would be two new arrays...

2 Jun at 08:50

Can I change the height of an image in CSS :before/:after pseudo-elements?

Can I change the height of an image in CSS :before/:after pseudo-elements? Suppose I want to decorate links to certain file types using an image. I could declare my links as then have CSS like Now, th...

23 Jan at 21:9

How to return a specific element of an array?

How to return a specific element of an array? I want to return odd numbers of an array yet Eclipse doesn't seem to accept my return `array[i];` code. I think it requires returning a whole array since ...

15 Oct at 09:11