How to apply css style on determine row in html table.
Hi, I would like to realize an analysis of data in a table html . That is, I want to know if it is possible in jquery check if all < td > are filled by values , if a < td > contains a value <5 , if another <td>has value " successful " . When one of the cases described above occurs , I would turn red background color in the column row . Thanks in advance. Tegatti
AJAX on a page loaded by AJAX
I have a page index.php for example, on this page I have a menu and depending on what menu option is selected the page content is loaded. One (actually many of these pages) will be forms which I then want to also post via AJAX. However when my page loads via AJAX (add_user.php) I can't post this using AJAX Why?
floating menu, lags during page scroll
Hi guys, I have a floating menu moves together with the page scrolll. Here is my code. $(window).scroll(function() { var bottomHeight = $(window).height()/100*35; $('.logo').css('bottom',parseInt(bottomHeight) - parseInt($(document).scrollTop())); }); Problem is when i scroll move then one frame a time, the menu will look like its lagging. Does anyone know how to fix this? Thanks in advance. Cheers, Thomas
jQuery.each breaks on undefined object
Hi, I'd like to ask some enlightenment on what's the reason behind $.each function breaks the loop when there is an undefined object. This is a sample link
Getting values from array of same class elements in jquery
<tr> <td class="moduleSupport"> 1 </td> <td class="moduleName"> Cargo Hold </td> <td class="currentModuleQuantity"> <input class="currentModuleQuantity" placeholder="Enter current quantity" type="text"> <span class="currentModuleQuantityErr"></span> </td> </tr> <tr> <td class="moduleSupport"> 1 </td> <td class="moduleName"> Crow Nest </td> <td class="currentModuleQuantity"> <input class="currentModuleQuantity" placeholder="Enter current quantity" type="text"> <span class="currentModuleQuantityErr"></span>
'Select' fields in form - problem with adding correct class
Hi everybody! I have simply form in jQuery and I wanted to add more 'select fields'. And I have little problem - I can't figure out how to use Class JUST ONLY AT ONE field - which is active (clicked). Now I have something like this: after click on each field, all fields are being active. But it should be active (new Class) just for this element (field) which is clicked. I tried to add "$this" in some part of code, but it still doesn't work... Any help? Here is DEMO
IE9 Ajax get issue with cookie and session
Hi all, I am having weird issue with IE 9 when making ajax get request using jQuery. I am using jQuery 1.11.4 Here is my get Request looks like. $.ajax({ url: 'AddressTypesListChange', type: "Get", xhrFields: { withCredentials: true }, data: { 'addressType': $("#AddressTypeslist").val(), 'addressId': modelObj, 'type': $('#AddOrEdit').val(), 'companyName': $('#hdncompanyName').val() },
changing the canvas element color on mouse over
hi team, I have a canvas element and i created one circle inside the canvas container, now on mouse over and mouseout i want to change the color of it. Instead of writing two functions for mouseout and mouseover is there any way like binding events(mouseover and mouseout). I have id of canvas container but not the circle id nor class of it. <!DOCTYPE HTML> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> function changeclr(){ var cnvs
MVC Jquery toggle elements when button is clicked
I want to show the album name and category element when the corresponding button is pressed for that song. How do I do this? This is the jquery I have at the moment. Thanks for any help. $('.song-list-btn').each(function(i, obj) { $(this).on('click', function () { }); }); foreach (var item in Model) { <button class="song-list-btn" type="button"> <span class="fa fa-bars" aria-label="Song Details Menu"></span> </button> @Html.EditorFor(model => item.AlbumName, new { htmlAttributes = new { @class =
Problem with detecting click event on an internal layer
Hi, please, take a look to the next code: http://jsfiddle.net/mp3man/sn0gdsfa/1/ The problem with this code, is that when you click over the "green_layer", the "red_layer" click is catched too, and this is what to avoid. There's any way to do it, without changing the html context? Many thanks, Dani
Simple Setinterval Doesn't Work...
Without 'var lightdisplay_info', the function lightning_one works fine . But it doesn't work together with var lightdisplay_info', $(document).ready(function () { var int1; $('#start').click(function(){ var stage_status ='initial_stage'; var num = -1; start(stage_status, num); });//$('#start'). function start(stage_status, num){ int1 = setInterval(function() { //이하 영역은 계속 반복되는 영역임 num = num+1; lightning_one(stage_status,
jQuery mystery: the jQuery expando prop is added to the document object, and I want to know when & why
I've searched the jQuery source extensively for where or why something like jQuery214013829352706670761: 3 is added to the document object, but I can't figure it out. That propname matches the "expando" prop for a given jQuery load, which suggests that this has something to do with events, but I can't figure out where, when, or what the 3 means. I've searched uses of expando and also document in the jQuery source, but nothing looks quite on point. Why is this important? Because I've discovered,
Javascript Debugger - Apatana
I have been accustomed to Aptana Studio. Installing Firefox and Firebug, I ran the script on Firefox Web Browser. But the Firefox didn't detect an error in the following: ------------------ var s1; if ( (s1 > 4 ){ alert('hahha'); } What is the best and most precise method to debug Javascript without any failure. I tried JSLint but it couldn't.
Live search with JSON (Codeigniter)
Hi, I have a problem with $.getJSON function. I am using Codeigniter. My main problem is in view. In console, when typing in search input, I get error 403 forbiden, but variable $test is geting json parameters from database. I am a beginner in jquery. Main goal for this is to make a live search with json. Thanks in advance for any help. Controller code: class Test extends CI_Controller{ public function index() { $data['test'] = $this->Test_model->get('id', 'DESC', 10); $this->load->view('home/inc/header_view');
jquery defragment method
Hey guys whats the most basic usecase of the jquery buildFragment method , its not quite obvious to me as to what are the possibe use cases of this method , can somebody explain ? i see this method used in other methods alot though . but thats the main purpose of this method in jquery ? Thank you.
Create multiple dropdowns from a selection from the first dropdown
I am trying to create multiple dropdowns based on the number selected in the first dropdown. Please help. I am fairly new to jQuery. Here is the code: HTML CODE: <SELECT id="rooms"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option>
Repeating each >
<ul class="steps"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> $('.steps li').not('.animation').each(function(i){ setTimeout(function(){ $('.steps li').hide().removeClass('animation'); $('.steps li').eq(i).addClass('animation').show(); }, 2050*i ); I just want to loop unlimited times this each. How can I do this? At the moment the loop is executed 1 time.
How to use Jquery with Bootstrap Toggle Switch/ In-Line Editing
I have a table with data entries that I want to be able to do in-line editing for while also being able to save it to the console. Additionally, how do I load stored values into the DOM as well as being able to be change and saved. http://jsfiddle.net/bicentennialman/xg5vm2ve/ Thanks
Help me summarize these huge switch statements
Hey guys, so im working on a JS script that basically just takes an ID and value, then disables/enables a bunch of inputs depending on the value type (using a switch statement), then executes another function doing something similar. It works fine, just really ugly. I figured theres gotta be a better way to do it... Heres the code, let me know if you guys have any ideas! syncAttributeSettings(1, 'string'); syncAttributeSettings(2, 'text'); syncAttributeSettings(3, 'select'); syncAttributeSettings(4,
ajax post to c# mvc controller
Hello First time I've tried this, I am trying to make this ajax call do something before the form is submitted. It seems to be working fine as far as it hits my breakpoint inside the AddPostalCode controller, but the postal code in the controller is null. (I'm not getting the value correctly) Any suggestions? Thanks Ajax Call: <script> $('#submitPayment').click(function (e) { // TODO: Validate input var billingAddress = { PostalCode: $('#PostalCode').val().trim()
How would I append an array to the cells of a table?
var data = [ addStudentData("Nic B", "nicb1", "secret", "1", "en"), $("table.table tr td").append(data); Here is the copy of my JSFiddle thus far: http://jsfiddle.net/nicboutte/ac1yyjoq/1/ -Thanks
Wrap each matching element in DIV
I am trying to wrap each matching elment in a DIV. I.E every time an element in Group A matches an elemnt in Group B, wrap them both in a DIV. With the help of JΛ̊KE I was able find the matches but I can't find a way to wrap them. How Can I achieve this please. My code looks like below $(document).each(function() { var pMatch = $('.one li').map(function(){ return $(this).text() }) var sMatch = $('.two li').map(function() { return $(this).text() }) $.each(pMatch,function(i,h)
understanding shorthand document.ready
hello guys , i just have a simple jquery question , now look at the function below :: (function(){ console.log('hello'); })(); its a very simple IIFE now the jquery document.ready has a very simple and similar shorthand , like so :: $(function(){ console.log('hello'); })(); just the dollar in the beginning , now how does . $(document).ready(function(){}); ever turn into $(function(){ }); ? Thank you. Gautam.
jquery
using jquery , In a Grid view count the number of columns and rows and display
Search for element with matching content
Here is what I'm trying to achieve: For each li in .one , search for li's in .two that has matching content, and then wrap them both in div. Any Ideas on how I can achieve this? Below is my code so far. $(document).each(function() { var pMatch = $('.one li').contents(); var sMatch = $('.two li').contents(); if ($(pMatch === sMatch)) { $('.show-here').text('This is Working'); } else { $('.show-here').text('This is not Working'); } }); Here is a link to jsfiddle with
Why is my Hidden value not being assigned to my input text?
I've got this HTML: <input type="hidden" id="BLAhfuseremail" value="warble.p.mcgorkle@geewhizmail.com"> <input type="text" id="BLAboxemailsection1" value="bla"> ...and this jQuery: $('[id$=boxemailsection1]').text('[id$=hfuseremail]').value(); I also tried: $('[id$=boxemailsection1]').text('[id$=hfuseremail]').valueOf(); ...expecting (or at least hoping) that the boxemailsection1 "textbox" will be assigned "warble.p.mcgorkle@geewhizmail.com" It's not happening, though; boxemailsection1 retains the
How to Avoid Delay On First Time Start up of setInterval() Function
Can you please take a look at following code and let me know how I can avoid the delay on only FIRST time of this counting down process? As you can see the counter works fine but there is a delay on first time starting. var sec = 20; var timer = setInterval(function() { $('#box').text(sec--); if (sec == -1) { $('#box').css('color','blue'); clearInterval(timer); } }, 1000); <div id="box">20</div> Demo Thanks
Error in jquery paging
Hi, my application has clientside paging. following is working code .It contains 10 records and display only four. paging also contains forward and backward button . <script type="text/javascript" language="javascript">
$(document).ready(function () {
$('#pages').empty();
$('#pages').show();
var cnt = 10;
var $rcount = "There are " + cnt + " Records";
//alert($rcount);
$('#ContentPlaceHolder1_hdint').val(1).val();
jQuery Menus Acting Buggy on Mobile Devices
I'm working on a test site which can be found here: https://devwww.interfacett.com The menu functionality works fine at any size on a desktop computer, but when I switch to my iPhone the mobile menu gets really buggy. Notably when you click open one of the accordion menus and then use your finger to scroll down the page, it automatically closes the menu. Try it on your phone and you'll see what I mean. The mobile menus uses this code for the functionality: jQuery(document).ready(function(){ function
[Ajax - jQuery] How to return the value from Ajax into a new jQuery value?
$(document).ready( function() { $('#prev').click(function() { var theResponse = null; $.ajax({ type: 'POST', url: 'array.php', data: 'id=testdata', dataType: 'json', cache: false, success: function(data) { theResponse = data; }//success });//$.aja return theResponse; });//$(prev) alert(theResponse);
which control should i use to bind the datalist on pagescroll form client-side...
i need a control that get's binded to datalist on page scroll from client-side,and displays Text = "Add To Cart",attribute and has got onClick event,which passes the attribute as parameter to a method....... right now i m using linkbutton,but it not working on page scroll..... $(".lbtnaddtocart", row).eq(j).attr("CommandArgument", customer.find("ProductId").text()); <asp:LinkButton ID="lbtnAddtocart" runat="server" CommandArgument='<%#Eval("ProductId")%>'
BackColor="Green" Font-Bold="true" Text="Add
Link to previous page and add jump to top
I'm trying figure out how to do two things to help with navigation on a webpage and I was thinking I could do it with a jquery 1) the webpage is pretty log as people add content to it as we go. I want to have the jquery add a link back to a div at the top of the page called #wikititle but I want it to search the page and add this floating right div with the link to the top at each H1 class text that is inserted. 2) I would like have a link at the top of the page that links the user back to the page
Some Jqeury doesn;t work after reloaidn the div using .load
hello; I use this function to reload a div and the google charts on it. The div reloads and loads all the data (without an Jquery) as well. But it doesn't load google charts and also the date picker doesn't work either. I have tested and the jquery is accessible. What could be the reason? Thanks function load_group_stat(item, group_id, start_date, end_date) { $('#interactions_head').load("my_page.php" + "/" + item + "/" + group_id + "/" + start_date + "/" + end_date); return false; }
How to parse in jQuery the ajax success from PHP json_encode?
What is the shortest solution for the following two files? I want to parse all of them into ('#parsehere").html( ???? ); [json.php] <?php $arr = array("Apple", "Banana", "Lemon"); echo json_encode ($arr); ?> [parse.php] <?php ............. success(data){fucntion() ('#parsehere").html( ???? ); } ?>
Matching first or all occurencies with filter?
Assume I have the following jQuery statement: $("p").filter( function(){ return $(this).text().match(/^\s*$/) }).remove(); Is this remove() executed for ALL occurencies which are matched or only for the first found? if latter: How can I appliy the removal to ALL occurencies? Peter
unable to load local json file data on page load of html
$(document).ready(function(){ alert('Level1'); //this is getting fired $.getJSON( "/data/widget.json", function(data) { alert('level2'); //not getting fired alert(data.widgetData.title); }); }); i want to get the JSON data and form html dynamically for the widget....But i'm unable to get the JSON data $.getJSON not working project structure ----------------------- WidgetProject |-------------> data | |---------->widget.json
Jumping to a Marker Inside a Very Big Section in an Accordion Div
People, I have been using the JQuery Accordion structure quite happily for a while but soon one of the divs inside the accordion is going to grow quite big so I either need "sub-accordions" - which seems overkill - or something else. The real need for this direct jump is only going to come from URLs on other web sites and only for this specific subdiv - I tried using: <A HREF="#codeword">... and <A NAME="codeword"> but they don't seem to work inside the accordion div - is there some other mechanism
To repeat setInterval function with prameters
I want to repeat the function to increase the number in Alert. Please visit http://jsfiddle.net/jsfiddle135/3eewhcv0/ If you press the Start, the timer should have been activated with the alert increasing the number.
Converter jQuery--->JavaScript statements?
As far as I know jQuery is completely based upon JavaScript. So assume I am not allowed (or because of other reasons) to use jQuery on a particular web page and have to code something in pure JavaScript. Currently I have the jQuery statement(s) and need the corresponding JavaScript statements. Ok, one jQuery statement could result in 30 to 40 JavaScript statements but this shouldn't count as long as the pure Javascript show the same result. Is there a converter jQuery statement---->JavaScript statements?
Available Datepicker for jQuery v 1.10.2.
Goal: I'm looking for a datepicker for a website. Question: I cannot select any datepicker because I'm using jquery-1.10.2. Do you know any datepicker that use jquery-1.10.2.? It is only enough to retrieve the dates only. Information: *Unfortunatley, I cannot upgrade the jquery because the end users are using old web browser. *I'm using ASP.net MVC and Bootstrap v1.6.3
Next Page