A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
0answers
8 views

Trying to uswp_localize_script with Advance Custom Fields Repeater

I have an external javascript file that I am trying to change dynamically: Here is the Javascript that I want to be dynamic {image : ...
0
votes
0answers
12 views

Google map API theme option page not displaying

I'm having some issues with the integration of a google map in my web site which can geocode an address before displaying the map with the correct location. So i have a script (it worked when i was ...
0
votes
0answers
6 views

WordPress adds superfluous </p> to qtip2 content. Cause Unexpected token ILLEGAL [on hold]

I’m developing a wordpress plugin using qtip2. Line breaking are not working. When trying to create an in-memory div via a JS code following ...
1
vote
1answer
20 views

Wordpress Plugin with a shortcode that dynamically generates javascript. Can I use add_action without wrapping the javascript in a function?

Looks like the best way is using: add_action('wp_footer', returnJs); But if my returnJs function is inside my shortcode function and it's used more than once on a page it will return an error trying ...
0
votes
1answer
28 views

Loading multiple slide galleries? [on hold]

I'm trying to create a site like this where users can click on a link and load that specific slide gallery. Can this be done with the built-in WordPress galleries? It's important that the client is ...
0
votes
1answer
14 views

Creating custom URL for async content

I am using a fully asynchronous Javascript/jQuery portfolio gallery (Grid Gallery template in Photolux theme). When a portfolio item is clicked, the item's details loads. It is built-in in the ...
0
votes
1answer
24 views

Displaying contents of a tab

I have been trying to figure out how to accomplish what I need done which I can show here . I had asked this question in StackOverFlow which I got a good answer but I don't know how to implement it i ...
0
votes
0answers
9 views

Regarding validation and javascript [migrated]

<div id="maincontent"> <h1 class="alignLeft">Contact Us</h1> <div class="section group"> <form method="post" action="contact_us.aspx" ...
0
votes
0answers
7 views

Regarding validation [migrated]

I migrated my HTML site into WordPress, but I have two pages in ASP.NET. When I migrate those pages, I am getting the error: SyntaxError: illegal character ...ypeof(ValidatorOnSubmit) == ...
1
vote
0answers
11 views

Refreshing collections in the admin media manager

I know this question is very similar to this previously asked question; however, I was wondering if there was a more up-to-date/official way to refresh content programmatically in the WordPress admin ...
0
votes
0answers
18 views

Wordpress search query

I used code snippet, from the plugin http://wpadvancedsearch.com/, which works very well, but when I press a search button, it generates the following string in the URL: /?search_query=& and I ...
0
votes
0answers
4 views

Admin Categories validation

i am trying to validate user input when adding new category through WP , i use jquery.validate() and validation error appeared successfully , but after pressing add new category , the category is ...
1
vote
0answers
22 views

Media Upload , file name changed automatically

I face a problem that when i upload a video that named in non-english language , for example : Arabic , it placed in uploads folder with strange name Ùيديووو so it can't be access through ...
0
votes
0answers
9 views

Disable drag metaboxes, create many functions using js not to work!

when i Disable dragging metaboxes in admin, it seems to make some problems. when i use this code: function disable_drag_metaboxs() { wp_deregister_script('postbox'); } add_action( 'admin_init', ...
2
votes
2answers
273 views

Loading different JS for http and https

I'm using a third party JS file. And they have both http and https version. My site have some pages loading in https while most of pages are in http. Now my question is could I do something in ...
0
votes
0answers
45 views

admin-ajax.php taking a really long time to respond?

I'm loading posts via Ajax and I noticed that it's taking on average about 4-5 seconds for the response. Is this normal? Is there anything I can change in my code below to speed things up? I'm not a ...
0
votes
1answer
19 views

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

I have the following javascript which talks to about 6 elements. The first three open a thickbox for media upload and what not upon clicking on a specified button, the last three target the input ...
0
votes
1answer
19 views

JS files landing on page but not working, using childtheme of twentyeleven

my functions.php from child theme, does not seem to allow the script to run in the page, it works on the styles using @import url. do I need to do something like that with the Javascript or is there ...
0
votes
1answer
21 views

TinyMCE Javascript URL Question

ed.windowManager.open({ file : url + '/shortcode_generator_popup.php', I would like to move this file one folder above the current one that it's in. I'm wondering how I can rewrite ...
0
votes
1answer
36 views

Make tinymce button have a checkbox that returns a value, instead of true/false

from my understanding the checkbox of the tinymce buttons only return true or false? Is there a way to get a checkbox list? And all the item's values inside the checkbox list that are checked will ...
0
votes
1answer
42 views

Why are some custom javascript files working but some are not

I added some custom javascript files to my wordpress page. I put them in the funcstions.php like this: wp_register_script('formfunctions', get_template_directory_uri() . '/js/formfunctions.js', ...
0
votes
1answer
68 views

Trying to get single posts to load on the front page via ajax

I posted a similar question about this before but I changed a bit of the code so I figured I'd start a new topic. Below is the setup I currently have to load single posts on the front page. This is ...
0
votes
0answers
67 views

Add title and caption to thumbnail image on mouseover

I'm trying to add a simple mouseover image to display the images title and caption data. I've added the js in my scripts file which is being called okay yet the rollover is not working. Essentially I ...
0
votes
0answers
35 views

I'm doing this single page website the right way?

I'm making a single page web site using WordPress and I want to know if I'm in the right direction, and if this is the best way do it. First I'll show how the website is structured, it has 4 pages: ...
0
votes
1answer
55 views

How to make Isotope and Wordpress work together?

I am trying to make my Wordpress theme using Isotope plugin. http://isotope.metafizzy.co/ So far, I have such a result after doing that was suggested: I believe that Isotope Masonry should not ...
0
votes
1answer
46 views

AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0

For years I've set up php ajax calls and responses in my plugins like the following, with js error detection conditions as needed like... if( "<e>" == msg.substr(0, 3) ) { do_something(); } ...
0
votes
0answers
38 views

how to pass variable of shortcode of wp to javascript

I have create a shortcode of google map in my theme. whole code is below. function google_map_view_scripts() { wp_enqueue_script( 'googlemap', get_template_directory_uri() . ...
5
votes
0answers
104 views

Custom “Uploads” Dir: “Edit Image” in Media Library broken

Directory Structure I have customized my (local) install (dev box). The current directory structure is: ./root |- wp (WordPress Core root) |- wp-content (Content and Vendor root) \ |- ...
0
votes
1answer
154 views

Loading posts via AJAX in a hidden div with updated URL?

I'm using the code below to asynchronously load posts on the same index page via AJAX. I would like to be able to update the URL as well but am unsure how I can go about adding that to what I ...
1
vote
0answers
12 views

Limit filetype and wp media

This is my input markup: <div class="button-primary" id="fileToUpload">Upload</div> This is js: jQuery( '#fileToUpload' ).click( function() { var custom_uploader = wp.media ({ ...
0
votes
1answer
33 views

Display a div when post has a certain tag

I'm currently developing a wordpress blog site but I think this question maybe a bit of JS magic at the same time so put it here rather than Wordpress Development. I'm looking to create a post and ...
0
votes
1answer
36 views

Using wp_localize_script to store the template url into a variable to use in JS

I was trying to store the template url (bloginfo(template_url);) into a variable so I could use it in my JavaScript. However, I realized this wasn't possible and someone alerted me to ...
0
votes
4answers
76 views

Add js into a theme [closed]

I am trying to create new WordPress theme from scratch. I have working html, css and js files. To add JS into wordpress theme I used: function my_scripts_styles() { wp_enqueue_script( 'easing', ...
0
votes
0answers
18 views

Storing the template url in a variable in JS file?

I am trying to store the image path url into a variable. However, I'm having a bit of trouble as nothing outputs. Can someone help me out? Or is there a more elegant way of doing this? ...
0
votes
1answer
47 views

customize-controls.js - extend api.previewer

I want to remove this check -> if ( value._dirty ) from code snippet below, but as it is located in Wordpress core file(customize-controls.js line 1919) I can't edit that, I need to accomplish that ...
0
votes
1answer
35 views

wp_enqueue_script() not working at all

I'm trying to enqueue JavaScript files using wp_enqueue_script(), but it isn't working at all. Here is my code: function load_css_js() { wp_enqueue_style('gdgt-base', get_template_directory_uri() ...
0
votes
0answers
59 views

Wordpress 4.1 crashes loading of ArcGIS Javascript API

Edit: to keep things organized: This one IS working (WordPress 4.0.1): https://topografieindeklas.nl/topotrainer/provincies/ This one IS NOT working (WordPress 4.1): ...
1
vote
1answer
86 views

What's the proper way to include inlined javascript-source?

I'm making a theme where I'm including a javascript-lib which wants to be loaded/instrumented with a potion of generated code at document.ready()-time. Generated because some theme-options are ...
0
votes
1answer
104 views

Load php function with AJAX on modal window

On a movie information wordpress theme i am developing, i have an href with text "watch trailer" on each cover of all movies. This brings a modal window, and that is working already, but i want to ...
1
vote
1answer
76 views

Add / Update Custom Fields After Select Pictures in Media Window

I just added a button called Add Slider in Add/Edit Post Page. Here's my code in my functions.php : //Add button to create slider add_action('media_buttons','add_my_media_button',15); function ...
0
votes
1answer
30 views

Why load JS through the CMS framework? [duplicate]

Why are we using anything like wp_enqueue_script at all? or register, etc. Why are we sending Javascript through the PHP subsystem? There are all kinds of incompatibilities and inconsistencies ...
0
votes
0answers
14 views

Getting comment-reply to load

I am trying to get the comment-reply.js script to work, and at the moment I am having problems including it in my pages. Currently, I am using the following in my header.php file: <?php if( ...
0
votes
0answers
42 views

Add tinymce dynamically via Javascript

I'm struggling to add dynamically a tinymce textarea. I added a custom meta box which contains a button that should add a tinymce. As I'm on post/page, I guess I don't need to include any scripts ...
0
votes
1answer
40 views

Quick Edit: Selected Custom Taxonomy Not Refreshing After Save

This seems to be a common problem as it was asked here but I can't seem to fix it on my own installation. I've setup a filter to modify the quick edit button to identify the correct selected value for ...
0
votes
1answer
25 views

jQuery + more won't load in header

We moved jQuery to the footer using the following code: function jquery_enque_fix() { if( !is_admin() ) { // Enqueue so we can grab the built-in version wp_enqueue_script( 'jquery' ); ...
0
votes
1answer
39 views

How to disable specific plugin in mobile version?

I am using wp-cufon plugin , to enable cufon on my site . But I do not want cufon in mobile version . If there is any way to disable that plugin in mobile version or in just disable specific java ...
0
votes
0answers
64 views

Post repeating with infinite scroll

I'm working on this page: http://bit.ly/1ujkiFa I'm creating an infinite scroll of books (wordpress posts). If you see the first row of books is this one: But if you scroll down, after it "loads ...
1
vote
0answers
33 views

Override do_item() Function to Add Extra Attribute to Scripts

The WordPress file that do_item() is in can be found here: class.wp-scripts.php Line 142 Line 144 $this->print_html .= "<script type='text/javascript' src='$src'></script>\n"; ...
0
votes
1answer
44 views

How to HTML5 FormData Ajax

How do I use FormData in wordpress ajax ? I am appending files and strings to formdata. var formdata = new FormData(); formdata.append('name', 'This is Name') $.ajax({ url: ...
0
votes
1answer
29 views

Media Playlist Plugin

Alright so recently I purchased an audio player called "Liner" and I am working with it now converting it into a WordPress plugin but the one thing I am having the most problems with is the fact that ...