Created
February 8, 2012 21:16
-
-
Save azuby/1773953 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From <%= text_field_tag "from", params[:from], class: "datepicker" %> | |
to <%= text_field_tag "to", params[:to], class: "datepicker" %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a manifest file that'll be compiled into including all the files listed below. | |
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically | |
// be included in the compiled file accessible from http://example.com/assets/application.js | |
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
// the compiled file. | |
// | |
//= require jquery | |
//= require jquery_ujs | |
//= require_tree . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ncaught TypeError: Object [object Object] has no method 'datepicker' | |
(anonymous function) application.js:9748 | |
jQuery.Callbacks.fire application.js:1047 | |
jQuery.Callbacks.self.fireWith application.js:1165 | |
jQuery.extend.ready application.js:436 | |
DOMContentLoaded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Place all the behaviors and hooks related to the matching controller here. | |
# All this logic will automatically be available in application.js. | |
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ | |
`$(function(){ | |
$("a.remove-fields-button").click(function(event) { | |
$(event.target).closest(".fields").hide(); | |
$(event.target).prev("input[type=hidden]").val("true"); | |
$(event.target).closest(".fields").nextAll(".add-fields-button").show(); | |
return false; | |
}); | |
$("a.add-fields-button").click(function(event) { | |
$(event.target).hide(); | |
$(event.target).prev("input[type=hidden]").val("false"); | |
$(event.target).prevAll(".fields").show(); | |
return false; | |
}); | |
$("#from").datepicker("option", "showAnim", "drop"); | |
});` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment