?
Solved

bootstrap multiselect - what is rong with this script ?

Posted on 2014-12-14
5
Medium Priority
?
816 Views
Last Modified: 2014-12-15
it is not working, i just copied an example, what' wrong ? the options are not showing

   <!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>     </title>
        <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">	
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
     	
         <script src="js/bootstrap-multiselect.js"></script>     
    <link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css" media="screen"/>
 	        
    </head>
    <body>
            

            
                        
    
        <div class="panel-group" id="example-collapse-accordion">
          <div class="panel panel-default" style="overflow:visible;">
            <div class="panel-heading">
            <h4 class="panel-title">
            <a data-toggle="collapse" data-parent="#example-collapse-accordion" href="#example-collapse-accordion-one">
            Bootstrap Multiselect
            </a>
            </h4>
            </div>
            <div id="example-collapse-accordion-one" class="panel-collapse collapse in">
            <div class="panel-body">
                <select id="example-collapse" multiple="multiple">
                    <option value="1">Option 1</option>
                    <option value="2">Option 2</option>
                    <option value="3">Option 3</option>
                    <option value="4">Option 4</option>
                    <option value="5">Option 5</option>
                    <option value="6">Option 6</option>
                  </select>
              </div>
            </div>
            </div>
    </div>
    
    
    
   
   <script>


    $(function() {	

        $('#example-collapse').multiselect(
        	{
     	    	   includeSelectAllOption: true,
     	    	   maxHeight: 200,
     	    	   enableClickableOptGroups: true,
     	    	   enableFiltering: true
     	    	   }    

        		
                ); 
	 
	  		
		});	
		
	       
  </script> 
  
 </body>
 </html>   

Open in new window

0
Comment
Question by:sniger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40499155
Probably because these are not found

js/bootstrap-multiselect.js
and
css/bootstrap-multiselect.css
0
 

Author Comment

by:sniger
ID: 40499167
they are found, have you even bother to check ?
0
 
LVL 58

Expert Comment

by:Gary
ID: 40499185
Well you don't have the Bootstrap js file

<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

Open in new window


And get rid of the attitude.
0
 

Author Comment

by:sniger
ID: 40499224
i don't have attitude,

I added the bootstrap  , same thing
   <!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>     </title>
        <script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
        <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">	
        <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
     	
         <script src="js/bootstrap-multiselect.js"></script>     
    <link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css" media="screen"/>
 	        
    </head>
    <body>
        <div class="panel-group" id="example-collapse-accordion">
          <div class="panel panel-default" style="overflow:visible;">
            <div class="panel-heading">
            <h4 class="panel-title">
            <a data-toggle="collapse" data-parent="#example-collapse-accordion" href="#example-collapse-accordion-one">
            Bootstrap Multiselect
            </a>
            </h4>
            </div>
            <div id="example-collapse-accordion-one" class="panel-collapse collapse in">
            <div class="panel-body">
                <select id="example-collapse" multiple="multiple">
                    <option value="1">Option 1</option>
                    <option value="2">Option 2</option>
                    <option value="3">Option 3</option>
                    <option value="4">Option 4</option>
                    <option value="5">Option 5</option>
                    <option value="6">Option 6</option>
                  </select>
              </div>
            </div>
            </div>
    </div>
    
    
    
   
   <script>


    $(function() {	

        $('#example-collapse').multiselect(
        	{
     	    	   includeSelectAllOption: true,
     	    	   maxHeight: 200,
     	    	   enableClickableOptGroups: true,
     	    	   enableFiltering: true
     	    	   }    

        		
                ); 
	 
	  		
		});	
		
	       
  </script> 
  
 </body>
 </html>

Open in new window

0
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 40499234
Needs to be after the jQuery library, not before it.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question