It’s not showing because the .insertAfter()
and .show()
functions are called on resize events only, while mobile devices do not resize. They already load the page with their mobile sized. Just make sure you also run the code on the ready event:
<script type="text/javascript">
/* to show back the left side bar back when the LEFT side bar is moved next/below to the center/content */
function responsive_sidebar() {
if ( jQuery(window).width() < 1018 ) {
jQuery('.tm_left').insertAfter(".tm_center");
jQuery('.tm_left').show();
} else {
jQuery('.tm_left').insertBefore(".tm_center");
}
}
jQuery(document).ready(function() {
responsive_sidebar();
$(window).resize( responsive_sidebar );
});
</script>
Note that I put the code into a function, just so you have fewer lines of code/
Related Posts:
- How to integrate my HTML and javascript into my child theme
- Could the WP script/style loader be used to concatenate and gzip scripts and styles in the front-end?
- Child themes CSS priority problems without using !important
- wp_enqueue_scripts, wp_register_scripts, wp_print_scripts: i’m confused
- How do I remove specific styles from the parent theme css using the child theme css?
- How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?
- How to solve ‘Eliminate render-blocking JavaScript and CSS in above-the-fold’ content for multiple files?
- WordPress Displaying Thumbnails Vertically
- Trying to load a responsive CSS media query using Custom Taxonmy
- How can I make new .css file in child theme override styles in child theme’s style.css
- Why do WordPress default themes specify fonts in so many places?
- CSS in child theme not getting loaded
- TwentyTwelve versioning
- Changing Font-Size based on specific Font thru javascript
- How to change Parent Themes in Child Theme CSS
- Duplicate and alter sidebar for Twenty Eleven
- Collapsible button inside a ul list does work in jsfiddle but not in WP
- How can I remove css from a child theme?
- Can “ and “ tags be used in the HTML editor?
- Is it better to put CSS in additional CSS or in Child theme styles.css [closed]
- JavaScript added as link/stylesheet
- Write text below a specific part of a sentence
- WordPress on localhost working, when sharing IP to connect receive err_connection_refused on .js and .css files
- Show enqueued CSS and Script in custom header
- How to insert html/css/javascript code to wordpress plugin
- Different ways to load child theme css
- WordPress Twenty Fourteen Theme Sidebar
- Importing changes to Child Theme
- Load in wp admin assets from child theme
- How to create fa-bars animated menu
- Does costum code in the root folder get lost when wordpress is updated?
- @media in bluehost is being commented out [closed]
- CSS Minification
- Responsive Images Warping
- Old Site displays on Mobile View, not New Site
- why this media query is not working / not loading when I put it in child theme?
- No responsive design is displayed
- Trying to figure out why my child theme is trying to access a file that doesn’t exist
- Child theme CSS not applying to element
- Title has word broken when viewed in mobile [closed]
- Child theme stylesheet not always overriding “index”
- Seperate functions.php for part of site
- Child Theme CSS not showing at all
- Faster fonts on mobile
- How to change “““ to “““?
- Why is my child theme style.css not found (404) in the front-end? [closed]
- Change Header Image on Blog Post for Mobile View
- Conditionally enqueue a stylesheet based off of a javascript click event
- Remove CSS Attribute by Overriding CSS in Child Theme
- Menu toggle bar works only on some pages in WordPress
- Remove CSS & JS from
- CSS getting injected into index from somewhere after theme/custom CSS is loaded, overriding all of my CSS [closed]
- enqueing Javascript and CSS
- child theme appears again when I put the header with parent name.
- How to Add a Read-only Textbox With Text in it That Has a Button to Copy it?
- All of my custom Bootstrap styles are not working in my child theme!
- Earlier stylesheet not overriding later one
- Free theme and css/bootstrap.css is not overridden in the child theme
- prevent HTML output if custom field is empty [closed]
- Equal height sections in custom Headway Theme
- W3TotalCache and Javascript — what should go where, when?
- How would I create the same popup in css and javascript as the one in contact button on the site https://www.sublimotionibiza.com/es/main.html [closed]
- Combine CSS Files without plugin
- Button doesn’t work in the profile panel
- WordPress Rest Api access the header and extract stylesheets URL
- How to make a function to play only on the home page?
- Css will not display in webpage, after adding it in style.css in child theme
- Hide Tab Titles from Tabs Block
- How can I hide this custom slider while Elementor editing window is open?
- Need to make sidebar responsive only when screen width is greater than 1024px
- Dequeing Parent Fontawesome Deques Parent Styles
- WordPress childtheme not loading any CSS/SCSS
- How to properly hide the div of an inline collapsible button?
- Change the version of default style.css in wordpress
- New Styles Not Rendering On Mobile Phone and Tablet
- My Child Theme CSS Isn’t Working
- Web Developer Console: “Slow network is detected.” with fonts
- Change WP Child theme CSS for WP Bootstrap Starter Theme
- How to display javascript banner in website header?
- @media applying globally and not separately for each screen width [closed]
- CSS in child theme to replace !important in parent theme
- How would I add this code to a single WordPress page?
- The placeholder text doesnt disappear
- Trouble with adding preloader to my home page index.html and index.js
- Site not 100% responsive
- Header formatting works for safari but not chrome @media screen size technique on iphone
- Why are my parent styles loading after my child styles?
- How to implement a JavaScript and CSS file for my WordPress homepage?
- Browser stacks different versions of style.css
- How to remove audio player styles added by mediaelement.js JavaScript?
- Twenty Fourteen responsive CSS
- How would I use a media query to make my entire theme responsive or fluid? [closed]
- Responsive table on ios safari
- Can’t override CSS with child theme
- How to make this splash page responsive
- Hiding site title for Twentyfifteen sidebar on (responsive) desktop display size
- Can I upload my HTML/CSS/Javascript game onto a WordPress page?
- How do I add JS and CSS to WP (Flatsome)
- “Plate” theme broken after update
- How can I only show one responsive menu on mobile devices?