Issue with using .Get with a relative path URL.
I'm having an issue using .get and a callback. Basically, unless I use a fully quantified path when I deploy my site the call doesn't work. When I'm developing on localhost, the site works fine. It's an ASP.NET MVC site. I'm fairly new to jQuery...
If I replace the code with an absolute path, all seems fine. Obviously I'd rather use relative paths...
I'd be grateful for any insight you could offer...
Here's the code:
<
script
type
="text/javascript">
$(
function
() { $(
"div.initiative"
).click(
function
() {
var
url =
"/PlayList/Comments/"
+ $(
this
).attr(
"id"
); $.get(url,
function
(response) { $(
"#comments"
).empty(); $(
"#comments"
).hide(); $(
"#comments"
).append(response).fadeIn(300); })
})
})
</
script
>