Refresh widget admin page resetting jQuery hidden class
I can solve the problem now. Because, I forget to put the label/id of media upload widget in the widget form section. Regards, W. Nelson
I can solve the problem now. Because, I forget to put the label/id of media upload widget in the widget form section. Regards, W. Nelson
I figured it out. blur.js needs an background-image to work. i had to set the image as background separately: <?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘full’ );?> <a href=”https://wordpress.stackexchange.com/questions/210956/<?php echo $imageLink; ?>”> <div class=”testbg” style=”background-image: url(‘<?php echo $thumb[‘0′];?>’)”> <?php the_post_thumbnail(); ?> </div> </a>
SOLVED by somebody: “if my form pointed to a directory: http://example.com/wordpress then my POST data disappeared and $_POST was empty. If I pointed to a specific file: http://example.com/wordpress/index.php Then it worked properly.” ps: God bless him. 🙂
I discovered that by removing the footer.php file, I was removing a link to the function wp_footer(); which essentially does this: function wp_footer() { /** * Print scripts or data before the closing body tag on the front end. * * @since 1.5.1 */ do_action( ‘wp_footer’ ); }
Try this to set the alert if you’ve scrolled 100px from the top of the page. jQuery(document).ready(function ($) { $(window).scroll(function(){ var ScrollTop = parseInt($(window).scrollTop()); if (ScrollTop > 100) { alert(“You’ve scrolled 100 pixels.”); } }); }); Here is a JSFiddle showing it in action. Assuming you want to do more than just show an alert, … Read more
I was loading jQuery after loading script like this: <script src=”https://wordpress.stackexchange.com/questions/213792/myscript.js” type=”text/javascript”></script> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script> It needs to be jQuery on top.
I found the problem with my enqueue statements. There was a space ahead of the handle name of the wp_enqueue_scripts statements for both “tablesorterjs” and “tablesorterfunctions”. Once I removed the space in front of the handle name, the scripts enqueued. wp_register_script( ‘tablesorterjs’, plugins_url( ‘/js/jquery.tablesorter.js’, __FILE__ ), array(‘jquery’) ); wp_enqueue_script( ‘tablesorterjs’ ); wp_register_script( ‘tablesorterfunctions’, plugins_url( ‘/js/tablesorter.js’, … Read more
I had to overcome two issues to resolve this. The 404 error was due to the way I registered the script. It pointed to the parent theme folder, while I had saved the .js file to the child theme folder. For the moment, I’ve put a copy in the parent theme folder, and am looking … Read more
Just proxy the modal-open class for Bootstrap like this: .bs-modal-open { overflow: hidden; } .bs-modal-open .modal { overflow-x: hidden; overflow-y: auto; } // or using sass … .bs-modal-open { @extend .modal-open; } Add/remove the bs-modal-open class to the body when opening/closing a BS modal: $(‘.bs-modal’) .on(‘show.bs.modal’, function (e) { $(‘body’).addClass(‘bs-modal-open’); }) .on(‘hidden.bs.modal’, function (e) { … Read more
I found the cuplrit and has nothing to do with comment-reply.js. I was targeting my javascript based on which template and of course the javascript wasn’t loading. if( $(“body”).hasClass(“page”) ){ … Needed to add this: if( $(“body”).hasClass(“page”) || $(“body”).hasClass(“single”) ){ …