1

I've tried including it in my files, and from a CDN. I followed a tutorial about it, although it's hardly a tutorial to follow since all i had to do was include the link after <head>. Still, it's not being recognized and plugins aren't being recognized and just appear as text. Does anyone have an idea what could be the problem? If it's perhaps a setting in dreamweaver that has to be changed?

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href="myfirststylesheet.css" rel="stylesheet" type="text/css">

<title>Hallo wereld</title>
</head>
</html>
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • If that's really what the code looks like, then it will work. Use your browser developer tools to check for other errors. – Pointy Dec 24 '13 at 14:35
  • How do you know it isn't being recognised? What symptoms are displayed that lead you to this conclusion. What plugins? What do you mean "just appear as text"? Are you trying to write raw HTML in Design Mode? (I've never seen Dreamweaver provide any benefit, and quite a lot of people have had problems with it, you'd likely be better off with a decent text editor like Sublime or Komodo). – Quentin Dec 24 '13 at 14:38
  • To test if Jquery was working i tried to place a button, i just used an example from [link](http://www.w3schools.com/jquery/jquery_selectors.asp). But when i wanted a preview, both in Dreamweaver as in my browser it doesn't appear as a button, but as plain text(/code) in the upper corner. – user3132686 Dec 24 '13 at 15:12

1 Answers1

1

Its worth noting that, http or https in src hinders the inclusion of the cdn files at times.Remove the protocol and try this way....this way, it would take either http or https depending on the nature of hosting server

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script>

EDIT

Further Read on why this helps ( if not running the file from computer but through some server, even localhost):

Community
  • 1
  • 1
NoobEditor
  • 15,563
  • 19
  • 81
  • 112
  • The `>` for the script tag is not missing in the question. Perhaps it was edited after you wrote this answer? – Quentin Dec 24 '13 at 14:36
  • my bad...should have checked the edit history, edited answer... :) – NoobEditor Dec 24 '13 at 14:42
  • Leaving `http(s)` off will break it entirely if the page is loaded via `file://`. – Quentin Dec 24 '13 at 14:42
  • my answered is based on the markup given by OP...can you elaborate more on your last comment please!!! :| – NoobEditor Dec 24 '13 at 14:49
  • Using a scheme relative URL will replace everything after the scheme. Since `http://ajax.googleapis.com/etc` and `https://ajax.googleapis.com/etc` exist, it will resolve properly if the HTML document is loaded via HTTP or HTTPS. `file://ajax.googleapis.com/etc`, OTOH, will not exist. So it will break if, for example, the document is at `file://C/Users/Alice/Desktop/Site/index.html`. – Quentin Dec 24 '13 at 14:51
  • Yeah i noticed it right after i posted it and edited again. I now copied the line you posted, and when i compare it to how it looks here, src isn't red in my document. – user3132686 Dec 24 '13 at 14:54
  • @Quentin : WIDR, i didn't faced that when i used to run it directly on browser without any server!! – NoobEditor Dec 24 '13 at 15:03
  • @user3132686 : is it working for you now???and as per Quentin, are you running the site through some `localhost`?? – NoobEditor Dec 24 '13 at 15:04
  • @NoobEditor: I believe we made some progress! I got the button to work, so i guess the problem's solved. Still not really clear to me what it was that caused it, but this is a good start. – user3132686 Dec 24 '13 at 15:26
  • @user3132686 : added an edit for reference links...please go though them, it'll clear out the answer and please accept this as an answer too!! :) – NoobEditor Dec 24 '13 at 15:32