Reputation: 17185
I am trying to display an html element, but it has to have the inline attribute. The second line in my code breaks the html page:
$('#add_existing_suggestion').fadeIn(100).show();
$('#add_existing_suggestion').css("display":"inline");
I saw on this forum that it worked for people: http://forum.jquery.com/topic/fadein-inline
Any way I can make the element get displayed inline?
Thanks!!
Upvotes: 0
Views: 73
Reputation: 5152
Your syntax is incorrect. The syntax for .css() is:
.css( propertyName )
.css( propertyName, value )
Change it to $('#add_existing_suggestion').css("display", "inline");
Upvotes: 1
Reputation: 69915
css
method take two arguments as string or a map containing key/value pair of styles. What you are doing will give a syntax error on the page and will break other js also. Try this
$('#add_existing_suggestion').css("display", "inline");
Upvotes: 3