A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

2
votes
0answers
15 views

Script won't execute in the media manager

I'm trying to execute a jquery script on the click of a button in a custom tab of the media manager, but it does not seem to work. I have been told this might be due to the button not being loaded ...
0
votes
1answer
65 views

TypeError: $ is not a function Error using parallax effect in Wordpress Template [duplicate]

I`m trying to include a parallax Effect into one of my cutsom page templates. The js function is returning the following error in the firebug console: TypeError: $ is not a function The error is on ...
2
votes
0answers
22 views

Detecting Wordpress Customizer Panel

Recently started developing a Wordpress theme relying heavily on the customizer API. One thing I'm stuck with is detecting when a specific panel has been clicked or opened. Regular old "on click" ...
0
votes
1answer
23 views

How to toggle custom WP archive list

Help! I'm trying to toggle the "SideDish Archive" list in the right-hand sidebar of this page – http://my-table.com/sidedish/. I don't know really anything about javascript. Small company, small ...
0
votes
0answers
37 views

How to include JavaScript script only on specific page [duplicate]

I am creating my own widget. I need to use custom css and js files. I have used wp_register_style`wp_enqueue_styleandwp_register_script\wp_enqueue_script` functions in order to register custom styles ...
0
votes
2answers
29 views

Javascript not working on index.php but it is working on single post's page

I am trying to use mathJax in my wordpress. According to the documentation at mathjax, the mathjax script url needs to mentioned in headers.php. Which is exactly what I did. And right now this is what ...
0
votes
0answers
17 views

Widget save brake jQuery [duplicate]

I have created a plugin that creates a widget. On the widget form i am using jquery functions that i load using wp_enqueue_script. When adding the widget on a sidebar, everything works. Then when i ...
0
votes
0answers
22 views

Multi-step Frontend Filtering to Reveal Content

I'm not even really sure the best and easiest way to go about doing this - or what the right verbiage is to properly describe what I'm wanting to do. On my site I'm looking to change this selection ...
-1
votes
1answer
40 views

jQuery append only works if I select html in admin section [closed]

The following jQuery code works as expected, in that it inserts the specified html after the closing tag. $( "html" ).append( "<div id='bf_rsvp_note_display'></div>" ); However, that's ...
0
votes
0answers
45 views

Angular js template to wordpress theme conversion

Hi all currently i am working for angular template conversion to a wordpress custom theme development, I can able to fetch the post data, I am bit get stag with getting our menu's as dynamic. Here is ...
1
vote
0answers
22 views

wp attempt focus, disabling without touching core

So i've added an extra field to the login form. I have used js to place it at the top. However, whatever I do I don't seem to be able to change the tabindex(or start focus for that matter. Is there a ...
1
vote
1answer
51 views

wp_enqueue_media() Will not load JS on the theme

I've added wp_enqueue_media() to a specific page (before including the header) on my custom theme but it flat out will not any of the JS on the page. I've already done the basic troubleshooting: ...
0
votes
0answers
20 views

Allow one use group to manage another

I have a website where members and their managers have accounts. The members can create and upload their content, but the managers have their own login and can see a list of the members they manage. ...
-4
votes
1answer
52 views

Widget won't work due to old JavaScript? Any ideas how to make it work? [closed]

I was trying to add this widget to my blog <!--BEGIN PROFILE WIDGET--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript">&...
0
votes
1answer
213 views

Integrating PHP into Javascript to display map markers with Google API

I am getting one map marker to display but not multiple markers. However the data displays in the HTML log. I think I am missing a loop or did not use my current loop correctly. Anyone who could ...
0
votes
0answers
30 views

wp_enqueue_scripts doesn't work for template pages

In my child theme's functions.php I wrote : function add_js() { echo "path is : ".get_stylesheet_directory_uri().'/js/script.js'; wp_enqueue_script( 'script', get_stylesheet_directory_uri().'/...
1
vote
0answers
54 views

Tinymce.js editor in Chrome?

For 3+ years I had a custom styles menu in my Wordpress editor that I added in functions.php which worked great. Today, I went in to edit a new post, and not only doesn't my menu work, but I cannot ...
0
votes
0answers
16 views

Importing External JS to Wordpress

I want to place this code on my WordPress site: http://codepen.io/FWeinb/pen/hlEke. The HTML and CSS codes can be placed without any problem. But I'm getting stuck at placing the JavaScript code. I've ...
3
votes
1answer
37 views

How to report JavaScript errors in the admin panel

Real life scenario for a context: A two instances of a JS library, each from different version are being loaded. Since the library do not keep backward compatibility someone code will probably fail, ...
0
votes
1answer
62 views

Setting value of session with Ajax not working

I´m kind of new to using Ajax but I am trying to update the value of a session using Ajax. The Ajax call shoud fires when clicked on a button. When I click on this button it also returns the succes ...
0
votes
2answers
40 views

Is it save to use eval for a jQuery callback method coming from the database?

I'll be brief and hope I can explain my scenario correctly. Here's my scenario. The jQuery slider plugin has an anonymous callback method. I would like to give the Admin the ability to create a ...
0
votes
0answers
10 views

Widget not notifying customizer of changed value when updated via Javascript

I'm developing a wordpress theme that relies heavily on widgets for flexibility. I'd like to use the wp media javascript library to add images to some of these widgets instead of just having a text ...
0
votes
0answers
72 views

Wrap Javascript embeds like Twitter and Instagram?

Is there a way to wrap Javascript embeds like Twitter and Instagram that don't use the iframe/embed type embedding? I am able to do this when those embeds (Twitter and Instagram) are using oEmbed, ...
-1
votes
1answer
43 views

JS file not loading [closed]

I am trying to link to my javascript file in WordPress to manipulate the navigation bar. Here's the call in functions.php: add_action( 'wp_enqueue_scripts', 'scrolling_navbar_enqueue_js' ); /** * ...
0
votes
1answer
45 views

Why isn't my custom Javascript showing up in my custom template?

I'm in the process of converting an HTML homepage to WordPress format and I'm not sure what to do with the Javascript that's included within the of the index.html homepage (as opposed to the JS ...
0
votes
1answer
16 views

js solution to… Commentor can only post one comment BUT can reply to their comment tree unlimited [duplicate]

This question is very similar but not exactly the same as this.. One comment per user per post but be able to reply to existing comments I'd like a js solution so it doesn't need to modify any of my ...
1
vote
1answer
134 views

AJAX success response is not working but it's saving my changes

I'm a beginner in jQuery-Ajax so please bear with me. My Ajax response does not seem to load but my changes are being saved. but gives me this error on admin-ajax.php "call_user_func() expects ...
0
votes
0answers
22 views

Grabbing post content in real time with javascript

I am working on a plugin that adds a metabox on the create/edit post page, in that metabox I want a dropdown with all the anchor texts for the a tags used in the post. I haven't done the parser to ...
-2
votes
1answer
28 views

Jquery dropdown menus working locally, but not in Wordpress [duplicate]

So I've followed this tutorial to the T, even downloading source files and implementing locally: http://red-team-design.com/simple-and-effective-dropdown-login-box/ I also saw another poster here ...
0
votes
0answers
77 views

custom jQuery on a GravityForm - it runs when submitting the form (and it shouldn't)

I have a custom jQuery function I wrote for one of my forms, which filters Dropdown B based on what the user chose in Dropdown A. It works just fine, except for when someone tries to submit the form....
0
votes
1answer
40 views

Search and Replace Script Loader in Head Only Works in Footer

I've got a function that uses script_loader_tag filter to search and replace adding asynch="asynch" attribute. It works. I don't want this doing anything in the footer, but rather the header alone. ...
0
votes
0answers
11 views

Modify the forms control in the theme customizer using jquery or js

i'm trying to modify the input boxes which i created using $wp_customize from the theme customizer, for example if a select box from the theme customzer changes of value, the other select boxes hide. ...
0
votes
2answers
189 views

Where to paste Google Map Snippet / JavaScript / CSS for WordPress integration

I have a working JS Fiddle here: http://jsfiddle.net/geocodezip/50g6vgns/1/ It is not displaying correctly when I paste all the code onto the text area of a WordPress page. For the external ...
0
votes
2answers
60 views

Prevent Wordpress from adding linebreaks to javascript embedded in a page

On a page in Wordpress, If I enter the following code: var r='<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>'; it is rendered in the ...
-1
votes
1answer
51 views

What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]

I'm new in wordpress theme development, I want ask some question here, I want to make a parallax effect for my theme header like this: TestParallax.com this is made by using some JS code, I want to ...
0
votes
2answers
639 views

Call a javascript function from another file

In wordpress, to use $ instead of jQuery prefix, i added the following code around all js code: jQuery(function($) { ... }); It works well, but i cannot call an object from another javascript ...
0
votes
1answer
276 views

Referrer URL with jQuery or Javascript - Cache & Referrer URL Issue

Hope someone can help me : ) What Im trying to do is, get the first visit referrer and send it to form. We user Contact form 7 plugin, so I created a hidden input, get the referrer URL and assign ...
0
votes
0answers
89 views

WordPress & iDangerous Swiper

Sorry to bother you with whats probably an easy thing: I came across a nice carousel created by iDangerous that I would like to implement into a WP theme. Do you guys have any suggestions on how to ...
0
votes
3answers
86 views

Wordpress text widget with onclick function

I have a text widget, in it i just place there an iframe. A few days ago i wanted to override this widget on mobile browsers and add a background of an image on mobile browsers, luckily i used How to ...
1
vote
1answer
347 views

Refused to execute script from '***' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled

I am facing some UI issues with my wordpress website. The newly added "Author" role is not able to see the formatting toolbar while writing the post. After debugging, I found a javascript error which ...
0
votes
0answers
70 views

How to include jQuery and JavaScript code in metabox?

I am trying to include jQuery and JavaScript code in a metabox but it is not working. Can anyone give a suggestion how I can achieve this? function prefix_enqueue_scripts3() { ...
0
votes
0answers
104 views

add attachment-filters on custom modal-media insert

how can I do to have the attachment-filters menu in my upload window? my upload wordpress deafult upload console.log("enqueque on metabox.php - media3.js"); openMedia = { data: false, v: ...
0
votes
1answer
77 views

Why I'm Not Having Access to “$_POST” Data Outside My AJAX Callback?

I'm trying to pass some data from the Back-end to JavaScript. The thing is, when I try to console.log() the variable passed through the wp_localize_script() it shows me on Console the structure that I'...
0
votes
1answer
297 views

Divi theme including javascript

I have tested the html and the css and the js independently of wordpress and all works fine. So trying to integrate it into wordpress. I have added the html code as a code module. I have created a ...
0
votes
1answer
87 views

Custom AJAX form not working async

I have a contact from that uses PHP mailer that I have integrated into my Wordpress blog. The script sends emails no problem - the issue is that it does not work async so once the form is submitted I ...
0
votes
1answer
24 views

About a programming language starts with <# #> [closed]

Is that a Javascript code?? The following code inside a php class file but after closing php tag start these lines and the [data] variable not defined in this class i want to trace the [data] ...
-1
votes
1answer
300 views

Create new product with woocommerce REST API with javascript (clientside)?

Is it possible to create new products in woocommerce using its API with javascript from clientside? I tried this for getting all products: endpoint: https://localhost/wpShop/wc-api/v2/products?...
1
vote
1answer
65 views

How to select the contents in the text view textrea in wp_editor?

I am trying to count words among other text stats entered into the default post editor (wp_editor). Its supposed the write word count out to <div id="word count"> in the meta box immediately ...
1
vote
2answers
58 views

Creating a Multi-Level Associative Object Using AJAX

I'd like to create a Multi-Level Associative Object on $.post method using WordPress, in order to make my code cleaner. The problem is, I don't know how to get those values to manipulate on the back-...
0
votes
1answer
54 views

comment-reply.js disables any other form javascript

I want to add autosize.js to the form textarea (#comment) but if comment-reply.js is enabled no other javascript in the comments form works. Any idea why is this happening? //Auto resise textarea ...