Access and hide column only for outer table
I have an outer table and want to hide second column, but not for the inner tables. $('.table-main td:nth-child(2)').hide(); The problem here is that all the inner tables second columns hides as well. So how can I just hide the outer table called table-main and not all the tables within?
JQMIGRATE: jQuery.fx.interval is deprecated - coming from jQuery itself!
I've just updated a project from jQuery 2 to jQuery 3.3. I'm running the JQMIGRATE plugin and I keep seeing the following in Firefox's Console: JQMIGRATE: jQuery.fx.interval is deprecated jquery-migrate-3.0.1.js:76:4 console.trace() jquery-migrate-3.0.1.js:78:5 migrateWarn http://[redacted]/jquery/jquery-migrate-3.0.1.js:78:5 get http://[redacted]/jquery/jquery-migrate-3.0.1.js:89:4 at http://[redacted]/jquery/jquery-3.3.1.min.js:2:56916 This is happening when I use effects such as fadeIn() or slideToggle()
Pricing slider and bootstrap
Hi community, I'm trying to implement a pricing slider where the price is incremental with the number of the slider (i.e. 10 is 200€, 11 is 220€, 12 is 240€...40 is 790€ and so on), and it also needs to be displayed in three different currencies ($,€ and £). This is my first attempt ( https://jsfiddle.net/5vyao3qe/ ) but as you can see the number of the slider is the same than the pricing. Can someone point me in the right direction? Thanks!
json dynamic table sorting
Hi all I was able to create a table out of json file. now i like to add sort when i click on table header. is there a way to do it? please guide me. Thanks kristtee
How to get x-template from html file
Hi: I meet a problem about how to get the x-template from html file. the following is my x-template code snippet <script type="text/x-template" id="TableTemplate"> <thead> <tr> <th width="250px">Model</th> <th width="250px">Name</th> <th width="70px">Share</th> <th width="150px">Price Range</th> <th width="150px">Brand</th> <th width="100px">Options</th>
Why I am not able to get the individual row?
Hi, I have a retured row from my database like this: [{"result":"1","0":"1"}] using: }).done(function(data) { console.log("data: " + data); console.log("data[0].result: " + data[0].result); console.log("data.result: " + data.result); but why my data[0].result or data.result shows undefined? then how can i get the field result? Thanks, Jassim
Strange Responses
Hi: Adapted from http://jsfiddle.net/supercool/550nq015/ using <script src="https://code.jquery.com/jquery-1.8.3.js"></script> Code: When I run this from website it fails and the source of the page shows this code bloc as below <script type="text/javascript"> $("#tenantTable tbody tr").live('click', function (event) { $(".selected").removeClass('selected'); $(this).addClass('selected'); }); </script> ---------------------------------------------- From
Unexpected token w in JSON at position 18
Hi, I've been at this for a day and a half, trying different permutations and code off the web. No matter what is inserted, I keep getting an Unexpected token error. This time, it's token w at position 18. I've simplified the code considerably: var data = { "sssss" : "ttttt" }; // data = jQuery.parseJSON(JSON.stringify(data)); // alert( data ) ; $.ajax({
Just need some help
I would like to know what is wrong and why is the toggle action not working? <div id="dropdown-1" class="dropdown dropdown-processed"> <div id="free-evaluation" class="container gray-row" style="background-color: #e6e6e6;"> <div class="wrapper wk-row"> <div class="wk-col-2 text-center"> <span class="wk-icon-filled-wrench" style="font-size: 5.5rem;padding-top:20px"></span> </div> <div class="wk-col-10"> <h3>Expert Service – We understand the needs of Your Trust Tax Department</h3> <p>Our
Cannot read property 'nodeName' of undefined at Tab._activate (bootstrap.js:3687)
I have a multi-step form that has "Next" and "Go back" buttons in each step. But every time a "Next" or "GO back" button is clicked on the console appears " Uncaught TypeError: Cannot read property 'nodeName' of undefined at Tab._activate (bootstrap.js:3687) ". Do you know what can be the issue? I have a fiddle with the example but in the fiddle the buttons no navigate between the form steps are not working don't know why. Example: https://jsfiddle.net/7r1tg863/4/
Single quote array for typeahead
item.php // Get Catalog $item = new Item($pdo); $item_list = $item->get_items(); echo json_encode($item_list); typeahead-data.js var items = ['Item One', 'Item Two', 'Item Million']; How do I use the data from jQuery to populate the items instead of hard coding? $.getJSON('item.php', function (items) { var typeahead_items = ????; });
Need to pull aria-label attribute into styled dropdown menu script
I have a custom jQuery script that is a sort of lightweight version of chosen.js. The script works perfectly fine, but for ADA compliance I need to be able to detect if an aria-label is present, and pass it into the function. JS isn't my strongest language so I'm scratching my head a bit as to how to achieve this. Could anyone assist in pointing me in the right direction? Thank you! My code so far... ( function( $, window, document, undefined ) { "use strict"; var pluginName = "customSelect",
auto filter and autocomplete
Hi , I need to filter per country first through dropdown select by country, then autosuggest/autocomplete on the input textbox the companies under the countries selected. My question is : How do I pass the variable from dropdown? Here are by codes below : 1st page (index) //dropdown <select name="f_country_id" class="form-control" id="f_country_id"> <option value="?cid=0&code=0" >-- Select Country --</option> <?php while($country = $sql_getCountries->fetch_assoc()){ echo '<option '; if($country['id']
how to remove selected option from other dropdowns
i'm generating table dynamically using jquery. http://jsfiddle.net/qvh7yeut/ now what im trying is to remove selected option in other dropdowns can anybody help?
getting the creation date/time of file you are reading via jq
I am reading a file like this : $.get("/myfiles/awaytoday.html", function(data) { var lines = data.split("\n"); is there a way to get the creation date/time of this file via jQuery?
Help with Active navigation
I need help with getting my active navigation to work. im not sure why it won't transfer prom the home page to lets say the navigation page. Here is my code of what I have done. This is for a school project so any help would be very appreciated. <DOCTYPE html> <html> <head> <title></title> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <div class="background"> <div class="nav"> <a class="a active" href="#">Home</a> <a
Word Count with Jquery, need some help please !!!
I'm using K2 Smartforms and essentially have a Text Area (its named textarea) Underneath the text area there are two data labels, one called WordCount, the other is called Script. Wordcount label stores the actual word count Script, has Literal property ticked and the following expression: <script async defer>$(document).ready(function () { var wrdCountDataLabel = $("[name='WordCount']"); wrdCountDataLabel.parent().find('input[type=text], textarea').keydown(function () { var s = $(this).val() .replace(/(^\s*)|(\s*$)/gi,"")
Invoke class method when slider value change
Hi there, In the following code, how can I make this.setValue to invoke when #sldr value change ? function test() { this.setValue = function () { $("#lbl").text($('#sldr').val()); } $("<input id='sldr' type='range' oninput='this.setValue' min='0' max='255' value='255' />").appendTo("body"); $("<label id='lbl />").text("label").appendTo("body"); } $(function () { new test(); });
Syntax Error Unexpected Character
Hi, I need some help in jQuery where i'm receiving this error when try to run the script. {source} <div class="wrap"> <table class="headerTitle"> <tr> <td> <p class="pTitle">STEP 1 : CHOOSE A DONATION AMOUNT</p> </td> </tr> </table> <form id="donationAmount" method="post" action=""> <div id="divFullWidth"> <table class="option-button-donation"> <tr> <td>
Hover slide out issue
I have a Div - full screen width. Inside that I ave a fontawesome icon with padding around it. When hovered over I want to expand a DIV below. I've got this done and works fine. But; Because there is white space between my icon and my expanded DIV as soon as I mouse out from the icon it goes away. I want it to remain expanded until I move away from the icon and expanded div
how to assign each value of Json to each textbox in the each column of each row
Hi Friends, https://jsfiddle.net/ch2ybdv3/ Refer the above code. I have a Json object and it may have any number of records and I have table with default 5 rows bcoz the requriement is minimum 5 rows should be visible by default. Now I want to load the json object to each row. Lets say I have json object has 10 records then I have to load 5 records to 5 rows and for the rest of the 5 rows I need to create rows on the fly. Can you help me how to load the records to the table. Each rows has two columns
Triger a tab control
Here is my URL problem: https://leadingchair.com/e-400/ Getting to the middle there is a tab control with 4 tabs. I need to catch the second click event and alert something. Anyone knows how? Thx
why this script wont work
<!DOCTYPE html> <html> <head> <title>Page Title</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> </head> <body> <h1>My fruit list:</h1> enter your fruits: <input type="text" id="foo" value="" /><br> <button id="buttonclick">Get Value</button> <ol id="fruitList"></ol> <script> var list = $("#fruitList"); var fruits = ["banana", "apple", "peach"]; function redraw (){ list.html(""); $.each(fruits, function(index, value){$("<li/>").text(value).appendTo(list);});
How to pass an object from a link to a function
Environment is MVC with jQuery. I built a cut down example to show my problem: From my web page I consume getDogs from my Controller: public ActionResult getDogs() { List<Dog> myDogs = new List<Dog>(); Dog d = new Dog(); d.dogName = "Doc"; d.dogBreed = "Many"; myDogs.Add(d); d = new Dog(); d.dogName = "Sadie"; d.dogBreed = "Boston Terrier"; myDogs.Add(d); return
jQuery select input hidden value inside a div
Hi, I have this html <div class="spazio_canzoni_playlist bg-warning"> <div class="orario_playlist">12:40</div> <div class="titolo_autore_codice_selezionata">TEXT - TEXT</div> <div class="aggiungi_play" rel="4157"> <div class="btn btn-danger btn-md">Inserisci</div> </div> <div class="click_play_right start"> <input type="hidden" class="canzone_file" value="value to find"> </div> </div> this is my query function $('.aggiungi_play').click(function (){ // find the class pulsante_aggiungi = $(this);
Updating contents length / size on click
Hi Everyone, new to the forum. I don't know how to title this as it's not easy to explain. I have the following code: https://jsfiddle.net/xpvt214o/448284/ You can click the - in the right of the widget to send it to trash. This works beautifully but I want to be able to offer a way for the user to clear the trash "folder". I first added the following: $( '.trashwidgets' ).append( '<a class="cleartrash" href="#">Clear</a>' ); That works but everytime you add a widget to the trash, it duplicates the
getJSON not working with typeahead
Bootstrap: 3.3.7 jQuery: 1.11.3 Hi Team, I am facing an issue with using typeahead with a ajax response. My input field looks like below, <input class="form-control typeahead" name="referredBy" value="" type="text" id="referredBy" data-provide="typeahead" autocomplete="off"> my js looks like below; $('.typeahead').typeahead({ hint: true, highlight: true, minLength: 2 }, { source: function(query, process) { var url = "not putting in the actual url" matches = [] teamMemberData = ""; var execAjaxEmployeeLookup
jQuery not working on my browser(chrome) for my pixel art project
Please help. I did a project on pixel art marker, but it is not working on my browser. jQuery is not running on my browser (chrome). the following error message is always returned in the console: Uncaught ReferenceError: $ is not defined at designs.js:1 below is the html and javascript code. <!DOCTYPE html> <html> <head> <title>Pixel Art Maker!</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Monoton"> <link rel="stylesheet" href="styles.css"> <script
Eliminate white screen between animations
I have just discovered Barba.js and find it very useful. It provides smooth transitions between URLs of the same website. I have put together a Plunker consisting of two pages (index.html and about.html) that are loaded smoothly, with the help of jQuery’s fadeIn() and fadeOut() methods. $(document).ready(function() { var transEffect = Barba.BaseTransition.extend({ start: function() { this.newContainerLoading.then(val => this.fadeInNewcontent($(this.newContainer))); }, fadeInNewcontent:
jquery-3.3.1.min.js:2 Uncaught TypeError: Cannot read property 'indexOf' of undefined
I have upgraded jQuery version to 3.3.1 in my application and getting the following error: jquery-3.3.1.min.js:2 Uncaught TypeError: Cannot read property 'indexOf' of undefined at w.fn.init.w.fn.load (jquery-3.3.1.min.js:2) at HTMLDivElement.dispatch (jquery-3.3.1.min.js:2) at HTMLDivElement.y.handle (jquery-3.3.1.min.js:2) Please help solve this issue.
Trying to make form fields auto populate upon selection of drop-down
I'm trying to make form fields auto populate upon selection of drop-down. The drop down is for 'company' field (I already have this part setup in Django) which is related to another database table of contacts. I'd like to auto-fill the contact information in the form upon selection of the company. For instance - once you select the company from the drop down, the company address, city, state, etc. will be auto-filled in the corresponding form fields. Thanks for your help!
AJAX POST File failed on mobile
I want created a form to upload document by using POST method to call an API. It did work well in desktop, but mobile browser totally doesn't work on the upload action. Device : IPhone X - IOS 11.4 Mobile Browser: Google Chrome & Safari (both are the updated as now) Html Code: <form id="docsUpload"> <input type="hidden" name="token" value="aa"> <input type="file" class="upload-file" id="brFile" name="brFile" data-text="Find file"> <button id="submitBtn" class="btn btn-custom btn-upload"
Keeping track of last highlighted elements with use of Local Storage
I have a bit of a problem. So I have some tables within list elements, that I can move around and reorder, and also I select them by changing background color. The order of the tables or rather the order of the list elements are saved in Local Storage: function saveOrder() { var mapping = {} $(".sortable").each(function () { var key = $(this).attr("id"); var data = $(this).children().map(function () { return $(this).attr("id");
Changing css elements of classes with the same name?
Hello, I have an issue where I can have multiple instances of the same class being used, but only want to change something simple, like the text color, of one or more of this class, but not have the change effect ALL instances of this class. For example, below I have two text boxes, but they share the same class of "mstrmojo-DocTextfield-valueNode" but I want to be able to change the CSS of the text values independently. So, I may want the text color of one to be RED and the other to be BLUE.
CORB Error retrieving a json file
I am trying to recover the data of a JSON file from the following address: http://www.armada.mde.es/ihm/Documentacion/Mareas/json/2018/bonanza/bonanza_2018-07-26.json This is my code: var settings2 = { "async": true, "crossDomain": true, "url": "http://www.armada.mde.es/ihm/Documentacion/Mareas/json/2018/bonanza/bonanza_2018-07-26.json", "method": "GET", "headers": { "cache-control": "no-cache" } }; and I get the result of the attach picture. Some help to solve it? Thanks
Looping throught current select
$("select[id^='ticket_types_']").each(function () { var selectName = this.name; var selectId = this.id; var buttons; $("select[id=selectId] option").each(function () { alert("aa"); buttons += "<input type='button' value='" + this.value + "'/>"; }); alert(buttons); $("select[id=selectId]").replaceWith(buttons); // add a hidden
After Manipulating the DOM, the click does'nt works
Hi, does someone can help me ? After Manipulating the DOM of the row2 in my table, nothing appen; Please see more explanation and my code here : https://jsfiddle.net/xpvt214o/419272/
ajax
hello all, greetings from me guys i have a problem with below script..... function send_inquiry() { $('#loader_img').show(); $.ajax({ type: "POST", url: "<?php echo base_url();?>ajax", data: { action: "product_model.product_inquiry", name: $('#name').val(), email: $('#email').val(), phone: $('#phone').val(), address: $('#address').val(), country_id: $('#country_id').val(), country: $("#country_id option:selected").text(), inquiry_type: $('#inquiry_type').val(), note: $('#note').val(), pin:
2 DatePickers (Start & End Dates): Restrict date range
I'm using 2 DatePickers (Start & End Dates). I want to restrict the date range so that for whatever date is chosen for the Start Date, the End Date can be up to 2 weeks after the Start Date. How would I do this? For Example: I choose 07/15/2018 as the Start Date, so the End Date can be from 07/16-07/29 . Here's my current DatePicker code: <script> $( function() { var dateFormat = "mm/dd/yy", from = $( "#from" ) .datepicker({ defaultDate: "+1w", changeMonth:
Find the ONLY the next, innermost parent element above contains() target element
It occurs sometimes that I want to execute a function only on the next, innermost, certain element above a matching element. Simplified example: <div ....> ..... <div .....> <a ....> foobar </a> ... </div> .... </div> Only the innermost <div> should be removed. Therefore I coded in the past: $("div:contains('foobar')").eq(($("div:contains('foobar')").length) - 1).remove(); It works. However I wonder if there is a shorter way for this condition. The alternative way should also work if there is
Next Page