Current Version of Codefight CMS Available for Download:

            « Version 1.5.0 »

            NOTE: The code available is same as the code used for this site at the time of release.

            Codefight CMS is based on Codeigniter PHP Framework which is very easy to learn.

            It would be nice to hear back some feedback. Also you can contribute with code and helping translating language files in your language.

            You can use this CMS in anyway you want. You can modify as you like and use commercially for free.

 

 

Select Language.[TESTING For Next Release.]

English | नेपाली | French | German | Korean

Login | Select Language | Thu, 29 Jul 10 17:16:30 -0600

Using jQuery with Magento Including Protype, Scriptaculous etc...

2009-05-02 03:30:26Damodar Bashyal

 

How to use jQuery with Magento?

Download jQuery from jQuery site

Add this line to the bottom of jQuery.js

CODE:

1-jQuery.noConflict();

Copy the file to the js/jquery folder|directory

In page.xml, add it to the list of js files as:

CODE:

1-<action method=“addJs“><script>jquery/jquery-1.2.6.noConflict.min.js</script></action>

or,

CODE:

1-<action method=“addItem“><type>js</type><name>jquery.js</name><params/></action>
How to use jQuery with magento now?

The below procedure is one way.

CODE:

1-jQuery(document).ready(function($){
2-// Use jQuery with $(...)
3-$('div').show();
4-});
5-// Use Prototype with $(...)
6-$('id').hide();

note: $ sign inside function($).

And another procedure is,

CODE:

1-jQuery(document).ready(function(){
2-// Use Prototype with $(...)
3-$('id').hide();
4-// Use jQuery with jQuery(...)
5-jQuery('div').show();
6-});

There are few more procedures available at jQuery site. But this much information is good to go with using jQuery with magento which uses prototype, scriptaculous etc...


Bookmark and Share

Hi Bashyal, thanks for this post. does this work with the lastest version of magento 1.4? or will it work if the version of jquery is something other than version 1.2.6? ie. version 1.4.2 (latest)

04/06/10 04:13:49|King Rosales

So far i know it works with all versions.

04/06/10 04:15:50|Damodar Bashyal

 

 





Javascript must be enabled to post comments!