On my website I load the recent comments per AJAX for window sizes above 480px:
if ( 480 < jQuery(window).width() )
{
jQuery(document).ready(
function()
{
jQuery.get('http://toscho.de/?rc',
function(data)
{
jQuery(data).insertBefore('#inner');
}
);
}
);
jQuery('#posts').after('<div class=clear> </div>');
}
This code is quite old and not very elegant. But it may give you a hint for the right direction …
Related Posts:
- Remove WordPress scripts
- How to make an WordPress element sticky? [closed]
- JavaScript Loading Screen while page loads
- Click button copy to clipboard
- How to make html table vertically scrollable
- How to make Bootstrap carousel slider use mobile left/right swipe
- bootstrap 3 navbar collapse button not working
- How to center image in carousel
- Can Twitter Bootstrap alerts fade in as well as out?
- Play/pause HTML 5 video using JQuery
- jQueryUI dialog width
- Random background images CSS3
- How do I remove a box-shadow effect from an element when another element is hovered?
- Slide right to left?
- How to add a ” waiting” icon for an ajax in WP frontend?
- How to prevent WordPress from loading the jQuery library at the top of the page
- Automatically decrease font size for long words
- Twitter Bootstrap Use Collapse in Custom Post Type
- Stylizing external SVG files with jQuery and CSS
- Unable to run jQuery script in my template file
- modifying a template and adding jQuery to it
- Gravity list field override and adding javascript [closed]
- Is it safe to include a javascript file in a template’s php file?
- Toggle Sidebar Display
- Add a class to posts in increments of 2
- Override theme style with other CSS on a specific page
- How can I make this custom menu work?
- Will the latest Bootstrap work properly with the default WordPress jQuery?
- Accordion scrolls page too low after clicking on the title [closed]
- show/hide div with simple jQuery script [closed]
- Searching multiple tags and adding jQuery dependant script onto page template?
- What is the propre way to include jQuery UI Datepicker’s CSS in plugin?
- Superfish Menu Not Loading
- Problem Implementing parallax in header of bp-default theme
- underscore template dynamically remove row Jquery
- Is it OK combined wp-include js, jquery, css? [closed]
- JQuery load php – php file without the template
- JQuery Issues With WordPress Theme Interface
- jQuery Drill Down iPod Menu FOUC and Selecting Current page
- error: n.imagesLoaded is not a function
- jQuery Validation plugin and Bootstrap 4 CSS classes
- Getting click on item to open closest relevant element (popup) with jQuery
- How Do I change Markup of a link in WordPress
- jQuery for Fade Preload Causes My Site Favicon to Disappear from Tab of Browser
- Lightbox scroll page down on iPhone
- jQuery function not working in WordPress but works in jsfiddle
- Style sidebar for a custom page template exclusively
- Site images are fixed in front of my site content [closed]
- WP Media Uploader modal conflicts with Bootstrap modal
- :first-child applying to all links [closed]
- How to update scrollbar when using Jetpack’s Inifnite Scroller?
- Hide input field when second input field is in focus
- change the icon of a custom post type in WordPress to use twitter boostrap
- Adding css and js to a blank page created with custom template
- Drop Down Category Menu Not Working
- controlling the showing and hiding of the website logo
- How do I add Javascript and CSS files into WordPress?
- can’t make jQuery work (change image on time interval) [closed]
- How do I get my suggest to only suggest one taxonomy?
- jQuery accordion menu
- WP Customizer: Save a control state
- Custom AJAX form not working async
- Flexslider won’t work with WordPress’ jQuery | Dependencies
- Delete post image attachments with jQuery from the front end
- Load different single.php templates according to post layout selection
- Applying jquery to WordPress admin edit.php
- Bootstrap modal with jQuery post [closed]
- Load different post_thumbnail for smaller window width (jQuery,WordPress)
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- Duplicate “default” form with jQuery
- Can’t execute jQuery before my script
- Conditional Tags – Multiple Categories
- Change zurb foundation top bar style on.scroll in wordpress theme using jquery and css
- Admin Ajax is returning 0 and not Insert data
- Checking length of string in an admin area field onblur with jQuery
- JQuery UI not loading without explicit loading of jQuery
- Multiple Media uploader output to input
- Multiple selec2.js file loaded by several plugins
- Can’t add classes using jQuery from a JSON string with get_body_class()
- jQuery(selector) vs. $(selector)
- Null/undefined return in WordPress AJAX request
- My wordpress site is using local ip to point to jquery and other files, how to fix it?
- Ajax call through admin-ajax.php returns 404 error
- click event to unhide something after ajax not firing
- Display a post via template
- How to add new CSS file to new PHP file
- Safe method to temporarily load second jquery library to wordpress
- Why does deregistering jQuery cause other scripts not to load?
- WordPress Insert not working with ajax
- Search query with Ajax
- WP AJAX API with JS file
- need to override function in jquery.ui.datepicker.js
- Is there a default way in wordpress to create a overlay in the dashboard?
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Does WordPress support Plupload chunking when uploading asynchronously?
- extra code in – blank jquery function
- how to use wp_editor() here am getting empty result
- Recommended Use of Bootstrap, or JQuery-UI in WP/plugin development?
- jQuery is not defined, working on local server but not online
- admin ajax php success returns 0