Problem with jQuery in post body?

When you are using Google CDN hosted version of jQuery then you don’t need to use jQuery wrapper. It’s for jQuery packed with WordPress core because jQuery with WordPress runs in noConflict mode. So your jQuery code will be. <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js”></script> <script type=”text/javascript”> $(document).ready(function() { console.log(“Test”); $(“.myBox”).click(function(){ var myBoxOn = $(this).attr(“data-class”); $(“.myBoxContent”).hide(“slow”); $(“#” + myBoxOn).show(“slow”); … Read more

WordPress version for this autocomplete jQuery code

Shouldn’t you add full path of the ajax.php in your code. If your ajax.php file is in theme folder then you can use get_template_directory_uri() function to define file path. So this should be your code. $(document).ready(function () { var ac_config = { source: “<?php echo get_template_directory_uri(); ?>/ajax.php”, select: function (event, ui) { $(“#facility_name”).val(ui.item.facility_name); }, minLength: … Read more

owl carousel not working after ajax load [duplicate]

The reason you cannot use this by default is because of no conflict. From the Codex: The jQuery library included with WordPress is set to the noConflict() mode (see wp-includes/js/jquery/jquery.js). This is to prevent compatibility problems with other JavaScript libraries that WordPress can link. In the noConflict() mode, the global $ shortcut for jQuery is … Read more

How would I get this to work – send to post from thick box

The correct way to do this is to: $(‘#upload-background-image-one’).click(function() { formfield = $(‘#background-size-one’).attr(‘name’); tb_show(”, ‘media-upload.php?type=image&TB_iframe=true’); // Take the selected image and insert only the src path into the text field. window.send_to_editor = function(html) { img_url = $(‘img’, html).attr(‘src’); $(‘#background-size-one’).val(img_url); tb_remove(); } return false; }); because when you click on a button you instantiate a call … Read more

Displaying contents of a tab

You have been answered in stackoverflow in the following way: <div id=”tab-one” style=”display: none”>Tab1 info 1 content</div> <div id=”tab-two” style=”display: none”>Tab1 info 2 content</div> <div id=”tab-three” style=”display: none”>Tab1 info 3 content</div> <ul class=”side bar tabs”> <li class=”one”>Tab1 info 1</li> <li class=”two”>Tab1 info 2</li> <li class=”three”>Tab1 info 3</li> </ul> You should run your query in while … Read more

search in jquery mobile returns blank page

No comments but ill answer anyway for future clueless jqm developers as me. apparently (wasent clear for me base on my regular web dev experience) that if the destination is not a jquery mobile page it wont load and show blank… weird? or maybe there is other explanation that i didn’t noticed while deleting and … Read more