Paint row by row in table
Hello friends. Long time. I want to be fabulous. I need help to paint row by row in a table with click. I got this: $(document).ready(function() { $('tr.rows_table td').click(function(){ $row= $(this).closest('tr'); $row_fixed=$('td.row_fixed'); $row.toggleClass('odd1'); $row_fixed.css('background-color', '#93F'); $row_fixed.css('color','#FFF'); }); }); Running: http://jsfiddle.net/vXF3b/6/ The idea is: Case 1: Case 2:
Case insensitivity
I have the following working line of code... $("td.xlink").not(":contains('" + $("#filter_xlink").val() + "')").parent().hide(); and I need to make it case insensitive. I have tried the following $("td.xlink").toLowerCase().not(":contains('" + $("#filter_xlink").val().toLowerCase() + "')").parent().hide(); and several variations with no success. Can anyone help me out?
jQMobile re-positions popup every time when Android opens own virtual keyboard - I can't input anything
Actually this is a problem. But it can be a new idea. I could be wrong but I think there should be an option to disable handleWindowResize or it can run manually. Through this way, we can allow to overlap the popup with the virtual keyboard. So we can use popup like a simple div. _handleWindowResize: function(/* theEvent */) { if ( this._isOpen && this._ignoreResizeTo === 0 ) { if ( ( this._expectResizeEvent() || this._orientationchangeInProgress ) && !this._ui.container.hasClass( "ui-popup-hidden"
SlideToggle with Multiple Divs not all together
This is related to this topic but with the clickable divs in different parts of the page, it won't work. http://jsfiddle.net/c7bt8ekf/ I tried with divs around <a>.... I tried no divs around <a>... nothing works. Please help. Thank you in advance!
Add lightbox to img with variable sources
Hello, I have a simple image swap function. You hove over thumbnails and a larger img is displayed in #main-img. However, how would I make it where when the #main-image is clicked, the variating src is selected and then linked to the actual image file. Pseudo: If #main-img' clicked, THEN select current src and link to images/src.jpg I hope that makes sense and thanks in advance to whoever can help! $(document).ready(function() { // Image swap on hover $(".imgBank ul li a img").hover(function(){
How do I detect when a button is clicked?
<script src="jquery.js"></script> <script> $(document).ready(function(){ $("#Alert").click(function(){ alert("Message"); }); }); </script> <button id="Alert" class="<?php echo $variable; ?>">Click button</button> This didn't work... Did I do anything wrong?
SlideToggle Multiple divs
I would like to slideToggle multiple divs as done in this fiddle: http://jsfiddle.net/XwN2L/2148/ The functionality of this script is good, but I need the hidden content to slide up before the next content slides down. So that when one div is visible and you click the link to show another div, the one that is open first slides up before the one you clicked slides down. Also, when you click the active div link while it is open, it will cause it to slideup and be hidden Here is the HTML: <style>.targetDiv
jQuery to load more content... Can't use .php file from a folder...?
Hi, I have a jQuery script that automatically loads content from a mysql database through a .php script... I am still developing on XAMPP on Mac OS so all my files are in htdocs... This is part of the script and it works perfectly fine if load.php is inside htdocs $("#DIV").load("load.php",{"var":variable},function(){variable++;}); But I will be creating way more .php files to load content and I don't want them to be all in htdocs... So I placed them in a folder inside htdocs and now it's not working
table json data returning undefined using jquery
Hi I'm stumped as to why the data in my table is returned undefined. I think I'm close. Please check out my jsfiddle: http://jsfiddle.net/tommy6s/eLbq2wvh/ Thank you for your help! -t code: $(document).ready(function() { $.getJSON( "http://www.corsproxy.com/dvl.thomascooper.com/data/json_return.json", function( data ) { //static table head $('table.stats').append("<th>" + "</th>" + "<th>" + "Date" + "</th>" + "<th>" + "Brand" + "</th>" + "<th>" + "Author" + "</th>" + "<th>" + "Title"
Getting value from <tr>.
Hi all, I need help to get value from <tr>. This is my html table. I want to get the value of textarea. <table> <tr> <th>Cognome </th> <th>Nome </th> <th>Data di nascita </th> <th>Mail genitore </th> <th>Cellulare genitore </th> </tr> <tr> <td><?php echo $r_agenda['CognomeStudente'] ?></td> <td><?php echo $r_agenda['NomeStudente'] ?></td> <td><?php echo $nascita
how to make folders draggable
i am trying to use jquery and render files i accessed using html input type 'file' draggable. is it possible? if yes the how do i do it?
How to cancle select file upload ?
Hello every one, I want to select a image and preview an image before I click button Upload, I can do it and it done but I want to have a event cancle select this file by click on <a></a> or click on button, it may be look like post status with attach image in facebook, so I don't known how to make it, I will try use button reset but it don't accordance with required. I hope to recieve some advice or guide to make it, thank for read. <html>
<head>
<title>Untitled Document</title>
</head>
<body>
<label
filter JSON data with "AND" operator using jquery
Hi, For example I have json data like this firstName,lastName,instrument,born John,Lennon,guitar,1940 Paul,McCartney,bass,1942 Jerry,Starr,drums,1940 George,Harrison,guitar,1943 I need to filter this data using "and" operator For example, I can filter this data using jLinq library like this jLinq.from(dataJson) .startsWith("firstName", "J") .andEndsWith("y") .select(); and I will get this result back Jerry,Starr,drums,1940 However, because this library too large, I decide to try to not
Hello, let's say we have:
Hello, let's say we have: <ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul> Is it possible that all <li> removed by sliding down, maybe jquery have ready methods for this purpose, ie, initially hidden 3, then 2, then 1 and top in the same manner come top 4, then 5, then 6 etc.
Passing Variable to AJAX Call
Hi, I am a new user to jQuery (and JavaScript in general). I have a scenario where I have a table of data that is generated from a SQL query. One column of my table is "Delete" where I have a button: <button id="delete_button" class="btn btn-danger btn-xs" type="button">Delete</button> I am trying to create an AJAX call to another page which will actually perform the SQL query to delete the record. The "ID" of the record that needs to be deleted is known as $record_id (PHP). My problem is that
Callback adds new field to a form and...
Hello, I have a problem. I have a form where I add a field on ajax's call back but when I submit the form it won't the new field's value: $(document).ready(function() { $("#submit").on('click', function(){ var datastring = $("#listingForm").serialize(); $.ajax({ type: "POST", url: "/member/submit_listing/", data: datastring, success: function(data) { console.log(data);
how to handle multiple events simultaniously
Hi I use a setInterval function which calls an ajax request. Some times this ajax request takes some time to load and during that time, the mouse events lock so mouseleave, mouseenter etc do not work Is there a smart way to make multiple events run at the same time in jquery. the setInterval function has to run every 30 seconds. My problem relates to my work, so I cannot show you the code, but if you need further explanation - just ask
Smooth Scroolling!
Hi People! i can't make my smooth scroll to work right :c idk why! Here´s the html code: <li><a href="#TextoContacto" rel="" id="anchor1" class="anchorLink">Contacto</a></li> and js: $('li.a').click(function(){ $('html, body').animate({ scrollTop: $( $(this).attr('href') ).offset().top }, 500); return false; }); i'll apreciate your help <3
JQery /HTML5 Audio file Fade
hi About a year ago I was involved with Jakecigar's great scrollsound control code found on the post 'Audio fading in and out scroll position' and 'Jquery/HTML5 Audio file Fade 2' I cannot figure out how to implement the pause/play functionality. I would like to pause and then play ALL of the 'soundTour' music files ( regardless of where the user is scrolled to on the browser page. In other words, pause all sounds. I've managed to stop the sound with $('#soundTour3,#soundTour2,#soundTour1').scrollPlay({
Is jQuery able to detect HTTP 302 redirect sent to browser?
Using jQuery is it possible to detect when the server has sent an HTTP 302 redirect to the browser? Ideally I would be looking for something similar to the code below but in addition to binding to a click event or submit event, I also need to bind to a HTTP redirect event and set inFormOrLink = true;. var inFormOrLink; $('a').on('click', function() { inFormOrLink = true; }); $('form').on('submit', function() { inFormOrLink = true; }); I need to detect when the user closes the broswer tab/window or
Modal/Pop up on Page load with cookies
Hello guys, I have been searching for a modalbox/ pop up that is shown on page load with cookie function, just like this site : www.omgubuntu.co.uk They use Magnific Popup. Any help is greatly appreciated. Thank you
Processing Form
I am trying to process a order form. There are x orders for a customer. If they update one order and submit that order to update it, I would like to update all fields for that order. What is the best way to get those values, and submit them? Would it be Jquery, or PHP? Product Name: '.prodName($prodID).'<br /> Quantity: <input name="quantity" type="text" value="'.$quantity.'" size="2" maxlength="2" /><br /> Comments: '.$comments.'<br /> echo '<input name="submit"
Transition Effect
I want an event to break up a <div> and transition to another <div> simultaneously using a custom image is there such a transition for jQuery ?
Page reload after all Ajax calls
Hello all, For each input property in the form, i need to post the values using an Ajax call. after all the ajax call is completed, the page needs to be reloaded. Since Ajax is a asynchronous call, the page gets reloaded even before all inputs are posted. How can i ensure the the location.reload() is executed only after all input elements of the forms are posted? Appreciate any advise. function postValues() { $(".dynamicform :input").each(function() { postPropertyValues($(this).attr("id"));
Floating div keep on scrolling
Hello everybody here, I'm very new in javascript and jquery, but I like the possibilities a lot! I have a page with a div (id='wrapper') Inside this wrapper div I have to divs (id='left'). One if floating to the left and the other is floating to the right (id='right'). The right div is not as high as the left one. So the right div will scroll down untill the bottom of div left. Well the right div is scrolling very smooth down while i'm scrolling down. See code below. var $sidebar = $("#right"),
How do I "demote" an XML Node (move it to the lastChild position of the previous sibling)?
This is what I have so far: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Parse Test</title> <script type="text/javascript" src="jQuery-1.9.1.js"></script> </head> <body> <div id="outputDiv">Output DIV<br/></div> <script>
Preventing default and adding url's
Hi Folks A couple of guys kindly helped me out recently and we got this far. However what I'm ultimately trying to do is… 1. Although the mini-thumbs have a hover event attached, I would like to prevent the default if one is clicked. i.e. for it to remain inactive and not open the image. 2. As each mini-thumb is hovered over, thus swapping out the large image in the placeholder element ('p#big-image'), is it possible (perhaps with a markup rewrite) as each of the large images are swapped in, to
force date/time format on textfield?
Does anyone know of a way (regular expression, maybe?) to force a date/time format (mm/dd/yy 10:00) in a textfield? I'm using ExpressionEngine with Solspace's Freeform Pro and do not want to use jquery's datepicker plugin because it is not ada compliant. Any help is appreciated. Thanks! Peter T
Using ajax , returned data and use the data out of ajax success function
hello , i have called a php paged with ajax call and returned data successfuly but when i want to access the element,tags on the returned paged out of the ajax successed function nothing will happen i'm using .on event but nothing is happening the code is : $.ajax({type:"POST",url:"mysql_retrive.php",data:{page:"0"},success:function(data){ $container.append(data); } }); and the click event : $this.find('a').on("click",function(){ alert($(this).text()); }); this event is not working if i put it out
IFrame Print PDF Issue in IE
Hello I have the following code to open a print dialouge from the browser, Everything is working fine with Chrome and firefox but im not able to get the print dialouge from IE with all versions, below code is specifically meant for IE11 with onreadystatechange function been added and rest is same for all other browsers where I am getting the print dialouge. I was able to save the pdf and when I try open that pdf from IE, I am getting the print dialouge directly. Also its working fine when I keep
Parallax Curtain
Hey guys, I'm really new to JQuery and I am trying to create a Parallax curtain on my blog. I put in a scrollTop Sensor that would change the content from fixed to absolute when the #curtain height reached the top of the window. It works on laptop sized browsers but not on my iMac. I am not sure where I went wrong, but haaaalp! I would appreciate you so much! http://www.kaleyourself.com $(document).ready(function(){ }); $(window).scroll(function(){ var scrollTop = $(window).scrollTop(); var curtainHeight
Store a word document into textarea.
Hi everybody, I'm trying to store a word document into my db. I made several attempts without any success because it doesn't save formatting. Can someone help me? Thanks a lot. Tegatti.
setting interactive content to div
I am trying to set content for a div. Here is my code: $( "#prodsAutoSuggest" ).keypress(function() { var prodID = $('#prodsAutoSuggest').val(); // Search process for the product $.ajax({ url: 'process.php', data: { productID : prodID}, type: 'post', success: function(output) { if(output){ $( "div.prodContent" ).slideDown( "slow", function() { $( "div.prodContent" ).css("display","inline");
How to limit 25 words minimum and 75 words maximum in text area?
I have required field text area. Which is needs at least 25 words and 75 words maximum allowed. So how to check these in jquery for text and validate it.
Change font color
I have a function which takes the word that I type in a text box, compares it to an array and if the word matches an element in the array, it wraps it in a `span` tag and tries to change the color of that word. However, I can not get the font color to actually change.. Can somebody please help me? function wrapLinesForKeyword($container, word) { var word = word.trim(); var tmp = ''; for (var i = 0; i < reservedKeyWords.length; i++) {
Placing values in a table
What I'm trying to do is to extract values from each ofthe jQuery function definitions and place them in a table. http://api.jquery.com/ I've pulled a subset and I'm having trouble getting the data that I'm looking for. Here is the Plunker: http://plnkr.co/edit/COxKfDVAPkg4D7AUMGSY?p=info The main script is located below the </body> tag There is no separate style sheet or script file besides the jQuery file. Please take a look. Any help would be appreciated.
Laws of Physics jQuery Effect ?
I'm looking for a dynamic jQuery effect that will make an image react to physics specifically wind with some collision. I want to give an image the effect that it's slightly waving in the wind with control over it's weight, as in, if it's an image representing a piece of steel or an image representing a piece of paper the amount of friction would be more or less.
Problem with showing multiple jQuery functions
I have found a image slider and made a tooltip myself with jQuery for on my site. I've made an image gallerie with one large image (in #gallerij) and one row with smaller images in it (#imagerow). When you hover over one of the smaller images, it fades and when you click on one of the smaller images, it will show up as larger images in #gallerij with a fadeIn/fadeOut effect. But that doesn't work, nothing happens. No fade effect when you hover over the images and not clickable. Let alone a fadeIn
Animation delay between each Queuestep (with example)
Hello, I'm trying to queue a <div> fluently without delay in the same direction. http://wow-portal.eu/ext/jquery_queuelag.html What can I do?
Smooth scroll?
Hiii! I'm making a smooth scroll for an anchor link for in-page movements, and doest'n work :c here's de HTML code: <a name="TextoContacto"></a> <li><a href="#TextoContacto" class="scroll">Contacto</a></li> </ul> (it works fine) JS: $(function() { $(".scroll").click(function(event){ event.preventDefault(); var offset = $($(this).attr('href')).offset().top; $('html, body').animate({scrollTop:offset}, 500); }); }); (This one not :c) <3
Next Page