I’ve been trying to fix this for a while and can’t figure out how to change the format for the date picker so it can match with my database. The date format I need is yy-mm-dd, but it looks the whole function is wrong this is the playground I prepared: http://live.datatables.net/jadorolu/17/edit A…
Tag: jquery
Using jquery code to edit a single list item using the original input box?
I’m finding this code extremely problematic, as it will not edit only a single list item (the item that is clicked), but will instead edit all list items at once to the same input. Any advice is appreciated. Fiddle link below: https://jsfiddle.net/hufflepuff_hamlet/hy564btq/8/ Answer You need to use con…
Display text of select option with button jQuery
Hello guys i have a question here. So in this problem i can’t display the text from selected option while i click order button. For the result i need the selected option i choose and display it into a div. Any suggestion what i must change or add here? P.S : Sorry i’m still learning here, i hope m…
PHP – “&” character gets hidden in $_POST [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I am using a custom PHP file to send data to my JSON file and update it, but if an ‘&a…
Remove parent and child elements on span click with plain javascript
I am replacing a piece of jQuery with plan javascript. I have managed to replace some of it, but I am struggling with a dynamically added element, which should have some sort of on click handler that removes it’s parent and the parents children. Intial piece of PHP code retrives the stored data and disp…
Push all inputs ids and values into json array
I am getting an error when I run this code this way… … but I don’t get the results I want when I execute it this way… I want it to return: It is currently returning: Answer .push() is for array [], for object {} use object[key] = value
Can’t write html dynamically in Jquery innerHtml [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 2 y…
Fabric js – Set Canvas width and height to 100%
I am using the Fabric js 4.3.1 library and would like to be able to adapt the canvas area to its parent div #contCanvasLogo. I’ve made a few attempts but nothing works, the canvas keeps resizing by itself. This is my code but not working: Answer You can set the height and width by retrieving the data fr…
How can i make this JS Slider Auto Play on every three second
Here is a simple JS slider that has a previous and next button to change slide. I want to add one extra feature that is auto play with previous and next button. I tried .setInterval(function() { /* for every three second */ }, 3000); to .getElementById(‘button-next’); to trigger from jQuery $(R…
How to use data-attribute to pass values from database to jquery
I have an issue passing values from a database to a modal pop up using data attribute. My problem is the data-attribute value passes only one value whereas the edit button is in a php loop and should pick the value for each row. Below is a part of my loop code: js So I am testing the values passed