-1

Just implemented the http://terminal.jcubic.pl/#demo on my project in cloud9. It works like a charm and does everything its supposed to.

Project = https://ide.c9.io/wigge/andreas-cv

Website = andreas-cv-wigge.c9users.io/kol.html

Now to the problem. I want it to work in my MVC project in visual studios and as of now, it doesnt.

MVC problem = http://gyazo.com/c24931d3479e6fe2df756e17af542f24

It doesnt seem like the terminal gets the script its supposed to or something, i can write in the terminal but not delete and click enter.

Here my code in MVC(i will give the js-code on files and link them in later) jsfiddle.net/19o39bx1/#&togetherjs=Ux8Mez1pOv

anyone got any idea what it can be?

or maybe someone got a better terminal for me to work with

jcubic
  • 61,973
  • 54
  • 229
  • 402
Wigge
  • 47
  • 9

3 Answers3

1

In asp.ne MVC project by default jQuery files are added to bundles ad included in default pages. I guess you have added your jQuery file referances also. And in jcubic's answer was reproduced scenario when two jquery files were loaded.

Community
  • 1
  • 1
Babken
  • 108
  • 8
0

I was able to reproduce the error when I've included another jQuery after the code,

<script src="js/jquery-1.8.0.js"></script>
<script src="js/jquery.mousewheel-min.js"></script>
<script src="js/jquery.terminal-src.js"></script>
<script>
jQuery(function($) {
    $('body').terminal(function(command, term) {
      term.echo(command);
    });
});
</script>
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>

Check if you didn't included another jQuery (maybe MVC added, check the source for the result page).

This is a bug in jQuery Terminal that can be fixed there.

jcubic
  • 61,973
  • 54
  • 229
  • 402
0

It seems that JQuery terminal emulator scripts is launching before jQuery code is loaded , to prevent this try to implement Your scripts in this order:

<script src="http://code.jquery.com/jquery-latest.min.js"></script>//download jquery
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/0.10.9/js/jquery.terminal.min.js"></script>//download jquery terminal
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/0.10.9/css/jquery.terminal.min.css" rel="stylesheet"/>// jquery terminal styles
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
joint_ops
  • 312
  • 1
  • 5
  • 20