I've implemented JavaScript on wordpress and it only works after i re-size the window from the original size to a different size then back to the original size. I don't understand why it just doesn't work from the start?
Here is the script in the head
<script type="text/javascript" src="/wp-content/themes/dw-minion/assets/css/jstick/jquery.js"></script>
<script type="text/javascript" src="/wp-content/themes/dw-minion/assets/css/jstick/jquery.stickem.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.container').stickem();
});
</script>
The place the script is used in content.php inside the body
<div class="container">
<div class="row stickem-container">
<div class="content">
<div class="entry-content">
<a href="<?php the_permalink(); ?>"><?php the_content(); ?></a>
</div>
</div>
<div class="aside stickem">
<div class="sharepinterest">
<?php echo get_simple_local_avatar( $id_or_email, $size, $default, $alt ); ?>
</div>
</div>
</div>
</div>