Need clarification on adding JS to content item with JS injector and drupal_add_js
1. Like Shrish mention your code needs to be like this

(function($) {
    // your code here
    $(document).ready(function() {
        $("button").click(function() {
            $("p").hide();
        });
    });

})(jQuery);


2. your code says $("button").click(function() { but in your html there is no button:

&lt;h2&gt;This is a heading&lt;/h2&gt;
&lt;p&gt;This is a paragraph.&lt;/p&gt;
&lt;p&gt;This is another paragraph.&lt;/p&gt;
&lt;p&gt;Click me&lt;/p&gt;


So change this to:

&lt;h2&gt;This is a heading&lt;/h2&gt;
&lt;p&gt;This is a paragraph.&lt;/p&gt;
&lt;p&gt;This is another paragraph.&lt;/p&gt;
&lt;button&gt;Click me&lt;/button&gt;


3. Checkmark inline js in JS Injector