Tagged Questions

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is included with WordPress, and available to both themes and plugin developers.

learn more… | top users | synonyms

0
votes
2answers
153 views

jQuery HoverIntent is not a function

I am working on a site that uses jQuery for a number of functions but I am having a repeating error: hoverIntent is not a function I have referenced similar questions on this forum and they ...
1
vote
1answer
58 views

Do we have to santise html passing into Javascript ? How?

I am passing a <ul><li></li><ul> to jquery .html() method and it works. I am assigning the html to a varaible and passing to .html() method . As some security scans suggest ...
0
votes
1answer
56 views

Get custom fields when hover link of post

I have custom page and get some links of post if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href="<?php ...
0
votes
0answers
40 views

Wanted to collapse all the widgets in sidebar by default via jQuery

I already applied jQuery on footer to Slide them up but i noticed that when the page is completely loaded the widget slides up properly but dont know how this again slides down automatically. I m not ...
2
votes
2answers
98 views

Correct Method to run scripts with dependencies without enqueue?

With enqueue you would change $deps to your script or array of scripts that are needed to run first for your script to work. <?php wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); ...
0
votes
2answers
41 views

:first-child applying to all links [closed]

I am trying to remove the margin-left:10px; from the first menu item in my main navigation. I am ussing a wordpress custom navigation for my site. I have tried the :first-child method but this seems ...
0
votes
0answers
21 views

Prevent submission of widget form

