Solved

bootstrap multiselect - what is rong with this script ?

Posted on 2014-12-14
5
742 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 500 total points
ID: 40499234
Needs to be after the jQuery library, not before it.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

726 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