0
    <script src="<?php echo base_url() ?>assert/js/bootstrap.js"></script>
    <script src="<?php echo base_url() ?>assert/js/bootstrap.min.js">
     </script>
    <script src="<?php echo base_url() ?>assert/js/jquery-2.1.1.js">
     </script>

I link css file same method and it is working, but js file are not working, how to slove this problem please help me.... when i BootstrapCDN link it working correct.

4
  • did you load url helper ? Commented Mar 3, 2018 at 10:49
  • Not working means? what issue you are facing? Commented Mar 3, 2018 at 11:01
  • how to load url helper? Commented Mar 3, 2018 at 11:07
  • when i calling a model of bootstrap it not working and not show thw modal. Commented Mar 3, 2018 at 11:08

2 Answers 2

1

Try this hope it will help you. Make sure you have already loaded the URL Helper

type="text/javascript"

<script type="text/javascript" src="<?php echo base_url('assert/js/bootstrap.js');?>"></script>

OR

<script type="text/javascript" src="<?php echo site_url('assert/js/bootstrap.js');?>"></script>

OR use CDN file

<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.js"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
Sign up to request clarification or add additional context in comments.

13 Comments

i write 'type="text/javascript" ' but it is not working
yes path is correct when i view page source it show me js file content.
have you loaded URL helper like this? $this->load->helper('url');
@ZeeshanHaider make sure in source page it should only show javascript content only when you click on the file url
yes, i load this . Is before load helper what we do in config file?
|
0

you can try this:

add js in your page

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

1 Comment

@ shabbirhasan this online link is working but my js file are not working in which my own function/methods are called.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.