Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Javascript – Assign attribute Re: Javascript – Assign attribute

#67212
noahgelman
Participant

Yeah, jQuery is pretty convenient for chaining things together.

A quick question though. if bzmillerboy simply wanted to set the attribute to 2 why go:

.attr("size", function() { return '2'; })

and simply not:

.attr("size", "2"})