Top "Attributes" questions

The attributes tag should be used for any issues relating to a property of an object, element, or file, etc.

Specify multiple attribute selectors in CSS

What is the syntax for doing something like: input[name="Sex" AND value="M"] Basically, I want to select the …

css attributes css-selectors
AttributeError: can't set attribute in python

Here is my code N = namedtuple("N", ['ind', 'set', 'v']) def solve() items=[] stack=[] R = set(range(0,8)) for i in …

python attributes
Unable to set data attribute using jQuery Data() API

I've got the following field on an MVC view: @Html.TextBoxFor(model => model.Course.Title, new { data_helptext = "Old …

jquery model-view-controller attributes custom-data-attribute
Python function attributes - uses and abuses

Not many are aware of this feature, but Python's functions (and methods) can have attributes. Behold: >>> def …

python function attributes
Removing html5 required attribute with jQuery

Hi I would like to remove the 'required=""' attribute with jquery. <input type="text" id="edit-submitted-first-name" name="submitted[…

jquery attributes
CSS values using HTML5 data attribute

width: attr(data-width); I want to know if there's any way it's possible to set a css value using HTML5…

css html attributes
Get list of data-* attributes using javascript / jQuery

Given an arbitrary HTML element with zero or more data-* attributes, how can one retrieve a list of key-value pairs …

javascript jquery html attributes
Getting the User Agent with JavaScript

I'd like to get a script that can grab the user's user agent and prop it to an attribute. I'm …

javascript jquery attributes user-agent prop
When to use setAttribute vs .attribute= in JavaScript?

Has a best-practice around using setAttribute instead of the dot (.) attribute notation been developed? E.g.: myObj.setAttribute("className", "nameOfClass"); …

javascript attributes setattribute
How do I pass multiple attributes into an Angular.js attribute directive?

I have an attribute directive restricted as follows: restrict: "A" I need to pass in two attributes; a number and …

javascript parameters angularjs attributes directive