A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
14 views

Parse an Array of JS Objects using JSON and AJAX

I have an array of Javascript objects, which I convert to a string using JSON.stringify() before processing with AJAX. On the server side, all I am trying to do is verify that the proper ...
0
votes
2answers
12 views

Filter custom post types by custom field using AJAX

I have a few custom post types (books, films etc) created with WP-Types. I then have a custom field called Genre, created with ACF. If a user selects "Books" from the dropdown on the frontpage, he ...
0
votes
1answer
15 views

Need to hide an element depending on date and post category

I've been racking my brains for a few days trying to figure this out. I'm using WP Voting on my site. I need to create a script in single.php that will remove the div that contains the voting widget ...
0
votes
1answer
16 views

Show Post Content with AJAX

I want to do a very basic AJAX call where, on click of a list item, a container div fills with associated content pulled from a Wordpress page. I'm a newb with AJAX; I've tried a few different routes ...
0
votes
0answers
8 views

iframe ad unit covering up a javascript menu [on hold]

I have a couple navigation bar menus that open up javascript based menus. The problem is that a large ad unit that uses iframe is covering it up. You can see what I mean here: ...
-1
votes
0answers
10 views

Global JS variables [on hold]

Ok, here's the basic idea. I want to have one javascript activate another. It seems like a fairly straightforward idea. I have my first js file set a variable to 1, and my second js file start with an ...
0
votes
1answer
32 views

WordPress opens js files as a catalog. Path is right

When I import external js file everything is okay.. no matter if I import it by <script> tag or by wp_register_script function but when i try to import local file everything crashes. Firstly I ...
-3
votes
1answer
20 views

dropdown does not work [closed]

I have the page http://www.supersprox.eu/invoicewithtabs/. When I click "Show filter" button an area with several dropdowns appear. The problem is I can not select values of the first row of ...
-1
votes
0answers
45 views

SmoothState.js and Wordpress plugins [closed]

There are few problems with that. There is one of you that have a complete and serious guide? For example: I use in my Wordpress both "Visualizer" plugin (that visualize Google Charts in my pages) ...
0
votes
0answers
20 views

Multiple Forms Email validation on a single page using javascript [closed]