How can I prevent submission of a widget form? The following doesn't work for me. And preventing submit won't work because Wordpress uses Ajax for those forms. jQuery(document).ready(function($) { ...
0
votes
2answers
133 views

$.browser Undefined Seemingly Causing Faulty Page Display

At this site I have an error using the parent theme's jquery.PrettyPhoto.js This causes tabs not to load well nor gallery to work well it seems. The error states TypeError: $.browser is undefined ...
0
votes
0answers
26 views

Accessing /page/2 on WordPress directly breaks infinite-scroll

I added infinite-scroll.js library to Wordpress (manually, not via plugin). On index i have wrote a loop to make the pagination and everything works fine, however then i'm accessing URL/page/2 ...
0
votes
1answer
75 views

Removed jQuery script from header.php , any problems?

To avoid multiple jQuery calling from my theme and plugins, I removed <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ...
0
votes
0answers
230 views

Set up dataTables row delete rather than php and page refresh

I am using the dataTables jQuery plugin to display a table in a wordpress site with data from a custom table and it works well. I have added select check boxes and once a row or rows have been ...
0
votes
1answer
104 views

How to prevent plugins from loading jQuery

I recently downloaded a free plugin from wordpress.I want to remove the plugin from loading jQuery because you experts know that it is already loading from wordpress header.php file. The plugin is ...
2
votes
2answers
321 views

How to stop loading multiple copies of jquery

My wordpress header.php and function.php is given below.please help me to modify my php code to stop problems due to loading jquery multiple times. My plugins and themes are loading jquery multiple ...
0
votes
0answers
18 views

Run Jquery Script after delete post in front end

I have a list of posts on a page on the front end. With each post I have created a delete button with get_delete_post_link. This works fine but I now need to execute some jQuery after the post is ...
0
votes
1answer
14 views

What is the process for reimplementing a back up WordPress?

WordPress noob here. I'm helping a friend migrate her WordPress themes and change servers. I've already moved the WP across servers, but now I'm working on changing the theme on my localhost dev site ...
1
vote
0answers
113 views

Get Page content to displayin Bootstrap Modal

Ok I'm a relative novice here, and after looking around I still haven't found the answer to my problem. I'm basically trying to link a Bootstrap Modal to some text in a footer (widget), the content of ...
0
votes
1answer
25 views

In the Edit Post page how do I modify with jQuery the status select list?

Here is my JS: jQuery('#post_status option[value="draft"]').text('Approve'); I simply trying to modify the text inside the option element in the status select form element in the Edit Post page. ...
0
votes
1answer
67 views

Using AJAX in WordPress Widget

The past few days I've been Googling and searching for answers to no avail. I'm building out a "Featured Content" widget where the user can easily (via ajax/jquery) search for posts. Is it possible ...
0
votes
2answers
114 views

Manipulate retrieved ajax data in php

I made a basic ajax request to 2 variables. I want the values to be sent and manipulated in the back-end in order to use them in a database query. All that should happen on page load. My main.js code: ...
0
votes
0answers
40 views

wp_next_scheduled() with jQuery Countdown

I'm working with the jQuery Countdown timer for the first time and I wanted to integrate it into my Wordpress site to display the time until the next scheduled cron event. When the countdown has ...
0
votes
0answers
5k views

Uncaught TypeError: undefined is not a function (shortcode-box)

I have a Wordpress theme that the author is no longer maintaining, and has stopped functioning properly with the update to Wordpress 3.x. Over the past few months, I have been working to resolve the ...
0
votes
2answers
61 views

Jquery was not found on this server

I have two pages, events.php from plugin1 index.php from plugin2. in events.php. I am including jquery for ajax loading <script ...
2
votes
2answers
666 views

WordPress Script Loading/Unloading — wp_deregister_script('jquery')

I have a few questions relating to WordPress loading / unloading up javascript tools. After reading a nicely written response to a question by Pieter Goosen, that got me to do a bit of studying and a ...
0
votes
1answer
247 views

Ajax +wordpress onClick link redirect to new page and create html content

i have two pages in my wordpress plugin index.php charts.php in index.php i have some content and some link.. <a onclick="show_trend()" >Trend</a> while clicking this link ,i have ...
0
votes
2answers
388 views

Creating a new div onclick wordpress+ajax

I have a link in worpress page <a onclick="show_trend()" >Trend</a> and i am calling an ajax function onclick. function show_trend() { // This does the ajax request $.ajax({ ...
0
votes
0answers
88 views

Toggle a metabox based on a selection

Is there a way to toggle a custom metabox based on a custom drop down selection for a custom post type? What I mean is I would like my custom post "proposal" to display different metaboxes based on ...
0
votes
0answers
36 views

pageYOffset problems in WordPress? Works on code playground, not on dev site

I am hoping someone will have some insight into my jQuery conundrum. I'm trying to implement a fairly simple script to add/remove a class to my navbar. I've mocked up a codepen here: ...
0
votes
1answer
253 views

Dynamic image grid gallery

I want to create a project with the following image grid gallery. I try to do with the using of masonry JQuery My code : functions.php wp_register_script( 'pkgd', get_template_directory_uri() ...
0
votes
1answer
349 views

Create search form in menu as in Twenty Fourteen theme

I would like to replicate the search form in Twenty Fourteen's menu. I have tried to hide and show the search button with jQuery. My Problem is that the button is not sliding from left to right and ...
2
votes
1answer
851 views

How to get a jQuery script to run on a page?

I am having a hard time figuring out how to get a jQuery script to run on a Wordpress page of mine the "correct" way. I have followed this article and implemented what the first answer says to do. ...
0
votes
1answer
228 views

Using Foundation 5 in WordPress Administration Area

I am attempting to implement Zurb's Foundation 5 in a development to enable me to utilize its functionality to create better page UIs within the wp-admin. However, for some reason Foundation's JS is ...
3
votes
2answers
666 views

How to correctly add Javascript in functions.php

I would like to remove some ugly looking arrows that are standard on cart buttons in WooCommerce. To achieve this, I found a tip of adding the following code, which should remove the arrows when the ...
0
votes
1answer
45 views

Ajax autocomplete based on usercode

I am trying to build a webform with autocompletion. The user can fill in a personal code and the related fields will be shown in the form fields. How can I fetch the results into my form fields? ...
0
votes
1answer
233 views

How to use different jquery function of idangero swiper dependant on page template?

I have struggled with adding the idangero swiper jquery plugin to my site, but have managed to produce the code below. This works very well but only on the one custom page template defined in the ...
0
votes
1answer
169 views

Add php function into .js file (for tinyMCE button)

I am creating a tinyMCE button for the wp WYSIWYG editor. Basically what happens is when a use clicks on the button a modal form pops up and they have to enter a few fields. However One of the fields ...
0
votes
0answers
69 views

Adding Radio Options or Select Options to Meta Box Title

I am adding Radio Options and Select Options to miscellaneous Meta Box titles. The HTML is rendering just fine in the title of each appropriate Meta Box title. There seems to be a bit of ...
1
vote
0answers
109 views

Add tinymce buttons to caption textarea in media uploader

I want to add some basic tinymce buttons ( Bold, italic, underline ) to caption textarea in media uploader in WordPress. (Shown in attached image) I dig a little bit into wordpress core in media.php ...
0
votes
1answer
70 views

Load jQuery inside Page Template

This is rather basic, and maybe it's a duplicate question, so let me know where exactly is answered in that case. I need to add a very simple jQuery script inside my Page Template. I'm using ...
0
votes
0answers
36 views

wordpress wp_reset_query makes jquery tabs stop working

here is my code,the slider tab is working fine if i don't add wp_reset_query() but when i add it. it stops working.I tried all.Please any suggestion for this. <?php query_posts(array( ...
0
votes
0answers
59 views

Open posts in a sliding panel

I'm new to WordPress/coding and I was wondering if you guys could help me out a little bit. I want the posts pages to open in a horizontal slider panel... here's the perfect example of what I mean: ...
0
votes
1answer
88 views

How can I implement an Add to Collection function on my Image Gallery to be downloaded later?

I am building a WordPress Image Gallery like a Stock Photo Gallery for internal office use. I am using the Media Gallery to upload files and then using the image gallery to display the photos. It's ...
0
votes
1answer
130 views

Ajax contact form return 0

I have a contact form that I want to submit using ajax. It seems like send the data, but the only retrieved is 0. HTML form: <form method="post" ...
0
votes
1answer
23 views

How to make javascript work on theme options page

Gentlemen! I'm composing a theme options page for my WP theme. And I bumped into the problem of finding the proper way to introduce inline jQuery interactions to the page. Ideally for me in the ...
1
vote
1answer
46 views

Plugins not working on AJAX requests

I have an AJAX request that retrieves information from a function I coded in my own plugin, here is how I set the ajax function: function my_ajax_function () { do_action('my_plugin_function'); } ...
1
vote
1answer
287 views

Hide menu item in certain condition

I'm using the plugin qTranslate and I have to hide one menu item when the language isn't Italian. Searching online I created this solutionand applied the solution in this post I created the file ...
0
votes
1answer
467 views

Replacing select2 in admin backend for all selects

I originally posted this question as a javascript question here, but think maybe it would be better asked here. I tried adding select2 to all wordpress admin screens. However, since many selects are ...
0
votes
2answers
212 views

WP_ENQUEUE not working with Foundation 5 (resolved)

EDIT: PLEASE SEE MY ANSWER BELOW FOR ASSISTANCE :) feel free to use the code! I've recently started integrating Foundation 5.2.3 into Wordpress 3.9, and I am having issues with getting jquery to ...
1
vote
0answers
114 views

Using color picker in plugin, does input attribute order matter?

I'm trying to use the WP color picker in a plugin admin menu and it doesn't seem to be doing anything at all. I'm following the directions here: ...
0
votes
1answer
59 views

Variable not being returned from Ajax Javascript (though javascript receives it)

I'm receiving the variable to JavaScript, but not getting it back in PHP, and I think Its not being coded correctly in the JavaScript: function glitch_player_display(mix_name) { alert(mix_name); ...
0
votes
1answer
92 views

Using WP functions inside javascript

I'm trying to use PHP variables inside a javascript function. What's a proper way to use a WP function like get_current_user_id() inside a script that get's enqueued via wp_enqueue_script? Right now I ...