Evaluating InteliJ IDEA12 (comparing with Visual Studio 2012 + Resharper 7.1)

I am evaluation InteliJ idea 12 (comparing with Visual Studio 2012 + Resharper 7.1)
But I can't seem to make this simple HTML page this work in IDEA 12 when I press Alt-F2 and choose any browser.
--> Jquery does not seem to be executed.
In VS 2012 it just works.

<!DOCTYPE html>
<html>
<head>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
    </script>
    <script>
        $(document).ready(function () {
            $("p").click(function () {
                $(this).hide();
            });
        });
    </script>
</head>
<body>
<p>If you click on me, I will disappear.</p>

<p>Click me away!</p>

<p>Click me too!</p>
</body>
</html>


I am not interested in a IDA12 vs VS2012 discussion, because I want to use both depending on what I need for what project.
The intention is to educate myself on the widest range of languages/tools and IDEA 12 would be a perfect fit.
But why is this not working?

Many thanks.

3 comments

Hi Olaf,

Corrected example (below) works fine for me:

<!DOCTYPE html>
<html>
<head>
    <script src="http://code.jquery.com/jquery-1.9.1.min.js">
    </script>
    <script>
        $(document).ready(function () {
            $("p").click(function () {
                $(this).hide();
            });
        });
    </script>
</head>
<body>
<p>If you click on me, I will disappear.</p>

<p>Click me away!</p>

<p>Click me too!</p>
</body>
</html>


Denis

0

I took the example from (litteraly copy and paste, and the "p" was correct in my IDEA version)
http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hide

This did the trick:
<script src="http://code.jquery.com/jquery-1.9.1.min.js">


But I am curios why it did work when I used VS 2012?

0

There might be a number of reasons like there was an old pre-fetched *.js file mapped to that url.

Nevertheless, the page was broken as couldn't fetch the script file at pure browser.

Denis

0

Please sign in to leave a comment.