Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress; How use jQuery plugin in the header?
    primarykey
    data
    text
    <p>The error i receive: uncaught TypeError: Object [object Object] has no method 'sticky'</p> <p>I'm transferring a website, I've made into Wordpress. The site is using a sticky header plugin. Situation is that the jquery handler doesn't work. I've tryed no-conflict and placing the code in a file named function.php. Could anyone pinpoint some good methods? it seems a little unnecassary to put that less code in a seperated file.</p> <p>many thanks in advance :)</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html &lt;?php language_attributes(); ?&gt;&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="&lt;?php bloginfo('HTML_type');?&gt;" charset="&lt;?php bloginfo( 'charset' ); ?&gt;" /&gt; &lt;title&gt; &lt;?php wp_title('Het blinde konijn', true, 'rights'); ?&gt; &lt;?php bloginfo('name');?&gt; &lt;/title&gt; &lt;link rel="stylesheet" href="&lt;?php bloginfo( 'stylesheet_url'); ?&gt;" type="text/css" media="screen" /&gt; &lt;?php wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false); wp_enqueue_script('jquery'); ?&gt; &lt;?php wp_enqueue_script('stickyheader', get_template_directory_uri() . '/js/jquery-sticky.js', array('jquery')); ?&gt; &lt;?php wp_head(); ?&gt; &lt;script type="text/javascript"&gt; var $j = jQuery.noConflict(); $j(document).ready(function(){ $j("#header").sticky({topSpacing:0}); resizeWindow(); $j(window).bind("resize", resizeWindow); function resizeWindow(e) { contentHeight = $j(window).height() - $j("#header").height(); $j(".zebra li").css("max-height", contentHeight); } }); &lt;/script&gt; &lt;/head&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload