jquery-masonry

Find targets position after isotope positioning

 ̄綄美尐妖づ 提交于 2019-12-04 14:37:30
I'm using David Desandros Isotope for a new site, but now it seems I'm unable to find each elements position using jquery. Specifically I'm trying to attach a tooltip on hover, but generally I'd like to know how to get the position() of each anchor after Isotope has formatted them. As of now each element displays a '0' for left, margin-left, position().left, and every other positioning property I could think of. See Isotope docs for itemPositionDataEnabled $('#container').isotope({ itemSelector: '.element', itemPositionDataEnabled: true }) // log position of each item .find('.element').each

How to get Isotope working with dynamic DOM nodes?

烂漫一生 提交于 2019-12-04 13:58:02
I the context of Backbone views, I add and remove views in the DOM. However, the container that contains Isotope elements only works during the initial load; after that, when the container is removed, and added again, Isotope is not working as expected. I did quick JSfiddle here: http://jsfiddle.net/mulderp/T8aSQ/6/ --> When I add the Isotope container: var list = '<div data-foo="bar" id="container"><div class="item red"></div><div class="item blue"></div></div>'; $container.html(list); $container.isotope('shuffle'); Isotope is not running anymore, although the DOM structure would look similar

Why my site lost its grid layout alignment. It's made with masonry

不想你离开。 提交于 2019-12-04 13:27:55
问题 I created a gallery page. It displays images with variable heights. As suggested here to use a masonry plugin i used masonry plugin. It worked great till last night. But this morning when i checked it again i lost the alignment. No alterations done to the site since past 3 days. Here is the snapshot. Earlier , all div's are automatically adjusted(The marked spaces were eliminated) and the display looked like http://pinterest.com/ But all of a sudden my site lost its alignment. Unable to

Masonry - imagesLoaded - Not a function

拈花ヽ惹草 提交于 2019-12-04 11:44:53
Masonry and imagesLoaded should be loaded and work correctly. A similar site has been made, and there it works correctly. I have no idea where my problem is, so I am hoping that you maybe see the problem. There should be something missing. In Chrome Inspect I get the following error: Uncaught TypeError: $(...).imagesLoaded is not a function By what I have understood this means that .imagesLoaded and Masonry should be correctly loaded? Else I would have recieved the error $container.imagesLoaded is not a function ? What I have tried Checking if jquery-2.1.4.min.js is properly loaded Changing

Nesting Masonry objects

风格不统一 提交于 2019-12-04 11:09:51
I am trying to create a graph view using containers. So if: [A's -> B's -> C's] the view would show an objects c inside of Bs which are inside of As. Something like this: I think a masonry view is perfect for this but I can't get the nesting to work right. Fiddle of what I have so far: http://jsfiddle.net/paulocoelho/5SxQ5/4/ I don't get why they are not alining. I also tried using CSS's column-count and column-gap but found the rendering to be extremely buggy. Fiddle code coz I must... var $container = $('.container'); $container.masonry({ /*columnWidth: 200,*/ itemSelector: '.eWrapper' });

Embedded tweets completion event?

痞子三分冷 提交于 2019-12-04 07:45:01
Using Twitter's embed code for single tweets causes a script called widget.js to be loaded. This script is responsible for dynamically generating the HTML of the tweet. Is there an event triggered by widget.js when the rendering of an embedded tweet is complete? How can my code find out that rendering is complete? I need this because I am trying to use jQuery Masonry to layout a set of tweets. Masonry fixes the container height for each tweet before the tweets are fully rendered, causing overlap. I'd like to be notified that all tweets are fully rendered in order to refresh the Masonry layout.

Masonry Plugin: Resizing div wont cause reshuffle

最后都变了- 提交于 2019-12-04 06:07:39
Have Masonry items wrapped in 1000px wide div, I have a button to resize the div to 2000x using jQuery's addClass() , problem is Masonry won't reshuffle the items to fill the extra 1000px space, I know the resize works because resizing the browser window causes a reshuffle. Masonry: $(function(){ $('#container').masonry({ // options itemSelector : '.item', columnWidth : 240 }); }); Button: $("a.button").toggle(function(){ $(this).addClass("flip"); $("div#container").fadeOut("fast", function() { $(this).fadeIn("fast").addClass("resize"); }); CSS: width: 1000px; /* default */ width: 2000px

jquery masonry image append

。_饼干妹妹 提交于 2019-12-04 05:18:41
问题 Good evening, I'm having an issue with Masonry. This is all my relevant code: var $test; var $iterator = 0; $(document).ready(function() { $("#demo-input").tokenInput("php-example.php" ,{ classes: { tokenList: "token-input-list-facebook", token: "token-input-token-facebook", tokenDelete: "token-input-delete-token-facebook", selectedToken: "token-input-selected-token-facebook", highlightedToken: "token-input-highlighted-token-facebook", dropdown: "token-input-dropdown-facebook", dropdownItem:

How to center Masonry Items?

允我心安 提交于 2019-12-04 03:43:55
I have set up masonry to display items as such: $('#list').masonry({ itemSelector: '.propitem', columnWidth: 230 }); This works, but all items ( .propitem ) float to the left. For example if my container #list is 600px wide there will be two columns to the left but a gap to the right of them where the remaining 140px is. I would like to center the 2 columns with a 70px 'margin' on either side. I have tried using css to centre these, but had no luck, eg: #list { text-align: center; } Would anyone know the correct way of achieving this? You need to use fitWidth (or, in older versions, isFitWidth

jquery masonry images are overlapping until a page resize is done

痞子三分冷 提交于 2019-12-03 17:04:36
问题 I've found this template that demonstrates the issue I'm having with jquery masonry and image layout. Take a look at this twitter bootstrap template page: The very first time the page is loaded all the images are stacked on each other until a page refresh or re-size is done. The images are then displayed correctly. Here is my HTML and jQuery that has the same problem: HTML <div class="gallery-masonry masonry" style="position: relative; min-height:100px; height: auto;"> <div id="loading"