materialize

Hide option in materialize select box

青春壹個敷衍的年華 提交于 2020-01-05 09:05:24
问题 Materialize docs - http://materializecss.com/forms.html I want to hide Materialize select option by jquery. I added a class to an option and by using this code $('.break_5').hide(); option is hidden successfully. But it is displayed in Materialize select box. 回答1: According to the docs, in order to update the items inside the select, you must destroy the material and rerun initialization. $('#mySelectID').material_select('destroy'); Then recreate your select with or without certain options

Angular 5 with materialize css

﹥>﹥吖頭↗ 提交于 2020-01-05 07:40:11
问题 I'm learning angular 5. but I was following this tutorial to import materialize css module to my app. Ang with angular2materialize then I run ng serve and it compiled successfully. but when I load the content it return an error Uncaught Error: Couldn't find Materialize object on window. It is created by the materialize-css library. Please import materialize-css before importing angular2-materialize. how should I proceed? 回答1: Use import 'materialize-css'; before import {MaterializeModule}

MaterializeCSS select not working with ng-repeat

我的未来我决定 提交于 2020-01-04 07:53:11
问题 MaterializeCSS select with repeated options (using ng-repeat ) is not working. Kindly assist! <div class="col s12 input-field"> <select ng-model="selected-category" id="category" name="category" class=""> <option value="" selected>Choose Category</option> <option ng-repeat="c in categories" value="c.catCode">{{c.catDescription}}</option> </select> </div> 回答1: I'm having a similar problem. According to the MaterializeCSS documentation, you need to initialize your select with this: $(document)

Why Google Material Icons Can't be Shown on Mobile

你离开我真会死。 提交于 2020-01-03 16:50:49
问题 I am using Materializecss and it uses Google design icons. On some mobiles, Google Material-Icons can'be shown. What is caused it? 回答1: The problems is occurred because of text-rendering property. Text-rendering is not a CSS standart but it allows use to choose text quality. In google material css this property comes with it's default value . If you add this style you will solve the problem : .material-icons { text-rendering: optimizeLegibility; } By this definition, we say to the browser

How can I use JavaScript code in Angular 7?

℡╲_俬逩灬. 提交于 2020-01-03 03:43:33
问题 I'm trying to make a collapsible navbar with the help of MaterializeCSS when used on mobile screen and need to use JavaScript code in it. Where should I write this JavaScript code? This is the code I want to use: **$(document).ready(function(){ $('.sidenav').sidenav(); });** 回答1: Step-1: Created a js folder inside the assets folder. Step-2: Created a new .js file inside the js folder. Assets -> js -> example.js Step-3: Added path of the example.js in angular.json inside the scripts array.

Disable Touch on Materialize Carousel

徘徊边缘 提交于 2020-01-03 00:54:08
问题 It looks like no one has asked this question before since I've pretty much scoured the internet looking for a very simple answer. How would one go about disabling the ability to swipe left/right on the materialize carousel? 回答1: in Materialize.js add/edit: var allowCarouselDrag = true; value: function _handleCarouselDrag(e) { if(allowCarouselDrag){ .... } } You can set the allowCarouselDrag variable per application. 回答2: This is far from a perfect solution, and it might disable too much of

Is it possible to make the materialize.css modal larger and remove the vertical scroll bar?

柔情痞子 提交于 2020-01-01 03:15:11
问题 I just created buttons that pops up a modal once clicked and each button has a modal that shows a different exercise gif. However the modals are too small and it is preventing the user to see the whole gif, forcing them to scroll down. I want to remove the scroll bar and make the modal bigger so that the user can see the whole gif. Any help would be great, here is my codepen https://codepen.io/anon/pen/gPwved HTML <div id="modal1" class="modal"> <div class="modal-content"> <h4></h4> <p></p> <

Stop looping in Carousel materializecss

谁说胖子不能爱 提交于 2019-12-25 00:13:03
问题 I have a material CSS carousel which I want to stop looping after it reaches the last item, instead of returning to the first item it should display a message. similarly, when I hit back it should display a message instead of going to the last item. <div class="carousel carousel-slider center" data-indicators="true"> <div class="carousel-fixed-item center"> <a class="btn waves-effect white grey-text darken-text-2">button</a> </div> <div class="carousel-item red white-text" href="#one!"> <h2

Multiple link dropdown issue in materializecss

牧云@^-^@ 提交于 2019-12-24 21:39:19
问题 I am using materialize css 1.0.0-rc.2. I am having issues in dropdown. Same dropdown is linked to navbar and sidenav but only one of them working and next thing is it should come below the navbar or link when hovered or clicked.What should I do please help? 回答1: I think it won't work for same dropdown structure in both Navbar and Sidebar . Making two dropdown structure can solve your problem. <nav> <div class="nav-wrapper"> <a href="#!" class="brand-logo">Logo</a> <a href="#" data-target=

Cannot get an array of all buttons from a form

谁说胖子不能爱 提交于 2019-12-24 18:52:06
问题 I have several buttons on the Google Apps Script HTML Service form in Google Sheets (I use Materialize framework). One was written and the rest were cloned from it. Need to get an array of all that buttons , but I failed. It had to show 3 elements in an array, but it shows 1. This is the original button which I cloned: <!--Import Google Icon Font--> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <!-- Compiled and minified CSS --> <link rel="stylesheet"