All Questions
250
questions
1
vote
1
answer
438
views
How to manipulate a toggle switch with DOM html
I have designed a toggle button using Pug, and I am running function1 whenever it is clicked. But what I want to do is that when the page is loaded I am getting a value from the backend that I want to ...
1
vote
1
answer
758
views
Semantic UI Multiple Modals works but previous modals are closed
Any help in solving this is greatly appreciated.
Semantic UI multiple modals are not working as expected, despite setting allowMultiple: true. In this example I have used 2 modals, a parent and child. ...
0
votes
1
answer
663
views
Jquery - Edit and Save button in datatable to submit a POST request to Nodejs
I am new to jquery and am using datatable to create a table dynamically from nodejs backend on Get request (using pug template and jquery). I have been able to successfully get the data from Nodejs ...
0
votes
0
answers
73
views
Cannot read property 'mData' of undefined - Datatables [duplicate]
I have a table that is getting data from nodejs in Pug. I'm trying to make it a DataTable, so I've followed the steps needed in order to do that. However, I am getting an error 'Cannot read property '...
1
vote
1
answer
38
views
Catch HTML Form "Enter" Press to execute AJAX, not Post
i am currently working on a HTML Form (building it with the pug view engine), that I try to work with in an ajax request after fill-out.
When pressing Enter after editing my input-element, it seems to ...
2
votes
2
answers
86
views
How to animate position absolute from right to left and then left to right in jQuery?
I am trying to make a simple game in which a boat goes from one shore to another shore when GO button is clicked. I tried to use jQuery animate but it didn't worked as expected.
Pug
body
button.go ...
1
vote
0
answers
29
views
Two different id's for retrieving draggable object?
I have this piece of code, which works perfectly in retrieving coordinates for an draggable object, however as you notice here:
$("#droppable").droppable({
accept: "#draggable, #...
0
votes
1
answer
167
views
Ensuring sequential execution of onClick method in one element(Element has multiple classes, each with one onclick jquery function)
I'm working on a project, and have some problems with jquery.
button(class="my-btn do-btn")
Both my-btn and do-btn have an 'onClick' jQuery each, and I need both the events to occur in ...
1
vote
1
answer
3k
views
including jquery in pug template
I am trying to include the jquery library to expose some of its functionality. I have followed tutorials, looks at examples, and I get a weird error which clearly indicates I am not loading the module ...
0
votes
1
answer
210
views
Jquery: Stopping after 1st click
I am trying to implement edit functionality for a HTML element.
Right now my html-pug code is as below
div
label(for="todo" id="todo" + index class="ind-todo-list") test1
button(type="...
0
votes
1
answer
348
views
How can I Append the Id attribute Selector or Store the Id in Jquery variable and use that variable as selector?
I want to perform show/hide operation on textarea element on clicking the replay button using id as selector in jquery but my id is in the form id = "textarea"+dat.description_id i.e dat....
2
votes
1
answer
2k
views
JQuery Increment/Decrement value depending on selected checkboxes
I am mostly there but cant seem to crack this, I have a simple form with check boxes,
form#bookingsToDelete(
action='/list/batchDelete'
method='POST'
autocomplete='...
0
votes
0
answers
124
views
Using DataTables, make search input responsive like the associated table
I'm using DataTables, and would like to make the input / search box responsive.
I can increase the size etc with width however want the search box to be responsive like the table.
What CSS needs ...
1
vote
1
answer
382
views
Jquery not working inside PUG. Isn't recognising $ sign even though I have included jQuery
I have put my jquery code inside pug template but it is not running. I am trying to run jQuery function but I am getting the following error even though I have included the jQuery file too: -
40| ...
0
votes
0
answers
402
views
How to url encode user input on a pug form?
I have inherited a website which involves a heavy amount of pugjs files. Up until this point I had no experience with this technology. Basically, I had a penetration test done and it was determined ...