Javascript stopped working [closed]

One of your scripts doesn’t use jQuery correctly: $(document).ready(function () {} This cannot work because jQuery runs in no conflict mode in WordPress. To make it work change the script to: jQuery(document).ready(function ($) {}

Uploading PDF using Media Uploader

please use this code…. (function( $ ) { $( ‘#uploadpdf’ ).on( ‘click’, function() { tb_show(‘Upload the pdf’, ‘media-upload.php?type=file&TB_iframe=1’); window.send_to_editor = function( html ) { fileurl = $(html).attr(‘href’); if(/\.pdf\b/.test(fileurl)){ $(‘#pdf’).val(fileurl); }else{ alert(‘Not a valid pdf file’); } tb_remove(); } return false; }); })(jQuery); </script>