Found out selected tab
I'm using tabs like this: https://jqueryui.com/tabs/ I need to perform different tasks depending on which tab is selected. How can I check which one is selected?
Best way to concatenate two URL parameters into one hidden field
How can I concatenate two URL parameters into one hidden field? For example: sometestingurl.com?color=yellow&thingy=box We'd like "yellow-box" to pass in the hidden field, "finalProd". $('a[href^="http"]').each(function() { var $a = $(this), q = $a.attr('href') ? $a.attr('href').indexOf('?') : -1, contents = $a.html(); if (q == -1) { $a.attr('href', $a.attr('href') + '?color=' + App.getParameterByName('color') + '&thingy=' + App.getParameterByName('thingy'));
Diff between jquery.js and core.j
Hi, I have recently downloaded jquery using npm. I got dist folder with core.js and jquery.js (plus ui and maps). I initially want to use just basic - which one do I need core.js or jquery.js or both? Regards, Janusz
adding a hash to URL in order to access unique content in the page
I have a page build with products that when clicked a panel above shows a content related to the product. this is my sloppy code to accomplish it $(document).ready(function(){ $( ".tab-1-th" ).on( "click", function() { $('.hdr-tab').hide().removeClass("active in"); $('#tabs-1').fadeIn(); }); $( ".tab-2-th" ).on( "click", function() { $('.hdr-tab').hide().removeClass("active in"); $('#tabs-2').fadeIn(); }); $( ".tab-3-th" ).on( "click", function() { $('.hdr-tab').hide().removeClass("active
How to pass URL parameter to form submission
What's the best way to pass a URL parameter to a form submission? For example, in the following URL, we'd like to pass 'cid' and 'eid': domainname.com?cid=12623&eid=fwa3
Can i download a local version from the past release?
Hi, can i download and use on my commercial website the past version of jQuery/jQuery UI form https://code.jquery.com? Or i must use it just as CDN? Thanks
How can I translate the page horizontally left using translate3d and jQuery?
Sideways scrolling seems to be the in thing now, but I do not see much advice on translating the page using translate3d. Ideally, I'd love to be able to translate the page left, on 'Scroll', but I am having trouble with my maths. A few articles said I can use pageXOffset for compatibility, but as I say, I am unsure on how to calculate my maths. Do I have to calculate the width of all items first '#feature--items'? Then translate '-' + x + 'px' based on that? So far (along with CSS) I have this:
UI Demo "Droppable"
Hi I am new here and I have absolutly no experiance with coding or java. But I use "Hype" from Tumult without coding. Now I want to iport the UI Demo "Droppable". But I don't need the squares, I need different pictures. How can I change the code to replace the squares with jpgs? Thanks a lot for helping!
Does the php interpreter get confused when there's a defined FORM submitted to x.php, but also an Ajax call to y.php?
Hi, I'm working with some code that has a standard FORM and Submit button, with the associated x.php to process the fields. But there's also Javascript that refers to a certain section on that form, but which has an Ajax() $_POST call to another url y.php. Is that proper? Since this is essentially a Submit (I think) to one form inside another form with a different submit module, is that considered a nested form? I don't even know if nested forms are ok in php, to begin with, aside from the javascript.
Reorder list elements (by code, not mouse)
I have a list with values and the order from start is a bit random and differs from time to time: <ul> <li>2</li> <li>10</li> <li>5</li> <li>7</li> <li>6</li> <li>8</li> <li>9</li> <li>4</li> <li>1</li> <li>3</li> </ul> How do I reorder the list so that 1, 3, 6 and 7 always ends up first? Also the order of the rest of the elements needs to be preserved. So the result would be: <ul> <li>1</li> <li>3</li> <li>6</li> <li>7</li>
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>
How to get code to stop in hover function when .mole reaches top (0%) and go to game_over()
<html> <head> <style> body{ background-color: #facb56; height:100%; width:100%; overflow:hidden; } .mole{ background-color:rgb(128,64,0); border-radius:100px 100px 0px 0px; height:100%; width:10%; position:absolute; top:100%; background-image: url('mole.png');
Dynamically create button and then remove button when clicked
Hi, I am a newbie and new to this forum so I hope I dont contravene or breach any protocols. I have divs in html and when I click the div I am adding a button. eg attached: <div class="week"> <div class="day wk1" id="day1"> <label for="day1">Test</label> </div> <div class="day wk1" id="day2"> <label for="day2">Test</label> </div> When I add a button by clicking on the div, no problem. $(".day").click(function (e) { e.preventDefault(); var check = $("#day7").width() - 2; var insert = $(this).prop("id");
how I pass a variable to selector
I'm using <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> and I wani to pass a variable at selector $('.cell'+i).each(function(){ var get_val = $(this).val() sum1 += parseFloat(get_val);
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",
JQuery context menu in HTML/js code
Hi, I have an application with some HTML/js code. I am using jquery to show a contextmenu (Version: 1.6.6) in the $document element when I rightclick in a div of this document. With 'autohide' it closes when mouse leaves the HTML document, but I would like to close the context menu in some other situations. This is my first problem, how to close the menu programatically... My code: $(document).contextMenu({ selector: '#' + panelId, autoHide: true, items: ...
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']
Post to admins
Hi learners and admins. There's a big problem jquery's with css. I'll share code and I want to run the code yourself. you'll see the problem. CSS .box .bio { position: absolute; top: 400px; left: 20px; text-decoration: none; color: #fff; padding: 10px 15px; border:1px solid #fff; background-color: rgba(250,250,250, 0.3); box-shadow: 0 0 4px rgba(0,0,0, 0.5); border-radius: 5px; transition: all 0.2s ease-in-out; display: none; } .box .bio:hover { background-color: transparent; } HTML <div
Input Associated with Radio button
I am trying to get the associated input box value of the radio button. But it always returns the value associated with the first radio button irrespective of the radio selection. How to get the write one. Here my sample code <script> $(function (){ $('#viewMyAsyncRequest input').on('change', function() { var obj1 = $("#viewMyAsyncRequest input[name=radioInput]:checked").parents(); alert("content : " + obj1.html() + " value is :" + obj1.find("#inputId").val()); }); });
How does this website animate its beautiful homepage?
Would someone please be so kind as to tell me how this website animates its entire homepage? It has to be more than CSS3 transitions and transforms? Speaking honestly it is hard to find out what they are using as they bundle and minify their Javascript perfectly. I do understand that WebGL is used on this site, but isn't that more graphics properties, rather than animating as such? Their HTML structure is strange too, looks like angular? <x-application ws-root> and <template> are seen here, but,
How to separate crop function and upload function in Croppie.js plugin using jquery
I already got this working codes, but i want to adjust something i want to separate the Cropping and Uploading but the problem i don't know how to get the cropped image result when i clicked the crop button then used it to send on my upload.php when upload button was clicked. i already tried search for same problem as me so i dont need to post a question here and bother anyone but still no luck i also read the documentation but i still dont know what to do. Please help im stuck here.. Thank you ////////////////////////////////////////////////////////////////////////////////////////
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?
jQuery UI Autocomplete: Showing dropdown wrapper when focus (or click) before AJAX
Hey, guys. My Autocomplete's almost complete. Now I want to show the dropdown wrapper when the input got focused (or clicked) in purpose of add a loader inside the wrapper before AJAX. I don't know how to do it. Could you help brother's out? Current code: https://paste.laravel.io/40eb3152-44cf-41de-a9d0-91e8ec3d00bd
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?
jQuery UI Autocomplete: Broken dropdown result
You can see the image above the dropdown is like stacking strangely. How to tacke this problem? Code: https://paste.laravel.io/737bb1ac-609d-4e02-a603-fa34df069bc2 It appears jsfiddle does the same too: http://jsfiddle.net/xpvt214o/496569/
code doesnt work
Pls help... I have HTML <div id="somegroup"> <div id="step1">Step 1</div> <div id="step2">Step 2</div> </div> I have code (add div): $('#somegroup').append('<div class=\"choosen\" id=\"step3\">Step 3</div>'); and it works correctly. But this: $( "#somegroup div" ).click(function() { $('#somegroup div').removeClass('choosen'); $(this).addClass('choosen'); }); works for step1, step2 but not for step3. I need change class "choosen" Thank you very much for help.
Twitter Typeahead: not doing ajax call
Hey, guys. Glad to join here. I have a problem with typeahead. The typeahead is not doing ajax call whatsoever. But when I console.log the Bloodhound engine, it shows. The code is pasted from my another project at which works well, except changing some parameters. However this time it's not calling ajax in the console. I'm using Laravel by the way. The code: https://paste.laravel.io/7cb7de7f-7e19-4441-8c6d-93f7bcc276c8
jqueryform
hi, I'm using jqueryform in an app with requirejs. Unfortunately it seems to cause a SCRIPT5022 error when using internet explorer 11. It works perfectly in chrome. If you clear the cache then the page does load. But refreshing the page will not load. Removing jqueryform from the page and it loads fine. I upgraded jqueryform and it made no difference. So; Firstly - is jqueryform the right tool to be using? or is there a better way? ( we just want to hook into our forms and perform validation before
jQuery for Hiding SharePoint Columns
Hi all I'm new to jQuery, but I've added one to a SharePoint List so hide and show specific columns based on criteria. For example, I have a Choice drop down where users can select either 'US Dollars' or 'Pounds Sterling'. If they choose US Dollars, then a text box (which was hidden) now appears so they can enter in a currency in Dollars.. and vice versa if they select Pounds Sterling. The query works great when a new item is created in the list, however if you then go back into the item later to
How to use a CSS class with the jQuery Bootstrap4 effect
So i'm using jquery effect to put a highlight in certain situations. It looks something like this $("#spanAdultCount").effect("highlight", { color: "#008000" }, 3000); I'd like to have the color used be from scss. I've tried replacing the {color:"#008000")} with function () { $(this).addClass("shannon") } and shannon looks like this .shannon{ color:pink} but that doesn't change the background color to pink, instead it changes the text to pink and it never goes away. with the hardcoding of color:#008000
Next Page