Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // How can I get the .keyup() to work with the TinyMCE editor in WordPress????
- // Changing #title to #content does NOT work ( the #title DOES work ( not a TinyMCE either ))
- // How do I fix it?
- jQuery('#title').keyup(function() {
- // Variables fetched from dynamically created link
- post_id = jQuery('.thehreflink').attr("data-post_id"); // Post ID
- nonce = jQuery('.thehreflink').attr("data-nonce"); // Nonce
- content = $(this).val(); // Element content
- // The ajax request...
- jQuery.ajax({
- type: "POST",
- url: 'admin-ajax.php',
- data: {
- action: 'myfunction',
- content: content,
- post_id: post_id,
- nonce: nonce
- },
- success: function(response) {
- jQuery('div#output').html(response);
- }
- });
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement