html - How do I make slideToggle() in jQuery? -
i have been trying make tiny color picker other <input type="color">
, , wanted make popup jquery. tried code myself, didn't work. missing something?
$(document).ready(function(){ $('#picker').click(function(){ $('#pickerwindow').toggleslide(); }); });
css
#pickerwindow { display: none; background-color: #fff; }
also, open other types of color picker suggestions.
you sould use slidetoggle()
... not toggleslide()
doesn't exist.
$(document).ready(function(){ $('#picker').click(function(){ $('#pickerwindow').slidetoggle(); }); });
#pickerwindow { display: none; background-color: #fff; height:100px; width:100px; background-color:blue; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="pickerwindow"></div> <button id="picker">picker</button>
Comments
Post a Comment