To use Active with scaffold with JRails you have to use a different
JQUERY_VAR than $
In our controllers
1. set
ActionView::Helpers::PrototypeHelper::JQUERY_VAR = ‘jQuery’
or
ActionView::Helpers::PrototypeHelper.const_set(:JQUERY_VAR, 'jQuery')
2. in your layout load both prototype and jquery
<%= javascript_include_tag ‘prototype’, ‘effects’, ‘jquery’ %>
3. Lastly, make sure to tell jQuery to not conflict with Prototype over $ in your Javascript:
application.html.erb
<script type="text/javascript">
jQuery.noConflict();
</script>
Now, you should use "jQuery()" instead of "$()".
eg:
jQuery("#id").hide()
http://errtheblog.com/posts/73-the-jskinny-on-jquery
分享到:
相关推荐
drupal-scaffold, 使用 Drupal/core更新 Drupal scaffold文件的Composer插件 scaffold ( 比如 index.php update.php 。) 插件,用于自动下载Drupal脚本文件,通过编写器使用 drupal/core 。建议在 root root的项目的...
Laravel开发-laravel5-scaffold Laravel 5 API/脚手架/积垢发生器
iDempiere-micro项目脚手架合并iDempiere-micro的各个... rm -rf .git $ wget https://github.com/iDempiere-micro/Scaffold/archive/master.zip; unzip master.zip; mv Scaffold-master Scaffold wget https://gith
快速脚手架 Express 的一个简单性感的 MVC 脚手架,支持和...// create app instance and chain all stuff together,// as you can see, express-scaffold injects models and ctrlers into// app instance, it is
脚手架 .../scaffold version /scaffold reload /scaffold save /scaffold clone https://github.com/Tanpiku/Builds/Axis /scaffold clone https://github.com/Tanpiku/Builds/Alendaur Alendaur2
用法// Here's the custom scaffold widget// It takes a normal scaffold with mandatory bottom navigation bar// and children who are your pagesCustomScaffold ( scaffold : Scaffold ( bottomNavigationBa
开源项目-kshvmdn-scaffold.zip,Scaffold full directories with text-based structure files.
scaffold开源项目(SpringBoot、MyBatis、Shiro、Druid、Beetl 、Ehcache+Bootstrap、jQuery、layer、zTree )
Laravel开发-scaffold Laravel脚手架。
微支架 npm安装 npm安装-g sam-scaffold generate //在要生成项目的文件夹中执行此操作
Laravel开发-laravel-api-generator 只从一个命令中调用laravel api/scaffold/crud generator,包括controller、repository、model、migrations、routes.php update。
which based on the and . The rapid establishment of enterprise application model. 基于 EasyUI 和 前端开发脚手架。快速建立企业应用模型。 ##How to use? ###get project src 获取项目源码 $ git clone ...
弧形封闭式抽屉 曲线抽屉库,方便快捷地使用。...使用弯曲的封闭式抽屉 @override Widget build ( BuildContext context) { return Scaffold ( /// adding curvedDrawer to Scaffold drawer drawer : Curve
微信小程序 小工具类 XCX-scaffold-master (源代码+截图)微信小程序 小工具类 XCX-scaffold-master (源代码+截图)微信小程序 小工具类 XCX-scaffold-master (源代码+截图)微信小程序 小工具类 XCX-scaffold-...
l10n-simplified-with-scaffold plugin files 博文链接:https://cvu.iteye.com/blog/88081
Model with Graphql (Defind Type, Query, Mutation and Input) Database API use Prisma Test the API with Jest.js 会员资料 Use RadarChart to indicate user ability that draws with custom SVG components...
Scaffold asp.net mvc中文教程可实现。按着做肯定能完成,是VS2010版本哦。如果出现错误,可按照错误提示安装POWERSHELL2.0,NUGET1.5
var scaffold = require ( 'assemble-scaffold' ) ; // register the plugin, add options if needed var app = assemble ( ) . use ( scaffold ( { cwd : 'scaffolds/' } ) ) 注册支架 使用创建规范化配置对象: ...
Laravel开发-laravel-scaffold-generate Laravel5积垢发生器
Laravel开发-reverse-scaffold-generator Laravel积垢反脚手架发电机