res.php file and their absence may cause issues within the framework.
Jquery over other libraries and some of the helper functions and plugins depend on it.
While some of these are discussed under integerations below, you can learn more from here. @res(':headers') or
@load('headers') template directives. Learn more from here. data-src. If the data-src attribute is added to any html element, then lazy-loading is applied to that element. The
data-src can be applied in this way:
<img data-src="http://site.com/some-image.jpg" >
<div data-src="http://site.com/some-image.jpg" ></div>
img and div class will be resolved differently into the code below respectively.
<img src="http://site.com/some-image.jpg" data-src="http://site.com/some-image.jpg" >
<div style="background-image:url('http://site.com/some-image.jpg')" data-src="http://site.com/some-image.jpg"></div>
div elements are assigned a backround-image css property while
img elements are assigned the src attribute. If we are working within our template files, we can also apply the
domurl() directive to assign a url value to the href attribute.
data-scroll and data-scroll-hash attributes.
These attributes helps to scroll to an element having an id attribute value that matches the supplied value of these attributes.
Since the data-scroll-hash attibute performs both the function of data-scroll and even more extended features,
this attribute alone will be discussed. The only major difference between these two attributes is that data-scroll-hash
works for the current page hash as an extended feature. Other relative attributes that can be applied on these attributes are data-plus
, data-minus which are used for adding or subtracting from target scroll point. There is also the data-delay which set a timeout
before the scroll is executed.
Test URL: https://some-site.com#someid Test Button: <button data-scroll-hash>click btn</button> Target HTML Element: <div id="someid"></div>
"someid"
will be obtained. Once this is done, then the page will
scroll to div element because it has a value id="someid"
Test URL: https://some-site.com#someid Test Button: <a href="#newhash" data-scroll-hash>click link</a> Target HTML Element: <div id="newhash"></div>
newhash. Once this is done, the new hash
string will be used as the target id of the element to be scrolled to.
Test URL: https://some-site.com#someid Test Link Button: <a href="#someid" data-scroll-hash="someid">click link</a> Target HTML Element: <div id="someid"></div> Target Script: <script id="someid"> hashRunner('data-scroll-hash'); </script>
hashRunner()
function will re-scroll back to that div element. This might be useful to help a user return back to the target element once the page is reloaded.