Welcome Guest, Not a member yet? Register   Sign In
Installing jquery
#11

[eluser]adityajoshi[/eluser]
Will try that today, do you have suggestion how to include google map type autocomplete in my form search field

Any help will be highly appreciated
#12

[eluser]dUspan[/eluser]
another tip

try to use
<base> tag so you wont repeat echoing the base url Big Grin

like this
Code:
<base href="<?php echo base_url(); ?>">


cheers.
#13

[eluser]Amitabh Roy[/eluser]
You can set up your media assets(css, images, js files)which includes jquery in a variety of ways. The two most common approach I find is:
1. Create separate css , js images directories in the same level as the system directory as described by @luckyfella73

I personally prefer to create a single assets directory in the same level as the system directory directory and create images, css , js sub directories in it. So in my case it tends to be assets/js
assets/images
assets/css

and the jquery and css is called in the following way
Code:
<link rel="stylesheet" href="<?php echo base_url();?>assets/js/jqueryui/css/ui-lightness/jquery-ui-1.8.12.custom.css" type="text/css" />
<scr+pt type="text/javascript" src="&lt;?php echo base_url();?&gt;assets/js/jquery/jquery-1.5.1.min.js"></scr+pt>
<scr+pt type="text/javascript" src="&lt;?php echo base_url();?&gt;assets/js/jqueryui/jquery-ui-1.8.12.custom.min.js"></scr+pt>



2. In some cases I maintain a custom config file where I set the paths of the js, images and css directories. In this way it don't cause me any headache should I have to rename or move the directories. In this case the jquery and jquery ui is called as follows:

Code:
&lt;link rel="stylesheet" href="&lt;?php echo $this-&gt;config->item('site_jslibs_path');?&gt;/jqueryui/css/ui-lightness/jquery-ui-1.8.12.custom.css" type="text/css" />
<scr+pt type="text/javascript" src="&lt;?php echo $this->config->item('site_jslibs_path');?&gt;/jquery/jquery-1.5.1.min.js"></scr+pt>
<scr+pt type="text/javascript" src="&lt;?php echo $this->config->item('site_jslibs_path');?&gt;/jqueryui/jquery-ui-1.8.12.custom.min.js"></scr+pt>

Also you can call jquery from CDN as shown by @Christophe28

Hope this helps. :coolsmile:




Theme © iAndrew 2016 - Forum software by © MyBB