-1

Is it possible insert more of one attributes in jQuery function with CSS? For me, it's necessary to insert more than one change in CSS.

For example, if I want change the width and height, I can do this:

<script>$(this).css("height","200");</script>

But if I want insert in the same width also and height?

I try do this with separated functions and works but inside no see examples for no need open new function each time

0

2 Answers 2

3

Yes :

$(this).css({ "height" : "200", "width" : "200" });

Specifically, look at this part of the documentation

Sign up to request clarification or add additional context in comments.

Comments

0

Read this documentation! This should give you a fair amount of resources.

http://api.jquery.com/css/

$(this).css({ "height" : x, "width" : y });

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.