{"id":1173890,"date":"2016-10-07T13:32:32","date_gmt":"2016-10-07T20:32:32","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/"},"modified":"2016-10-07T13:32:32","modified_gmt":"2016-10-07T20:32:32","slug":"photo-view-masonry-doesnt-work-on-ios","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/","title":{"rendered":"Photo View Masonry Doesn&#039;t Work on iOS"},"content":{"rendered":"<p>Hello,<\/p>\n<p>On photo view on iOS, the tiles don&#8217;t seem to be arranging properly. I added some JavaScript that resizes the tiles when the screen resizes, as this was not happening automatically.  However, unlike on desktop, the newly-resized tiles are not pushing the other ones out of the way.  The attached screenshot is of an iPad Retina running iOS 9.3 in the simulator.  You can see the highlighted element, which has been resized but is failing to push the other element out of the way. You can also see that the elements were not automatically aligned correctly.<\/p>\n<p>In private browsing mode, this error also occurs, but I get the following additional error message when I rotate the screen:<br \/>\n<code>$().isotope(&quot;reLayout&quot;) is not a valid method<\/code><\/p>\n<p>Here is the code I&#8217;m using to resize on changes to the screen size:<\/p>\n<pre><code>\njQuery(window).resize(function() {\n  if(this.resizeTO) clearTimeout(this.resizeTO);\n  this.resizeTO = setTimeout(function() {\n      jQuery(this).trigger(&#039;resizeEnd&#039;);\n}, 20);\n});\n\nvar resize = function() {\n  var max = 0;\n  var tiles = jQuery(&#039;.tribe-events-event-details.tribe-clearfix&#039;);\n\n  tiles.map(function(i, e) {\n    var height = jQuery(e).height(&#039;auto&#039;).height();\n    if (height &gt; max) {\n      max = height;\n    }\n    return e;\n  }).map(function(i, e) {\n    jQuery(e).height(max);\n  });\n};\n\n\/\/ on resize end event, resize tiles to size of max\njQuery(window).bind(&#039;resizeEnd&#039;, resize)\n\n\/\/ trigger event once\njQuery(resize);\n\n\/\/ also resize after ajax event (i.e. retrieving new tiles)\njQuery(document).ajaxComplete(function(event, xhr, settings) {\n  resize();\n});\n<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-1173890","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Photo View Masonry Doesn&#039;t Work on iOS -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Photo View Masonry Doesn&#039;t Work on iOS -\" \/>\n<meta property=\"og:description\" content=\"Hello, On photo view on iOS, the tiles don&#8217;t seem to be arranging properly. I added some JavaScript that resizes the tiles when the screen resizes, as this was not happening automatically. However, unlike on desktop, the newly-resized tiles are not pushing the other ones out of the way. The attached screenshot is of an [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/\",\"name\":\"Photo View Masonry Doesn&#039;t Work on iOS -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-10-07T20:32:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Photo View Masonry Doesn&#039;t Work on iOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Photo View Masonry Doesn&#039;t Work on iOS -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/","og_locale":"en_US","og_type":"article","og_title":"Photo View Masonry Doesn&#039;t Work on iOS -","og_description":"Hello, On photo view on iOS, the tiles don&#8217;t seem to be arranging properly. I added some JavaScript that resizes the tiles when the screen resizes, as this was not happening automatically. However, unlike on desktop, the newly-resized tiles are not pushing the other ones out of the way. The attached screenshot is of an [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/","name":"Photo View Masonry Doesn&#039;t Work on iOS -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-10-07T20:32:32+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/photo-view-masonry-doesnt-work-on-ios\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Photo View Masonry Doesn&#039;t Work on iOS"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1173890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1173890\/revisions"}],"predecessor-version":[{"id":1174351,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1173890\/revisions\/1174351"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1173890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}