When loading a page, I am implementing CSS transitions to display animated lines. To activate these lines, I am utilizing a jQuery script to change the class on the line elements.
I am looking to reverse the CSS transitions when transitioning to the next page. Currently, the lines draw up on pageload, but for the next page, I want them to draw out before drawing them in again. This might require using something like AJAX to load pages seamlessly and ensure smooth transitions between pages from the start.
Demo:
HTML:
<html lang="en" class="noTouch">
<!-- META DATA -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
...
</code></pre>
<p>CSS: </p>
<pre><code>.h-line {
...
}
...
$(function () {
$('.v-line, .h-line').addClass('ready');
});