Ajax-Include-Pattern icon indicating copy to clipboard operation
Ajax-Include-Pattern copied to clipboard

Possible to handle media queries with a class or id and not attributes inline?

Open o-l-e opened this issue 13 years ago • 0 comments

Hi, this is a newbie question i am sure :)

My question is related to the demo /media.html basically if it is possible to not define the breakpoints inline?

Is there any way to define certain breakpoints on the whole document for an element that has a class, for example if an h2 has a class of .mobile instead of data-media="(max-width: 500px)": Like this:

  <h2 class="mobile"  data-after="html/links.html">
        <a href="html/links.html">Related External Links</a>
  </h2>

And then in the script blow, all elements with a ".mobile" class has data-media="(max-width: 500px)" before the $( "[data-after]" ).ajaxInclude(); kicks in.

Pardon me for the way of explaining, as you can tell i am not an expert at this :) Hope you can send me in the right direction.

Thanks.

o-l-e avatar Nov 11 '12 14:11 o-l-e