lib/apotomo/widget/javascript_methods.rb in apotomo-1.2.3 vs lib/apotomo/widget/javascript_methods.rb in apotomo-1.2.4

- old
+ new

@@ -13,25 +13,25 @@ # def hungry # replace # # will render the current state's view and wrap it like # - # "$(\"#mouse\").replaceWith(\"<div id=\\\"mouse\\\">hungry!<\\/div>\")" + # "jQuery(\"#mouse\").replaceWith(\"<div id=\\\"mouse\\\">hungry!<\\/div>\")" # # You may pass a selector and pass options to render here, as well. # # replace "#jerry h1", :view => :squeak - # #=> "$(\"#jerry h1\").replaceWith(\"<div id=\\\"mouse\\\">squeak!<\\/div>\")" + # #=> "jQuery(\"#jerry h1\").replaceWith(\"<div id=\\\"mouse\\\">squeak!<\\/div>\")" def replace(*args) wrap_in_javascript_for(:replace, *args) end # Same as #replace except that the content is wrapped in an update statement. # # Example for +:jquery+: # # update :view => :peek - # #=> "$(\"#mouse\").html(\"looking...")" + # #=> "jQuery(\"#mouse\").html(\"looking...")" def update(*args) wrap_in_javascript_for(:update, *args) end private