Using jQuery in WordPress plugin admin page?

Posted by Volmar on Stack Overflow See other posts from Stack Overflow or by Volmar
Published on 2010-05-13T10:24:07Z Indexed on 2010/05/13 10:34 UTC
Read the original article Hit count: 197

I have a strange problem that probably have a really simple explanation that i've just havn't found.

I'm making a WordPress plugin and i want to use jQuery in my settings-page for the plugin.

My JS functions look like this:

jQuery(document).ready(function() {
alert('load test');
 //ADMIN FUNCTION
 $('#mrc_imp_img').click(function(){
  alert("test");
  });

 //FRONT END FUNCTION
 $("ul.mrc li").hover(function() {
  $(this).find('p').fadeIn();
 } , function() {
  $(this).find('p').fadeOut();
 });

});

The "load test"-alert is being loaded when the document is ready so jquery is properly loaded. The front end function is being used on pages and that's working fine to.

the problem is the admin function, it's not working at all. is there a speial way i have to write a .click()-function to get it to work on my settings-page for the wordpress plugin?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about wordpress-plugin