I am developing a Wordpress Widget Plugin that inserts as many as you want email input forms in a widget. I am using the following code to validate email fields function validateForm(form) { var x ...
0
votes
0answers
10 views

Is server side Javascript possible with wordpress

Is it possible to run JavaScript server side on wordpress. I have about 5,000 lines of Javascript that I would like to run on the server, rather than the client (browser). 5,000 lines is a lot of ...
0
votes
1answer
35 views

Accessing an API with jQuery and AJAX

As a proof of concept I'm trying to access an API using jQuery and AJAX and posting the results to a page. After following some online tutorials and doing my best to put it all together, I have the ...
0
votes
0answers
20 views

How to use multiple instances of plupload on single form [closed]

I want to use multiple instances of plupload on single form. I saw the following link. But i dnt know how to implement that in wordpress. jsfiddle.net/X65zF/36/. So I can upload images from first ...
2
votes
0answers
49 views

How to add a “data-” attribute to the image tag of native gallery output

While trying to make WordPress and Galleria to become friends I already have a good result. Galleria can easily be used to display native WordPress Galleries. I'm using a plugin but that's not ...
0
votes
1answer
19 views

admin-ajax.php (aborted) error when using jQuery.get

One thing that really confuse me is the following: When I load a javascript file via Ajax and I watch the http requests thats being made, then I see the following error in Firebug: admin-ajax.php ...
1
vote
4answers
73 views

jquery won't load in footer

I wanted to move jquery to the site's footer, but that doesn't work. I've tried it with the following code. As you can see, I have a couple of another scripts and they load correctly on the footer. ...
0
votes
0answers
11 views

Enqueue script in Widget

I am trying to use wp_enqueue_script inside function widget of the Widget class. But it seems like when I print html it doesn't handle the javascript functions which I enqueue before. This enqueue ...
0
votes
0answers
15 views

Can You Require the Use of JavaScript in a WordPress Plugin?

I commonly use Mozilla Firefox for testing changes I make for a plugin that I'm developing. I also have the NoScript addon installed because it is also my main browser. I noticed that the ...
0
votes
1answer
25 views

JS news ticker is not working on home page but working on other pages. How to solve this?

I created this news ticker: http://jsfiddle.net/riffaz/92s92k1d/ and it's working fine in fiddle. I am trying to add this ticker to the site. For that I put this code on a PHP widget <?php ...
1
vote
3answers
38 views

Javascript not included

I have tried to include my javascript file in the following way: function theme_scripts() { wp_enqueue_scripts( 'custom-script', get_template_directory_uri() . '/js/menu-fix.js',array('jQuery'), ...
0
votes
1answer
30 views

'Dehighlighting' navigation once clicked

I'm using the Twenty Fourteen theme and I'm loading the pages using Ajax. What I want to happen - the menu bar to unfocus the previous page on the navigation bar and highlight the current page. What ...
0
votes
1answer
12 views

Executing Javascript in Plugin

I am trying to display a google map using short code for a plugin I am building, but I can not get it to work. Does anyone have some advice on this? Here is my code: add_shortcode( 'show_map', ...
0
votes
0answers
11 views

Iris color picker

i try to implement Iris color picker in my wordpress theme and it works fine, but when i include the Iris color picker's files i can't call a custom function via a tag. this is the Iris color picker ...
2
votes
0answers
43 views

Is it Possible to Extend WP Customize JS Methods?

I’m wondering if it’s possible to extend the methods of the anonymous api object in wp-admin/js/customize-control.js. I need to overwrite one of these methods with my own custom logic but I suspect ...
0
votes
0answers
25 views

how to transfer the post content from index / category/Archive page to another page with a form?

I have a wordpress site ! I want to insert a link below each article/post on the index/category/archive page which on click , i want to open a page which has a FORM with title and a message text ...
0
votes
1answer
31 views

Notification when left menu bar is closed?

How to get a notification via Javascript when the left menu bar has been collapsed ? I was looking everywhere in the net but there is zero out there... thanks! update: somebody asked what the left ...
0
votes
2answers
24 views

Create special WordPress slideshow with “jquery.cycle.all.js”

i want to create my own slideshow without using any slider plugins hear is my code -- in the footer --- <script type="text/javascript" src="<?php bloginfo( 'template_url' ...
0
votes
0answers
25 views

wordpress - ajax communication

This is the first time I do the ajax and I must confess that I am confused. What I want to do is to take the value of 3 Select html to make a request to my database that'll get me a score according to ...
0
votes
0answers
27 views

How to slidedown and slideup child pages clicking on parent pages in jquery or javascript?

I have created a sidebar in wordpress in which all parent pages with subpages are listed. I have used following code in sidebar-left.php file and call this in template file. <div id="primary" ...
2
votes
1answer
54 views

javascript onload calling a function of a plugin

A friend created a plugin for me which allows the users to mark posts as read or unread. The code of this plugin is the following : edit of the code ! <?php /** * @package Read-Unread * ...
0
votes
1answer
63 views

Adding an onchange event to a custom dropdown menu in Wordpress

I would like to add an onchange event to a dropdown menu I've created via my Wordpress plugin. As this is my first foray into Wordpress development, and the company I work for has a tall order for ...
0
votes
2answers
65 views

Problems with plugin that fetches data from database with ajax

After some answers I have edited my code. This is my plugin structure stpl1 stpl1.php getuser.php In stpl1.php I have the following code: <?php /* Plugin Name: Wordpress Plugin Stijn 1 ...
0
votes
1answer
63 views

Populating content dynamically via AJAX and Advanced Custom Fields [closed]

I am using a repeater field from Advanced Custom Fields to create multiple photo galleries. There are 4 pages and each page has multiple image galleries. Because of this, I want to reduce load by ...
0
votes
1answer
13 views

Showing a link with Javascript based on log-in status

<?php if ( is_user_logged_in() ) { echo ''; } else { echo '<a onclick="ppOpen('#login_panel', '800',1)" href=\"javascript:\">Entrar</a>'; } ?> Hello, I'm trying to make this work ...
0
votes
0answers
30 views

Using Ajax to autocomplete a form with data from db

I'm struggling to get the following: User fills out personal number Other input gets autocompleted with data from database As I have never made a plugin, help is greatly appreciated, my database ...
0
votes
0answers
90 views

AJAX filter posts on click based on category

This is my first foray into AJAX, I've been splicing bits of code from various tutorials which probably hasn't helped. I have a list of categories on my homepage (index.php) and a list of the most ...
0
votes
1answer
48 views

How to load JS for specific screen size using wp_enqueue_script?

I need a option so that when I am adding some script using wp_enqueue_script it should load for specific screen size. Like when the screen size will be below 768px the script will not load. I am ...
0
votes
1answer
51 views

How to get values from wordpress listings and use them in javascript array?

I'm trying to get values (latitude, longitude and an image) from the WordPress database and put it into a javascript array. Unfortunately I'm a newbie at Javascript and PHP! Here is the code I have ...
0
votes
1answer
30 views

prevent HTML output if custom field is empty [closed]

I am using the ACF plugin for custom fields. I am using this to add a second content area to my website. I have a peice of JS that says if this div is present then add a class to the page-content ...
0
votes
2answers
48 views

How to set up php,javascript and css to allow for our finished product to be displayed within a page?

hey wordpress experts, We have coded a table using php, javascript and css which pulls up information from a text file and displays it in the browser. We have everything working as desired when we ...
0
votes
0answers
37 views

media uploader filter library so see only images without parent post

I am using this code to enable users to upload images from front end. I would need to filter the library tab to only how images that do not have post_parent set. Any way to do that? Code below: ...
0
votes
0answers
57 views

Infinite scroll on sidebar widget

I am trying to add an infinite scroll functionality to a website i am building, but i want to add it to a sidebar widget. I have a widget that shows a list of recent posts, and i would like to add an ...
2
votes
3answers
285 views

Add Javascript to Wordpress Menu

Is there a way to put javascript in the URL portion of a Wordpress menu item? I have a live chat function on my site, and I am supposed to put this code onto the site to make a link to open the live ...
0
votes
0answers
102 views

Flexslider not working for my custom theme WordPress

I add flexslider to my theme homepage http://templategraphy.com/wp-demo/bluto/ but it didn'not show on my homepage Here is the order of js i placed in function.php function theme_name_scripts() { ...
0
votes
0answers
37 views

How to open particular featured image clicking on desired post using javascript in wordpress?

I have created a custom post type "gallery" and created seven post in it. Since I am using dynamic featured image plugin of wordpress so I assigned two featured images to each post. Then I ...
0
votes
0answers
2k 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
1answer
38 views

How to install cool javascript feature in Wordpress?

Im trying to install this menu http://tympanus.net/codrops/2013/08/13/multi-level-push-menu/ on my Wordpress site.However the javascript can not be loaded.Here is my murkup I used the menu as ...
0
votes
0answers
18 views

How to stop writing content twice on Wordpress using ajax?

I've been using javascript and ajax to do some post request inside a page and everything seems to work fine. Later on when content got more complicated I stop writing HTML code with javascript and I ...
2
votes
1answer
73 views

How to prevent loading of all plugin's resources?

Wordpress is loading all client resources of all plugins, not just the plugin of interest. It may make sense to load jqery globally but it makes no sense to load all other plugin's Javascript in a ...
2
votes
1answer
268 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. ...