A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
9 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
7 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: ...
0
votes
1answer
33 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 ...
-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 ...
2
votes
3answers
263 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
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 [on hold]

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
41 views

SmoothState.js and Wordpress plugins [on hold]

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) ...
2
votes
0answers
47 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
0answers
20 views

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

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 ...
1
vote
1answer
293 views

How to add a onclick attribute to a list of checkboxes?

I have this array for checkbox: array( 'name' => __('Latest Product',''), 'desc' => __('Select if you want to display latest product',''), 'id' => $prefix . ...
3
votes
1answer
388 views

Menu Link Redirect Based on Username or User ID

I am building a client portal where my clients can log in and see all their pending projects, completed projects and create new projects. Though I'm stuck at the start. The dropdown menu is called ...
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 ...
2
votes
1answer
247 views

Trigger Customizer saving process with Javascript only

I'm working on a custom theme that uses WordPress Customization API to let the user play with parts of the content of his website, basically the front-page which he can modify by adding/removing ...
1
vote
1answer
633 views

Placing Ads after every 10th Post with Infinite Scroll

I have to load a couple of ads, some normal html and two are java script. I've tried the PHP method of this: <?php $postnum++; if($postnum%10 == 0) { ?> <div id="topset"> <ul ...
0
votes
0answers
19 views

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

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
29 views

Masonry grid issue (Bootstrap) [closed]

I have problem with Masonry grid in Bootrap and I can't solve this problem so please help me. On my theme I'm using 3 columns (col-md-4) but I had big spacing between post items.For more details ...
0
votes
0answers
9 views

Change Form Validation in Woocommerce [closed]

By default in woocommerce checkout page if user misses some required fields or enters invalid values a series of error message will pop out on the top of the form. I wonder if I van change the manner ...
0
votes
1answer
18 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 ...
0
votes
1answer
1k views

Ajax page load without reload

I am working on a script to load my page without refreshing. It is working as I want it except for one thing. The test site I have up is http://dev.dog-company.com . Only home About us and FAQ will ...
1
vote
4answers
72 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 ...
1
vote
1answer
141 views

Defer all js except certain ones in functions.php file

I read How to add defer="defer" tag in plugin javascripts? and the code @toscho posted works good to defer certain js files or deferring ALL js files by commenting out the contact-form-7 ...
0
votes
1answer
472 views

Replacing &#038; in JS code on pages

I am needing to remove the &#038; that seems to be replacing my & on my page code. My original code looked like this: ...
0
votes
1answer
474 views

Ajaxurl suddenly not defined

I am developing a wordpress plugin where I use an ajax call to submit form data, it was working fine and then all of a sudden I get a console error saying that ajaxurl (the url passed to the ajax ...
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
354 views

How to make featured image thumbnails on index page load smoother?

I'm using a theme called Hatch Pro, which is a gallery based theme and the index page displays the posts using the featured image. You can see it here. On slower browser environments, the images ...
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
288 views

Custom attributes to javascript tags

My site uses cloudflare but I really want to enable rocket loader, but if I put it on automatic mode, it messes up my whole site... So I googled and found This answer which has helped in terms of ...
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
1answer
2k views

Google Map iframe in a tab issue

I have embedded a map on the third tab on a page. Page here > 'Itinerary' tab If you go straight to the tab while the page is still loading - it loads the map perfectly. However, if you wait until ...
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
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 ...
6
votes
1answer
3k views

Register and enqueue conditional (browser-specific) javascript files?

The WP.SE community has always advised the use of wp_register_script and wp_enqueue_script for adding scripts in a theme/template (and likewise, wp_register_style and wp_enqueue_style for ...
0
votes
2answers
384 views

Unable to load “wpColorPicker” on theme customize page

Whether I'm using a Wordpress default theme or a custom one, I see the JS error: Uncaught TypeError: Object [object Object] has no method 'wpColorPicker' when I click "Customize" on the theme. I've ...
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
2answers
64 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
2answers
426 views

Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)

I've searched a lot for this and I seem to get different answers. In my situation, my jQuery function has to use a PHP variable from a different file. How can I accomplish this? Clear and simple ...
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 ...
2
votes
1answer
295 views

Wordpress Ajax Login without page reload

I'm currently developing a Wordpress theme where I want the user to be able to upload images before he register or log in to the site. The initial problem was, you can´t upload images to wordpress ...
0
votes
1answer
651 views

Does wp_localize_script Call a Javascript Function or Simply Pass PHP Parameters to It

Easy question: I'm trying to understand wp_localize_script. Does wp_localize_script call a javascript function or does it simply pass PHP parameters to javascript? I want to pass php parameters to ...
0
votes
1answer
300 views

TypeError: window.tinyMCE.execInstanceCommand is not a function

I can't add any shortcode in my wordpress editor. it shows - TypeError: window.tinyMCE.execInstanceCommand is not a function window.tinyMCE.execInstanceCommand(id, 'mceInsertContent', false, ...
0
votes
1answer
299 views

JS this.href not getting link from menu item

I have a script to fade in and out the page container when a link is clicked in the nav. I have attached the script to the .menu-item class to target just wordpress menu links. The script itself seems ...
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
1answer
259 views

Javascript/jquery loads super slow (around 6 seconds) which affects only homepage

I got a custom wordpress theme from a developer but he isn't responding to me anymore. Basically my homepage takes ages to load which causes all the elements on the homepage not function until the ...
0
votes
1answer
1k views

Parse wordpress blog data using json api and ajax

I have seen lots of responses to how to extract data from wordpress blog posts using the json api plugin. Many uses $.getJSON, $.ajax, .responseData.feed.entries, success function() etc. What is the ...
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 ...
2
votes
1answer
53 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 * ...