Research using CORS first rather than JSONP, it is much easier to use, more secure and more reliable as you can do error handling with jQuery. Support is spotty for IE8 and IE9 but all the other major browsers work fine. Your web server backend code just needs to send a few HTTP headers and it starts working with regular AJAX requests.
If you want browsers to accept a self-signed certificate before they use your service then they need to manually type the server IP into the address bar of the web browser first. It will throw an unwarranted big scary warning first, so manually verify the certificate hashes against the real certificate's hashes then store the exception (trust the certificate). Alternatively you can export the certificate from the server to a file, then users can load the certificate file manually into the browser's trust store which is located in the browser settings/preferences.
Receiving a self-signed certificate directly from the website operator (e.g. in person) then storing it in your browser's cache is much more secure than relying on a third-party like a "Certificate Authority" to sign it. This practically eliminates active MITM attacks and issues with compromised CAs signing fake certificates. However for this to work you would also need to purge your browser from all the pre-signed snake oil certificate authorities so only the self-signed certificate is trusted. If you leave them in there, then an attacker with access along one of the router hops to your server (think intelligence agency) can intercept your connection, create a fake certificate on the fly, present you with the fake certificate signed by the compromised CA which your browser already trusts, then actively MITM your connection leaving you completely unaware, unless of course you manually check the connection details and realise you did not get Verisign to sign your self-signed certificate.... With the pre-trusted root CAs removed from the browser, and your self-signed one explicitly trusted this is no longer possible and you will get a legitimate scary warning if the certificate changes.
Obligatory viewing: Moxie Marlinspike and the Future of Authenticity.