Ajax-Include-Pattern
Ajax-Include-Pattern copied to clipboard
Possible to handle media queries with a class or id and not attributes inline?
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.