开发者

panel.style.left in JQuery

开发者 https://www.devze.com 2023-02-17 05:59 出处:网络
I want to do this using jquery : panel.style.left = \'150px\' How can I do this ? I tried this: var panel = $(\'#Panel1\');

I want to do this using jquery :

 panel.style.left = '150px'

How can I do this ?

I tried this:

  var panel = $('#Panel1');
  panel.position().left = 150;

but开发者_如何学JAVA It didn't work


This is the way:

panel.css("left", 150);


Try: panel.css('left', '150px');

Check the docs on the .css() method.

0

精彩评论

暂无评论...
验证码 换一张
取 消