View Single Post
  #4 (permalink)  
Old October 14th, 2011, 01:32 PM
AdmiringWorm AdmiringWorm is offline
Registered User
Points: 27, Level: 1
Points: 27, Level: 1 Points: 27, Level: 1 Points: 27, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default

regarding the autocomplete, from what I can see from the source in index, you have forgotten to add the data-autocomplete-source attribute:

Code:
<input type="text" name="q" data-autocomplete-source="@Url.Action("QuickSearch", "Home")" />
also the script inside the musicscript file regarding autocomplete should be:

Code:
$("input[data-autocomplete-source]").each(function () {
        var target = $(this);
        target.autocomplete({ source: target.attr("data-autocomplete-source") });
    });
OR

Code:
$(function() {
        $("input[data-autocomplete-source]").each(function () {
        var target = $(this);
        target.autocomplete({ source: target.attr("data-autocomplete-source") });
    });
});
using the first alternative would require you do place the MusicScripts.js reference below the input textbox (either in _Layout below @RenderBody()), or anywhere below the textbox in the index page.

Also make sure you have "UnobtrusiveJavaScriptEnabled" enabled in the appSettings in web.config/app.config