Add a class to expanded row using vanilla JS

In my angular application I am attempting a workaround because the ag-Grid api getRowClass() is not working at intended. All I need to do is add a css class to an expanded row and remove it when the row is collapsed. The original method using ag-Gr...
more »

2017-11-15 21:11 (1) Answers

AngularJS with jQuery for selecting parent element

I'm posting my html and directive code. I have two spans, which I have attached ng-click to. On ng-click I want to check the classes of their parents parent item (.parent-portlet), but what I have so far is not working correctly as all of the parent ...
more »

2017-11-15 15:11 (3) Answers

Get id of an element with the same class

I have multiple div boxes with the class printPic which will have their own unique id. On hover in/out, toggle the display of printPicOverlay which is a child of printPic. The way I have it set up now, printPicOverlay for all ids are toggled on hover...
more »

2017-11-14 17:11 (5) Answers

ASP.Net MVC Usage confusion

I'm in a situation where I would like to take a value from a page using JQuery, update the model with that value, call a method to update a different value in a model. Then call the controller to return a view with the new model. I'm new to this so ...
more »

2017-11-14 12:11 (1) Answers

DRY Then and Always in jQuery Promise

I have the following example JS code: function loadData(url, data) { return $.get(url, data ? data : {}); } function example1() { showSpinner(); $.when(loadData('/example1', { hello: 'world' })) .then(function (resp) { ...
more »

2017-11-14 11:11 (3) Answers

animate jquery working only once

I am trying to use a simple animation feature of jquery. In my application, I have two button " Slide Right" and "Slide Left". When we click on these buttons, these move the box to left or right respectively. My move right button is working perfectly...
more »

2017-11-14 03:11 (2) Answers

DataTables Loading and Rendering Delay

I am using DataTables with Bootstrap 4 and client side processing. Displaying around 2,000 records. The loading time is acceptable, however I notice that when I reload the page (F5) I can see an un-formatted DataTable for a split second. It's almos...
more »

2017-11-13 18:11 (2) Answers

Memory Game doesn't restart after winning

I'm trying to rebrand this cool Memory Game developed by Nate Wiley. I'm having an issue with it though. When you win, it allows you to restart, but the game become unplayable when the cards re-appear for a second time. The restart button code call...
more »

2017-11-13 17:11 (2) Answers

How to toggle <li> in a nested list

Im trying to be able to toggle these sub menus one at a time, im getting lost in nests and cant quite figure out how to target the correct list item, I found that i should be using find() instead of children() as it can go deeper in the nest but sti...
more »

2017-11-13 16:11 (3) Answers

How to calculate the total number of passengers

I want to code to calculate the total number of adult, child and baby passengers. I tried with jquery but did not count the total number of all the passengers. Thanks in advance https://jsfiddle.net/devefrontend/21036h5c/12/ $("select").on('ch...
more »

2017-11-13 10:11 (5) Answers

Implement directory system in rails

I want to implement directory system in my rails app. User will have some abilities to manipulate directory. Create new folders and delete them. User will be able to upload only validated format based files in selected folder. Folders can also cont...
more »

2017-11-13 08:11 (0) Answers

Find specific attribute and get its value

I have this: <button>Click</button> <p class="intro" voice="next,1">My name is Donald.</p> and need to find the "voice" attribute and fetch its value "next" I tried this by looking all the question but it shows undefined. ...
more »

2017-11-13 07:11 (5) Answers

Load div on the page one by one

<script> $(document).ready(function(){ $( "#clr" ).each(function(i) { $("#clr"+id).fadeOut(0).delay(1000*i).fadeIn(1850); )}; }); </script> <div class="row" id="clr"> <a href="wishfinal/" class="custom" id="cl...
more »

2017-11-12 07:11 (3) Answers