On 03.04.2012 09:29, Ben Stover wrote:
So if I code now:
$("div.myclass which contains blanks img").setAttribute('width', '200px');
$("div.myclass which contains blanks img").setAttribute('height', '40px');
it does not work.
First problem: The class name which contains blanks. How do specify it in the
command you suggested?
class names cannot contain whitespace, class="myclass which contains
blanks img" is actually a list of five classes "myclass", "which",
"contains", "blanks" and "img".
You could match with div[class="myclass which contains blanks img"] if
you have to abuse the class attribute like this :-)
Please consult the jQuery documentation for how to select elements and
apply changes, e.g http://api.jquery.com/attribute-equals-selector/ for
the selector above; there is nothing special about using Greasemonkey
here, the selectors and DOM manipulations work the same way.
--
Klaus Johannes Rusch
[email protected]
http://klausrusch.atmedia.net/
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.