A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
2answers
172 views

Absolutely print script in footer

I am looking for a solution to printing a Javascript include in the footer of WordPress front-end, and I know there are options for this. However, what would allow me to do so with these in mind: ...
0
votes
0answers
80 views

How to block action if post is “dirty”?

For a plugin I'm working, I've added a button that needs to be either disabled or show a warning if the current editing post is dirty, that is, if anything has been modified and not saved. Looking at ...
0
votes
1answer
66 views

Plugin and javascript placement

I am making a plugin. I already use wp_enqueue_script with my javascript files. When shortcode is executed I need to write some javascript code which will contain this piece of code: ...
0
votes
1answer
2k views

Why a SlideShow (made using JQuery FlexSlider) can't work if I load it form functions.php but work if I load it from my footer.php file? [closed]

I have the following situation: I am carrying this pure HTML theme (that use BootStrap CSS framework) into a WordPress theme. This is the original pure HTML demo theme (I have the entire source code ...
1
vote
1answer
267 views

How to correctly add JQuery in a WP theme?

I am pretty new in WordPress and I have the following doubt: I have to include JQuery into a theme and I am doing in this way: I create the following function into functions.php theme file and I add ...
2
votes
0answers
383 views

Customizing the 3.5 “Add Media” popup (Backbone.js)

Here's yet another question in regard to the new(ish) 3.5 "Add Media" popup and how to customize it! What I'm trying to do I'm attempting to do four main things: 1) Create a custom tab titled ...
1
vote
1answer
1k views

Logout user and delete cookies from the client side?

I'd like to be able to logout the user. I can do this by calling wp_logout() on the server but if the user drops connection is there a way to log them out? The wp_logout() method clears the cookies. ...
9
votes
2answers
550 views

Executing Javascript When a Widget is Added in the Backend

I have widgets that have javascript controls attached to them. If the widget is present when the widget admin page loads, the controls work correctly. When I add a new widget, they do not work ...
0
votes
0answers
233 views

Remove WordPress default registration client side validation?

Is there a way to remove/disable WordPress default registration client side validation? I dislike the pop alert and would like to add my own client side validation visual to users. Please assist me ...
2
votes
2answers
402 views

Elegantly using JavaScript on widget admin forms

I'm working on a project involving a lot of widgets, and I'm thinking it'd be really great to have a "More options" section built using jQuery UI Accordion that expands when clicked. So, I've ...
0
votes
0answers
27 views

Embed from wordpress to another site (object within post)

So I'm using the built in wordpress player for my podcast within a blog I syndicate through tumblr. I was hoping to have the player display on other sites. Is there a way to embed the player (maybe ...
0
votes
0answers
58 views

Compare revisions on pending posts doesn't work for authors and lower

I'm using map meta cap to allow extra permissions (edit/publish/edit_others/read_private/edit_private) if the user and post share a category. Comparing revisions doesn't work beyond the first ...
0
votes
0answers
59 views

Click Swatch, Change Image

I'm using the Advanced Custom Fields plugin and am trying to get a series of images to change when their corresponding Swatch Colour is clicked. Here's what I've got so far for my images loop: ...
0
votes
0answers
69 views

Migrating jQuery gallery to Wordpress

I'm moving my website to Wordpress and I'm trying to migrate my old gallery over. This uses Jquery and picasa. I've tried a few ways of loading the scripts, played with jquery versions, even ...
0
votes
0answers
609 views

Multiple Frontend Filters Using Advanced Custom Fields

I've got a series of custom post types set up, and a large amount of custom fields are linked to these post types via the Advanced Custom Fields plugin. I want to set up a series of checkboxes on the ...
0
votes
2answers
128 views

Dynamic Gallery

I'm building a single page website and that means that all the links need to call for post content dynamically. I found this tutorial and with the help from some folks from StackOverflow I managed to ...
0
votes
0answers
153 views

inline script : prettyPhoto setting deeplinking to false not working

This is suppose to be simple but I can not figure it out. I'm using WordPress prettyPhoto plugin for my project and I'm trying to set deeplinking to false (deeplinking:false). In the Chrome console, I ...
0
votes
3answers
224 views

How to move core js files into the footer

while testing for page speed, i found 2 js files that causes the speed delay, according to PageSpeed Insight. files names are /wp-includes/js/swfobject.js /wp-includes/js/comment-reply.min.js how ...
0
votes
1answer
46 views

Scripts are not called until I login from wordpress backend

I am enqueuing custom scripts for slider in header.php but it is not working until I login from backend. I am working on localhost. The code is <head> <meta http-equiv="Content-Type" ...
1
vote
0answers
23 views

How to return Javascript variable to wordpress [duplicate]

I use this Javascript code to create a dialog box to ask some thing to user and after decide what to do depending of the response. function dialogToCont() { var retVal = confirm("Do you want to ...
0
votes
0answers
134 views

DataTables plugin, javascript not working

The javascript (sorting, number of rows, paging) is not working although i have datatables js options enabled in the tablepress plugin. The console does not show any error (like unknown datatables()). ...
0
votes
1answer
37 views

How to add custom javascript into <head> from custom plugin

I wrote a plugin but it keeps adding custom javascript into section not into section of every page. Can anyone help me or give me a hint how to add js into section? public constructor { ...
1
vote
1answer
159 views

Help with AJAX front end comment moderation

I am implementing a front end AJAX comment moderation system for a site I manage but I am having a hard time getting it to work. Right now clicking on the link that approves the comment runs the ...
-1
votes
1answer
112 views

Javascript as Jquery Function Call?

Refer to Nice scroll to wordpress wordpress runs jquery in noconflicts mode which means that you either need to write your JS code using the jQuery function call var seq = 0; ...
0
votes
1answer
3k 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
2answers
118 views

Check javascript file Proper way in functions.php

I am trying to convert html to wordpress. The code in the html was: <script src="js/jquery.nicescroll.min.js"></script> <script src="js/jquery.js"></script> ( jQuery v1.7.2 ) ...
0
votes
2answers
294 views

Nice scroll to wordpress

I am converting html5 to wordpress Theme. I want to use custom scroll for wordpress. The code DEPENDENCIES It's a plugin for the jquery framework, you need to include jquery in your scripts. I will ...
0
votes
1answer
44 views

Post title not saving

I have some custom JavaScript on the admin side, on for counting the posts, the other for checking if a checkbox have been ticked. $('.inside input').on('click', function() { if ...
0
votes
2answers
50 views

Plugin Scripts no loading on options page

I've got this in my main php file, but the scripts aren't loading function class_table_scripts() { wp_register_script( 'JavaScript1', plugins_url('js/wcs.js'), array() ); wp_register_script( ...
0
votes
2answers
565 views

Stop loading more posts if none left AJAX

I'm using the following JavaScript to load more pages in #work_items (see live at http://mtthwbsh.com): jQuery(document).ready(function($){ $('.older a').live('click', function(e) { ...
1
vote
1answer
430 views

How to get this JavaScript working with get_permalink

I am pretty new to this awesome forum, therefore not sure if this question below belongs here. A little JavaScript, which works perfect when I drop a static url in it but I can't figure out how to do ...
0
votes
1answer
64 views

Unable to remove meta box from custom post for all non admin users

i am unable to remove plugin meta box from custom post for all non admin users. Here is the function of the plugin : function PreparePostPageOptions() { global $WishListMemberInstance; ...
1
vote
1answer
2k views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
0
votes
0answers
109 views

Masonry and infinite scroll child theme

I have a question about masonry and infinite scroll plugin by Jetpack. I've added in my function.php file this code: function mason_script() { wp_enqueue_script( 'jquery-masonry' );} add_action( ...
0
votes
0answers
213 views

Infinite scroll not working with Masonry

I've got masonry working, like so: $('.content').imagesLoaded( function() { $('.wrapper, .content').fadeIn(600); $('.index-page .content').masonry({ itemSelector: '.post', ...
0
votes
1answer
86 views

Should I put my plugin javascript inline?

I have a small bit of (localised) Javascript bundled with a plugin. Currently it's in a non-minified .js file, called at via enqueue_scripts. Given that this script will likely run on every page, ...
1
vote
1answer
374 views

is_page not working when loading javascript with add_action in functions.php

This code is working in my functions.php and it's loaded properly: add_action('wp_enqueue_scripts', 'js_custom', 50); function js_custom() { wp_register_script( 'js_custom', ...
0
votes
1answer
2k views

Close Fancybox, sumbit form data and redirect

I have a Wordpress and WooCommerce site for a client, and to create a little twist on the customizing on a product I have a external html-page opening in a FancyBox iFrame using Easy FancyBox plugin ...
0
votes
0answers
52 views

exec JavaScript using add_action when publish_post

How can I execute some Javascript code when an user publish a post I want to do something like this before publish a post: add_action ( 'publish_post', 'custom_links' ); function custom_links() { ...
0
votes
1answer
2k 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 ...
0
votes
0answers
219 views

How to integrate a different (JavaScript) editor in WordPress?

I'been using WordPress since 2005 and although I'm pretty much conquered in all respects, I still wonder how some possibilities are not there for the user. One of them: changing the default TinyMCE ...
0
votes
1answer
437 views

Execution of JavaScript on save post

I got stuck with one problem, can somebody please help.. :) I would like to execute custom JavaScript function before post is saved, and i can't find how to do that. Something like JavaScript version ...
4
votes
3answers
286 views

How to echo JS right after enqueued script to put it into noConflict mode?

I want to include and use third party JavaScript file (Bootstrap Tooltip) in my plugin. Since Bootstrap is highly popular framework and tooltip() is rather generic name I want to make use of included ...
4
votes
4answers
440 views

Include jQuery UI as a whole

Is it possible to include jQuery UI as a whole instead of: wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-effects-core'); // a lot of other jquery ui imports.... I've searched in ...
-1
votes
2answers
379 views

Ensure an external javascript file called from plugin is loaded after jquery is called

I am calling a javascript file from my wordpress plugin code using: add_action('init','gallery_sugar_js_init'); function gallery_sugar_js_init() { wp_enqueue_script( 'gallery_sugar_js', ...
0
votes
1answer
127 views

Trying to fix multiple category drop down

I'm having some problems trying to fix my category drop down on the website i'm developing. Basically one drop down filters has "Sort by Location" and the second one is "Sort by Price" The first one ...
0
votes
1answer
228 views

Creating multiple category drop down

I'm trying to figure out on how to create a multiple category drop down to filter different types of post Here is an image of my work in progress ...
0
votes
0answers
49 views

Trying to customize wordpress drop down categories

I'm having some problems on how to display the categories that i want in wp_dropdown_categories. Here is an image of the drop down - Here is the code for the dropdown - HTML: <?php ...
0
votes
1answer
594 views

Load plugin JS in footer

I am trying to load JS files in my theme's to footer.All my custom JS files are being added to WordPress using wp_enqueue_script, but i am unable to find any way which will help me to load them in ...
0
votes
2answers
1k views

How to Add a .js file Only in one specific Page Dynamically to Head

I need to add some scrips for Google Maps only in my contact page and I do not want to populate it on all pages. I am not willing to create a custom header as well so I was thinking is there any way ...