Search code examples
jqueryfotorama

Using different data-attribute values for different resolutions in the fotorama plugin


I am looking for a way to change the data-attributes according to the resolution, for example, use a smaller data-min-height for smaller resolutions.

How can this be achieved? Thanks for your time!


Solution

  • You can use .data() along with $(document).height() or $(window).height():

     $('selector').data('min-height',$(document).height());