I have seen many demos of the jqgrid and all show the grid at the top left corner of the browser. I 开发者_如何学Pythonneed to display it in different locations hopefully within my own divs but I can not get it to work no matter what I try. I have read it gets wrapped into other div so I even tried to move them unsucessfully.
Example:
<div id='draggable2' style='position:absolute; top:100; left:500; background:blue'>
<table id="list2" class='scroll' style='position:absolute; top:100; left:100'>
<tr><td/></tr>
</table>
<div id="pager" style='background:cyan'></div>
</div>
Then in loadComplete: function
$('#list2').attr('left','100px');
$('#list2').attr('top','100px');
$('#draggable2').attr('left','100px');
$('#draggable2').attr('top','100px');
$('#gview_list2').attr('left','100px');
$('#gview_list2').attr('top','100px');
Any hints are greatly appreciated Thanks
has nothing to do with jqgrid. You don't need the jQuery to modify. You forgot your units in the html. 100 what? Change "top:100" to "top:100px" and the initial position works just fine.
you can toy with it here: http://jsfiddle.net/cszkE/2/
just change the style values then hit 'run'
精彩评论