JQuery.show () and mapping: inline

Hello, I am using this jquery code to onclick="jQuery('.hidden').show()" show a class that says .hidden is a class that looks like this:

.hidden { display:none}

the problem is when it displays the class on its screen: block; I would like it to display it as display: inline; thus, it is on the same line as the text that precedes. any help would be appreciated crazy. I searched for almost everything connected with it, but nothing led me to the right path.

+5
source share
2 answers

you can add an explicit css attribute to the element:

onclick="jQuery('.hidden').css('display','inline');"

try this, i hope this helps :)

+4
source

, / .hidden , , , css.inline css /, . html, , , .

+4

All Articles