materialize

How to disable button using jquery in materialize css

一个人想着一个人 提交于 2019-12-12 15:09:11
问题 I am using jquery to disable a button in materialize css. According to documentation here, the way to disable button is simply by adding a class named 'disabled'.I think by simply add class 'disabled', the button will automatically disabled, but it is not. Here is my code: html: <button id='submit-btn' class="btn waves-effect waves-light submit red" type="button" name="action"> jquery: $('#submit-btn').off().on('click', function(){ $('#submit-btn').addClass('disabled'); }); 回答1: Try this $('

Make materialize labels move out of input box when input box is filled via javascript

…衆ロ難τιáo~ 提交于 2019-12-12 10:29:48
问题 Normally, with Materialize, the labels for text input boxes show up inside the input boxes until a user enter selects the box and enters text in it. However, when a box's value is filled via javascript, the label does not move out of the way. It stays in the box and overlaps with the text entered. Is there a way to trigger the label transition with javascript as well, so this doesn't happen? 回答1: More specifically, if you are using Materialize in Rails with turbolinks enabled, you will find

Materialize css icons doesn't show up in Safari browser

北城以北 提交于 2019-12-12 09:38:38
问题 I noticed that materialized CSS icons does not show up in Safari (v5.1.7 (7534.57.2) . Well searched a lot on this topic but there haven't been any documentation on browser compatibility where safari has been listed. Could anyone let me know if this is a bug which needs to be fixed or are there any alternatives to get this work in Safari. Other browsers Safari Browser PS:Other functionalities of materializecss works well except icons 回答1: I faced the exact same issue. The following approach

Creating a custom materialize directive that works with an {{expression}} in data-activates attribute

爱⌒轻易说出口 提交于 2019-12-12 04:23:40
问题 I'm trying to get the materialize library to work together with Angular. To do so I've written an attribute directive that will initialize the dropdown menu on an element. However, the directive throws an exception (see the dev tools) in the case where the data-activates attribute uses a double-curly-brace expression. Here's a repro (with, for reference, a hard-coded working version as well): angular.module('foo', []) .directive('materialKebab', function() { return { link: function(scope,

Materialize dropdown no working inside a card

家住魔仙堡 提交于 2019-12-12 04:17:12
问题 I'm trying to get a MaterializeCSS dropdown menu working inside a card, but nothing is happening when I click on the button. I've prepared a jsfiddle with the examples from the documentation and all the answers I could find on stackoverflow and google, yet I still cannot get it to work. What am I doing wrong? https://jsfiddle.net/mozfet/3k4dkk6s/ html <div class="row"> <div class="col s12"> <div class="card blue-grey darken-1"> <div class="card-content white-text"> <span class="card-title"

Angular Material and MaterializeCSS Collision

邮差的信 提交于 2019-12-12 03:46:37
问题 I want to use Angular Material's components while taking advantage of Materialize CSS's utilities (text colors, typography, buttons...). However, it looks like both libraries can't work along-side each other. If I try to include Angular Material and Materialize (only css file) the styles looks broken. Now that I'm thinking about it, even the HTML that every library requires is different (I'm talking about the final-compiled html of course). Does anyone knows how to overcome this? I use

Materializecss Select + angularjs

梦想的初衷 提交于 2019-12-12 03:43:09
问题 I have this bug that I can't find and I don't know how to fix. I searched how to make the materializecss select work with angularjs. this is the code I found. function materialSelect($timeout) { var directive = { link: link, restrict: 'E', require: '?ngModel' }; function link(scope, element, attrs, ngModel) { $timeout(create); if (ngModel) { ngModel.$render = create; } function create() { element.material_select(); } //if using materialize v0.96.0 use this element.one('$destroy', function ()

Materialize - dropdown doesn't work

匆匆过客 提交于 2019-12-12 00:34:10
问题 I am using materialize framework for ui design. If you look at my code , the dropdown doesn't show. Please help. <div class="input-field col s3"> <select> <option value="" disabled selected>Choose your option</option> <option value="1">USD</option> <option value="2">CAD</option> <option value="3">HDK</option> </select> <label>Select Currency</label> </div> 回答1: You must initialize the select in your JavaScript. Put the following code just before closing your body tag and it should work fine.

Materialize Navbar Dropdown Menu doens't work

℡╲_俬逩灬. 提交于 2019-12-11 19:28:00
问题 for some reason the dropwdown that appears in this section does not work. https://materializecss.com/navbar.html#! There are no errors in the console, it just does not work, I have researched and tried several solutions that I found github and codepen but nothing seems to solve it, could it be caused by the library version? what should I do? this is my code <!-- Dropdown Structure --> <ul id="dropdown1" class="dropdown-content"> <li><a href="#!">one</a></li> <li><a href="#!">two</a></li> <li