Change bg colour on rows based on cell value
I have a column containing "Section1", "Section2" and "Section3". I want to find the right column (first one), and the cell that contains "Section1" and for that row I want to set a blue background. Also I want to do this for all the rows beneath until "Section2" is found. Then the row for "Section2" will have another colour, as well as the rows beneath until "Section3" is found and so on... This is the result I would prefer: How could I achieve that? <table class="fooBar" width="200" border="0">
Find all cells within a specific column and change color on certain characters
I need to perform the following on my table: Find a specific column by it's name or class (<th class="ColHeader1" scope="col">ColHeader1</th>) Within that column I need to find all the cells containing "1" The cell could contain a string like "1, 2, 3", and then I need to set the color red only on "1". How can I do this with JQuery? So here is the table: <table class="fooBar" width="200" border="0"> <thead> <tr> <th class="ColHeader1"><b>ColHeader1</b></th> <th class="ColHeader2"><b>ColHeader2</b></th>
Jquery click event is not getting triggered in the mobile browsers
Have been trying to perform a DIV hide show on a page of my website. It was working fine with plain javascript but noticed it was not working when simulated on mobile devices..after bit of research I changed my code to the following, is there anything wrong in it ? <script>
$(document).ready(function () {
var portfolioDiv = document.getElementById('portfolio');
var resultsDiv = document.getElementById('results');
$('#RenderPortfolio_Btn').on('click touchstart',
How do I save and restore select options?
I have a report selection page with one select element. I have 44 options now but expect the list to grow. What we'd like to do is have a radio button for each category and a button for all. My idea was to save each logical group of options into global variables in the document ready() function var allElems = save all options var mixedElems = save 'Mixed' class options var tbElems = save 'TB' class options var qhElems = save 'QH' class options
DatePicker and timepicker
Do most datepickers come bundled with timepickers ? or are both totally different ? , i found this really nice date picker here https://bootstrap-datepicker.readthedocs.org/en/latest/ , but then is it also a timepicker , which is a great plugin if you want both functionalities ?? Thank you. Gautam.
If statement
I have form input with default value of the product bid price. The input has an id of jsBidPrice. And there is another input without any value and has and if of minBid. <form id="placeBid" action="/add-new-bid/{{$product->id}}" method="Post"> {!! csrf_field() !!} <input type="submit" id="bidSubmit" class="btn btn-success" value="Siūlyti kainą" style="float: right" /> <div style="overflow: hidden; padding-right: .5em;"> <input type="hidden" value="{{$product->bid_price}}"
How do you keep current, paginated-items on refresh/reload?
I am trying to figure out if there is a way to keep the current, paginated items on the page after refresh/reload, i.e. if I were on the 2nd paginated-section, keep the data after page reload. So far, I have the list of entries & pagination installed onto the HTML page: <div class="blog-entry blog-post" style="display: block;"></div> <div class="blog-entry blog-post" style="display: block;"></div> <div class="blog-entry blog-post" style="display: block;"></div> <div class="blog-entry
Does jQuery.validate.js has internationalization or localization options ?
Does jQuery.validate.js has internationalization or localization options ? If yes, how can we achieve that? If no, still Is there any other tools or pugin or anything which helps me to achieve that through jQuery.validate.js ?
Loop through select values with image
Hi, i have a select box which accepts multiple selections (Bootstrap Select) when an option is selected i want to display an image. The image part i have done! It successfully echo's an image based on the value. But how do i loop through the options so it shows multiple images when more than 1 option is selected. $(document).ready( function() { $("#PrimaryTrade").each(function () { $(this).on('changed.bs.select', function (e) { $("img[name=image-swap]").attr("src","/images/icons/" + $(this).val()
[SOLVED] Accessing data sent from done event in a ajax request?
Hi, imagine you have the next ajax call: $.ajax({ type:'POST', async:false, url:'../../NectarUI/Functions/updatvalii.php', data: {ala:idal,lat:$('#ubilat').html(),lon:$('#ubilon').html(),calle:$('#ubicalle').html(),numero:$('#ubipiso').html(),ciudad:$('#ubiprovi').html(),pais:$('#ubipais').html(),ag:$('#codagente').attr('name'), piso: $("#editPiso").val()} }).done(function(res, st, xhr) {
An example is giving me trouble
Hello everybody, I´ve got a little problem. There's an example in: swipe-list.html that I'm taking by reference to delete items in a list. The problem is in $( "#confirm #yes" ).on( "click", function() {... The sentence listitem.remove(), is executing as many times as items I've already deleted. This can be view using breakpoints in lines 55, 63 and 72. How can I do to execute that just one time? TIA James
How to create an onclick function
Hi, I am trying to make a gallery, by using the scroller on the page below. I have managed to insert the thumbnails within the scroller, however I am now stuck. What I want to achieve is, when you click on the relevant thumbnail, the larger version of the image appears above it. I am assuming that an onclick function is required, but I have no idea where it should be placed or what the actual command should be as I am a complete novice with jquery etc. Any help would be greatly appreciated. http://www.aep.x10.mx/test.htm
how to get rid of bower
hi i am new to jquery also bower! can anyone help me here. i can have it removed for $250.00 which i cant afford, i am on disabilty. the other thing is i have very little command line experience even if you needed acces to my computer that would be okay thanks dave
Need help adding a search to mobile site
Hello, I'm new to JQuery and I'm trying to figure out how to add a search to a mobile site. I found this code snippet but I don't know how to setup the rest of the search function. Do I need a database or text file to search though? I'm not sure how to call a plugin either with JQuery. I'm assuming JQuery has a plugin available for this? I tried searching this forum but I can't find anything. Any help would be appreciated! <form method="post" action="backcountry_hiking.html"> <div class="ui-field-contain">
Append div under 2 levels of div
<div id='grandparent1' class='gp'>test</div> <div id='parent1' class='p'>test</div> <div id='grandparent2' class='gp'>test</div> <div id='parent2' class='p'>test</div> <div id='grandparent3' class='gp'>test</div> <div id='parent3' class='p'>test</div> I want to append div with id=child1 to div with id=parent1 ; div with id=child2 to div with id=parent3; div having id=child3 to div with id=parent3 it is must to check grandparent and parent id cannot just do $.("#parent1").append("<div id='child1'
How corectlly merge cell in table with button
How to prevent that, when selected merged cells avoid errors of the merger. I do not speak English very well thanks <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <style type="text/css"> table{width: 80%;} table td{border: 1px solid #97B4D1;text-align: center;cursor:pointer;} </style> <script type="text/javascript"> var StartTD = null; var StartIndex = null; var EndTD = null; var EndIndex = null; $(this).ready(function
if/else doesn't work
hello, I have a jquery script. The meaning is, when you have 4 divs in the browser then the first div hide. You must only see 3 divs and not more. I have written but it doesn't work. Can someone help me? thanks in advance. <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> $(document).ready(function(){ if($( "div" ).html() == 4; )) { $( "div:first").hide(); } }); </script> </head> <body> <div><p>This
Custom plugin who accepts parameters for showing results from api
Hello to all, can someone please help me to do jquery plugin. I have an assignment to do plugin to use like $('element').customPlugin({'showResults': 10}). Default is 10 but it can be changed. I made my plugin but i don't know how to limit results. My plugin looks like $.fn. customPlugin = function(opts) { var defaultOptions = { showResults: 10 }; var opts = $.extend({}, defaultOptions,opts); $.ajax({ url: 'http/someurl', dataType:'json', success:function(data){ },
Accordion Customization
Using the Accordion code, https://jqueryui.com/accordion/#fillspace, how would I change the default open section? By default, the first section is expanded. How would I change this to the second section .... and then the third section at a later date? <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Accordion - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script>
Form Data in a form
Hi guys, At a click of a submit button, i need to know how possible is it to get the data/contents submitted into a new file. this doesn't involve using server or anything else. just submitting the form, and getting the contents in another file. i have done so many lovely stuff with jquery but i seem to find this difficult. i''m ashame to even share my code sincerely. thanks for your help. regards.
best pratics
Hi, I have a table with Rooms - 1 + Adults - 1 + Children -1+ when I click on Rooms + I need to add Adults row and Children row. Is better if I add another table or add simply the row? Consider that when I click on Room - if there are the rows about Adults and Children this row must be deleted Hope I explain enough clear my problem.
What could be wrong with this code?
$(document).ready(function () { $('#newsletter').click(function() { $myAction = ($('#newsletter').prop('checked') ? 'action-1.htm' : 'action-2.htm'); $('#frmContact').attr('action', $myAction); }); }); I'm a newbie in jQuery. The instruction in line 4 never executes, I'm debugging it with Firebug, I place a breakpoint on it, and it never stops there, but a breakpoint in line 3 does. What could be wrong here? Thanks in advance Rafael
how to access Price from Yahoo api
Hi I'm using the following Rest call http://finance.yahoo.com/webservice/v1/symbols/GSK/quote?format=json&callback=? When I put this in the browser I can see the returned data in json format. I now need to access the price, so I've added the following code to the webpage: $(document).ready(function() { var wsURL="http://finance.yahoo.com/webservice/v1/symbols/GSK/quote?format=json&callback=?"; $.getJSON(wsURL, function (dataone) { var test1 = dataone.list.resources.resource.fields.price; $('#price').html(dataone);
How to show message, in jquery by fetching the value and match and then insert value and show jquery message
THIS IS first_page <html> <head> function checkAvailability() { jQuery.ajax({ url: "insert.php", data:'sub_name ='+$("#sub_name").val(), //data:'sub_mark='+$("#sub_mark").val(), type: "POST", success:function(data) { $("#user-availability-status").html(data); }, error:function () { } }); } </script> </head> <body> <form class="" name="" action="insert.php" method="post" > <fieldset> <!-- Subject Name input--> <div id="frmCheckUsername"></div> <div class="form-group"> <span id="user-availability-status"></span>
is it possible to manage plugins by require.js?
in our company,we use require.js to manage the js libs like jq underscore. now i need to add a plugin to the project,but how to manage and inject the pluguins by require.js?
jquery(function) not working but $(function) works
Hi, I am just starting with jquery and following a bob tabor tutorial, when I use the full jquery ready function it fails to fire but the shortened $ version works, I accept that since it works then maybe I should just use it but while getting to know this great tool confusion and doubt are not good for me, when I run the script with full ready function and use f12 dev tool it tells me that this URI cannot be found "http://ajax.aspnetcdn.com/ajax/jquery/jquery.min.map" but in my script I am using
Sticky sidebar
Can suggest a good plugin for manage properly and create a sticky sidebar? Thanks
Scrolling Page
Hi! Does anybody knows what is the best plugin to create a scrolling one page like logitech? http://www.logitech.com/en-us or http://www.hugeinc.com/ Thanks!
smile_ajax is not defined
Hi, this is my first error in Jquery so dont go too hard on me.. im using Jquery for an animated menu i made. It works well but it breaks some of the functions in my wordpress theme and i cant figure out why. This is my script to initiate Jquery but i dont know why it breaks other things.. if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11); function my_jquery_enqueue() { wp_deregister_script('jquery'); wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] ==
Searching for a specific String-Format
Hey there, i have a little problem I can't really solve. I have a given website where I want to color dates that are overdue by a red font color. The problem is this. The date is implemented in a DD.MM.YYYY format in a title attribute of a span tag. Is there a possibility to get back all elemets that contain a title with the format "XX.XX.20XX" where the X has to be a number? Thanks in advance for your help and Greetings Chris
what's the corespondding method for getBoundingClientRect?
ele.getBoundingClientRect().top how to get this result by jQuery?
Changing aria attributes
Hi, I'm trying to learn how to change aria attributes with jQuery. For this I have created this codepen. However it's not working at all. What is my mistake?? Thanks
Jquery Selectable Issue
Consider a scenario of Desktop Manager Development UI (Just as Windows OS Desktop). I have made parent div (#Desktop) as Selectable. When i open some of the windows on parent div (by clicking on icons of #Desktop) and try to re-position the window by dragging, selectable widget is applied in the background and i cannot able to re-position the window as the window is attached to the mouse while dragging.
How to load dialog before php file.
Hi everybody, I need to know how can I load a dialog before this: $("<form method='post' action='registroQuadri1.php' target='_new'><input type=hidden name=a value='"+arg1+"'/><input name=b value='"+arg2+"'/></form>").appendTo("body").submit() I've tried this: $("#esegui").dialog({ "title": "RegistroOnWeb - Attesa programma -", height: 150, width: 430, }) $("<form method='post' action='registroQuadri1.php' target='_new'><input type=hidden name=a value='"+arg1+"'/><input
jQuery Calendar
Apologies if this isn't the correct forum. It is the closest match I could find for my topic. I'm creating a page/site where people can propose vacations and invite others to participate. For my purposes, I need to allow the admin the option to select multiple days from a live calendar. Furthermore, I want to take these selected days and lay each out individually in divs on a separate page to display day by day who is participating and ultimately allow invitees to log in and RSVP. Does such a beast
What is the difference between $.hide("slow") and $().hide("slow")?
What is the difference between $.hide("slow") and $().hide("slow")?
jQuery events execution delayed on iOS
I have a serious problem with my jQuery events. All the jQuery events in my .js file are performed with serious delay (more than 4 seconds) after the event is triggered. Here's the code JSFiddle $(document).ready(function() { var headerWrap = $(".header-wrap"); var hOne = $("#header-section h1"); var buttonMenu = $("header button"); var menuSlide = $(".menu-slide"); var menuSlideAnchor = $(".menu-slide a"); menuSlideAnchor.on("click", function() { $("button i").toggleClass("fa-reorder fa-times");
Why is class still exist after removeClass?
Why is class test still exist after removeClass? <style> a.test { font-weight: bold; } </style> <script> $( document ).ready(function() { $( "a" ).click(function( event ) { removeClass( "test" ); alert( "The link will no longer take you to jquery.com" ); event.preventDefault(); }); $( "a" ).addClass( "test" ); });
jQuery 1.7 vs 2.2.1 vs 3.0
Hi, What's the difference between jQuery 1,7 and jQuery 2.2.1? If I l buy a book that teach jQuery 1.7 will I miss a lot once I transition to jQuery 2.2.1 or the upcoming jQuery 3.0? Thanks for the answers!
Drag and resize of n objects and save of the position and size
Hello, I try to create a possibility that a user can move and also resize objects (div). After chabge the system should save this and remember next time. 90% works. But if i resize and move a element and reload the page the position and new size is correct. If i resize now again something, the second element which i not touch moved somewhere. I don't know why this happen. Any ideas? See https://jsfiddle.net/couganet/tdb94bpp/1/ Thanks Mark
Next Page