Articles of jquery

Periodically getting jQuery “… is not a function” errors

I’ve been encountering a strange problem over the last week or 2 in that I keep periodically getting an TypeError: jQuery(…).fullpage is not a function error when trying to run a little script. This primarily happens in Firefox, although I have noticed it (Albeit only once or twice) in Chrome and I’m at a loss […]

How do i use this jquery script on a wordpress site?

I’ve been struggling with trying to set a jquery list file on a wordpress site. This is the script and html in a codepen: http://codepen.io/javve/pen/bBfgD My question is. The examples has html with scripts linked in. Can I copy the html to a custom page or do I need to set them in the header/footer, […]

Is there a restriction in WP on the use of jQuery load function?

I’m just trying to load a simple txt file for testing purposes. jQuery(document).ready(function(){ jQuery(“#buttonAjax”).click(function(){ jQuery(“#demo”).load(“demo.txt”); alert(‘inside jquery’); }); }); The code works because the alert works, but it doesn’t load demo.txt (Hello Im demo text). I tried one solution I found on SO and it doesn’t work either: jQuery(document).ready(function(){ jQuery(document).on(‘click’, ‘#buttonAjax’, function() { alert(“inside ajax”); […]

Add a row on clicking each post featured image

I have to add a row that (containing the content of post) below the post thumbnail on clicking thumbnail. I have done it by using this but it affects the adjacent post thumbnail.I want that a complete row to be add below every post without affecting other posts. Thumbnail of each post should be remain […]

Loading posts via AJAX in a hidden div with updated URL?

I’m using the code below to asynchronously load posts on the same index page via AJAX. I would like to be able to update the URL as well but am unsure how I can go about adding that to what I currently have. The end goal is an effect similar to this. If you click […]

Show post in slider

I am working on wordpress project .I want to show the post details in such away that the first four post thumbnail would show on the top and show the content of first post below, after clicking on next arrow it hover the next thumbnail and show the detail of next post below. I am […]

Using shipped version of jquery

Thare are no errors in the JS console. My goal is to use the shipped version of jQuery that WordPress uses to work with bxslider. According the link shown here, the current version of jquery shipped with wordpress 4.0 is 1.11.1, the same version I’m using when I’m testing it by deregistering the default version. […]

Conditional Header in wordpress

I’m trying to modify the header in a theme for two specific custom post type. The header for all theme page is output from this code: <script> jQuery(function($){ $(‘.parallax-window’).parallax({imageSrc: ‘<?php echo $ilgelo_options[‘ilgelo-parallax-image’][‘url’];?>’}); }); </script> I’ve tried to put my condional code: <?php if ( is_singular( array( ‘rivista’, ‘rivista-trimestrale’ ) ) ) { <script> jQuery(function($){ $(‘.parallax-window’).parallax({imageSrc: […]

Simple jQuery Click Not Working, though console log recognizes the function

Loading a jQuery dialogue in a plugin. Enqueue at Admin Enqueue Scripts function enqueue_settings_scripts_styles($page) { wp_enqueue_script ( ‘my-plugin’, ‘path/to/the.js’, array( ‘jquery-ui-dialog’ )); } add_action(‘admin_enqueue_scripts’, enqueue_settings_scripts_styles’); The HTML <a style=”cursor:pointer” class=”cool-button”>Click Me</a> Script (the.js) (function($) { console.log( “ready!” ); // this happens var detailsButton = $(‘a.cool-button’); console.log(detailsButton.click); // this prints out to console: // function (a,c){return […]

My javascript jquery won't work?

I am trying to make a mobile navigation for my site. However the jquery code won’t work. You can see what I am trying to do here: jsfiddle. I have the html in my header.php after body tag, css in my style.css For javascript I enqueued it in my functions php: wp_enqueue_script( ‘test’, get_template_directory_uri() . […]