mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 21:44:22 -04:00
Improves selectors.
This commit is contained in:
parent
ad845dbe66
commit
66e9dafaa5
6 changed files with 50 additions and 67 deletions
|
@ -29,7 +29,7 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c
|
|||
|
||||
var contentWidth = $('#content').width(),
|
||||
$view = $('#view'),
|
||||
itemWidth = ($view.hasClass('view-icons') || $view.hasClass('view-grid')) ? ($view.find('.item').eq(0).width() || 1) : 1;
|
||||
itemWidth = ($view.hasClass('view-icons') || $view.hasClass('view-grid')) ? ($view.find('.item').eq(0).outerWidth(true) || 1) : 1;
|
||||
|
||||
$view.width(Math.floor(contentWidth / itemWidth) * itemWidth);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue