Skip to content

Instantly share code, notes, and snippets.

app.Diseases = function() {
this._input = $('#diseases-search-txt');
this._initAutocomplete();
};
app.Diseases.prototype = {
_initAutocomplete: function() {
this._input
.autocomplete({
source: '/diseases',
class DiseasesController < ApplicationController
before_action :set_disease, only: [:show, :edit, :update, :destroy]
def index
respond_to do |format|
format.html
format.json { @diseases = Disease.search(params[:term]) }
end
@ollac21
ollac21 / app.js
Last active December 16, 2015 21:03
$(function () { // wait for document ready
// init
var controller = new ScrollMagic.Controller({
globalSceneOptions: {
triggerHook: 'onLeave'
}
});
// get all slides
var slides = document.querySelectorAll("section.panel");