2 Replies - 1062 Views - Last Post: 20 February 2010 - 10:41 AM

#1 xheartonfire43x   User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 454
  • Joined: 22-December 08

jQuery CSS Manipulation not working

Post icon  Posted 27 January 2010 - 12:29 PM

So I have some jQuery that should resize a piece of my page to by setting CSS: width:100%. When I try to run it in firebug I get an error: missing : after property id

Here is my code:
<script type="text/javascript">
	$(document).ready({
		$("#bodyContent").css("width","100%");
	});
</script>


Is This A Good Question/Topic? 0
  • +

Replies To: jQuery CSS Manipulation not working

#2 Zichlone   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 13-August 08

Re: jQuery CSS Manipulation not working

Posted 20 February 2010 - 09:37 AM

I hate doing the css like that try

 
  <script type="text/javascript">
        $(document).ready({
                $("#bodyContent").css({width:$(window).width()});
        });
</script>


This post has been edited by Zichlone: 20 February 2010 - 09:45 AM

Was This Post Helpful? 0
  • +
  • -

#3 xheartonfire43x   User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 454
  • Joined: 22-December 08

Re: jQuery CSS Manipulation not working

Posted 20 February 2010 - 10:41 AM

Okay thank you. It isn't the window's width I need it to be though it is another div wrapper that is there but I know how to change it to that. that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1