Title: Error on gallery
Last modified: November 15, 2016

---

# Error on gallery

 *  [Luca](https://wordpress.org/support/users/045web/)
 * (@045web)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/error-on-gallery/)
 * Hi,
    hi have different gallery with different images, 1 gallery per page. In 
   one of this gallery only on iphone, there is this error:
 * TypeError: undefined is not an object (evaluating ‘$(this).data(‘size’).split’)
 * and the gallery doesn’t work.
    do you understand what could be the problem?
 * thanks best regards

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Luca](https://wordpress.org/support/users/045web/)
 * (@045web)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/error-on-gallery/#post-8439629)
 * Solution found!
    After a little modify in the code, i put the image title in 
   the <figcaption> tag
 * <figcaption class=”photoswipe-gallery-caption” >’. $image_title .'</figcaption
   >
 * What happnes: in mobile device, as iphone, if in the image title text there is
   a text like “100/120/130” o “10-15-40” the mobile browser transform this in
 * 100/120/130
 * ..it’s easy to understand that the gallery doesn’t work with this code inside
   the figcaption tag.
 * Best regards.
 *  Plugin Author [THRIVE – Web Design Gold Coast](https://wordpress.org/support/users/deanoakley/)
 * (@deanoakley)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/error-on-gallery/#post-8440883)
 * Good to hear 🙂
 *  [Shubham Rajdhar](https://wordpress.org/support/users/ishubhamraj/)
 * (@ishubhamraj)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-on-gallery/#post-8493384)
 * [@045web](https://wordpress.org/support/users/045web/) Thank you! 🙂 Was having
   similar problem.
    Was trying to use anchor links in caption. Edited the main 
   php file of plugin and put the $image_title in figcaption. Now thumbnails show
   image title and when image opened in lightbox, shows the caption(with achor link).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error on gallery’ is closed to new replies.

 * ![](https://ps.w.org/photoswipe-masonry/assets/icon-128x128.png?rev=3464802)
 * [Photoswipe Masonry Gallery](https://wordpress.org/plugins/photoswipe-masonry/)
 * [Support Threads](https://wordpress.org/support/plugin/photoswipe-masonry/)
 * [Active Topics](https://wordpress.org/support/plugin/photoswipe-masonry/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/photoswipe-masonry/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/photoswipe-masonry/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Shubham Rajdhar](https://wordpress.org/support/users/ishubhamraj/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/error-on-gallery/#post-8493384)
 * Status: not resolved