views:

86

answers:

0

Hi,

I'm trying to set the wordpress posting form to multipart/form-data for a custom write panel. I am attempting to use JQuery but can't seem to get it to work.

jQuery(document).ready(function(){
    jQuery('form#post').attr('enctype','multipart/form-data');
    jQuery('form#post').attr('encoding','multipart/form-data');
});

This is placed into the head of the wp-admin pages so in theory this should set the form correctly but nothing happens.