jquery

Semantic-ui dropdown sizing

戏子无情 提交于 2021-01-28 06:29:41
问题 We are trying to passing bootstrap to semantic-ui. <select id="sayfaArama" class="ui search dropdown"> <option value="">Sayfalarda ara...</option> </select> https://i.stack.imgur.com/wXAVS.png I can't change the size of any input or dropdown neither with css nor constant sizing like tiny,medium or massive. I wan't to change the height of the dropdown. Can anybody help ? 回答1: You seem to have a fixed height element. Semantic UI's default dropdown has a min-height. You must change the min

Removing spaces between numbers separated by comma

纵饮孤独 提交于 2021-01-28 06:25:02
问题 I would like to remove any space between numbers separated by "." or "," for example: 10 , 45, 3 should be: 10,45,3 and 10 . 45 . 3 should be: 10.45.3 Any help to do that in regular expressions ? 回答1: Using /(\d)\s*([,.])\s*(\d)/g, "$1$2$3" you should be able to do that var str = "Operations and maintenance $258 .277 billion , Military Personnel $153 .531 billion ,Procurement $97, 757 billion. Research, Development, Testing & Evaluation $63 . 347 billion, Military Construction $8 , 069

what is the alternative of FormData in IOS?

不羁岁月 提交于 2021-01-28 06:25:00
问题 I'm using xmlHTTPRequest (and also $.ajax) to send a form(that contain some text inputs and multi-file input) without refreshing the page. I'm using FormData to send the form successfully on PC (Chrome). When I run the page in my IPAD (IOS), it didn't work. After trying to know where the error was, it seemed that FormData not supported in it. Is there any alternative for it in my case ? var formDataH = new FormData($('#FeedbackForm')[0]); var xhttp = new XMLHttpRequest(); xhttp

css/javascript start faded out by default, then fade in

百般思念 提交于 2021-01-28 06:20:56
问题 I'm trying to make a button that causes a green check image to fade in then fade out again. It mostly works, but how do I make the check start out in the faded out position when the page loads? I tried to put opacity: 0; in its css, assuming that the fadeIn function changes the opacity, but then it doesn't show up at all. function green_check(check) { //fade in half a sec, hold 2 sec, fade out in 3 sec $(check).fadeIn(500, function() { $(this).delay(2000).fadeOut(3000); }); } <script src=

Materialize CSS select: Get selected value when close

霸气de小男生 提交于 2021-01-28 06:09:53
问题 Trying to get selected value on Materialize CSS select element at close. Something like this: $('input.select-dropdown').on('close', function() { console.log($(this).val()); }); just doesn't work, because shows last selected value. First time shows nothing, and next time shows selected value first time. I supose this is because close action is declared before asign selected value. Anyone knows if there is any way to get selected value on "close"? Thanks in advance. UPDATE I don't want to

Add Table Row With Appended Data On Button Click

一世执手 提交于 2021-01-28 06:09:33
问题 This is an expansion of a previous question Dynamically append html table cell and the html has been slightly changed. <div class="docs-main"> <h2>Workflows</h2> <table class="tablesaw" data-tablesaw-mode="stack" data-tablesaw-sortable data-tablesaw-sortable-switch data-tablesaw-minimap data-tablesaw-mode-switch> <thead> <tr> <th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="persist">Workflow Name</th> <th scope="col" data-tablesaw-sortable-col data-tablesaw-sortable-default

Jquery Drag drop - One list with sortable and other list with draggable & droppable without sort

冷暖自知 提交于 2021-01-28 06:00:42
问题 I am trying to drag drop items between two lists, My requirements are, List A (with drag and drop to List B but not sortable) item 1 item 2 item 3 List B (with sortable and drag/drop to List A) item 4 item 5 item 6 i tried the .sortable() , but it makes the List A with sortable functionality, <ul id="sortable1" class="connectedSortable"> <li class="ui-state-default">Item 1</li> <li class="ui-state-default">Item 2</li> <li class="ui-state-default">Item 3</li> <li class="ui-state-default">Item

How to pass Javascript array to PHP file using AJAX?

狂风中的少年 提交于 2021-01-28 05:41:40
问题 I have to pass a Javascript arry to a PHP file while AJAX call. Below is my js array: var myArray = new Array("Saab","Volvo","BMW"); This JS code has to pass JS array to PHP file using AJAX request and will show count of array. function ProcessAJAXRequest() { $.ajax ({ type: "POST", url: "myphpfile.php", data: {"id" : 1, "myJSArray" : myArray}, success: function (data) { alert(data); } }); } This myphpfile.php file has to return the count of the array <?php $myPHPArray = $_POST["myJSArray"];

Td text with ajax call on table not clearing previous data

杀马特。学长 韩版系。学妹 提交于 2021-01-28 05:41:39
问题 I have a payment table that contains details of payment and each table row has a view button. My problem is when the modal is open you will see the first table row is blank. Blank table row: Second, when I close the modal and open the modal again it will look like this: Another thing I've seen is when I open another payment details it will look like this. As you can see the three data payments are for the previous opened modal. The snippet: var data = { "sales": [ { "sales_id": "3", "sales

Set the product type to “variable” by default in admin new product pages

微笑、不失礼 提交于 2021-01-28 05:40:59
问题 I'm creating a WooCommerce store with variable products only. When creating new products I always need to manually change the Product Data to Variable Product. When you have hundreds of products, this is becoming kind of a pain :) I've searched around the Internet but wasn't able to find anything... <php? // Code here ?> I'm looking for a PHP snippet to set Variable Product as default when creating new products, any ideas? 回答1: Updated - The following code will select "variable" by default on