• how does

    Olá, boa tarde, eu sou novo para jquary e eu estou tendo problemas para escrever este algem código poderia me ajudar. 1 - Criar 3 botões; 2 - usando jQuery mudar a cor dos botões na página de formulário de inicialização que o botão deve ser de 1 vermelho, 2 botão deve ser azul e o botão 3 deve estar verde. 3 - clicando nos botões 1, 2 e 3 deve ser na cor roxa; 4 - clicando nos 2 botões 1 e 3 deve ser na cor amarela; 5 - clicando nos 3 botões 1 e 2 deve ser na cor cinza; criar um quarto botão
  • If input has that class, add a class to it's label

    Hi guys, Could you please explain me why this code is not working: If input hasClass, add a class to it's label Thanks
  • Add optional data parameter to each function

    I've come across situations where it would be nice to pass some data to the each function. As in $(myQuery).each(myFunction, myData) which would invoke myFunction(index, element, myData) for each element. A more specific example might be:  $('#recordsTable tr').each(myHighlightFunction, arrayOfSelectedIds) where myHighlightFunction would examine each tr for some identifying aspect and change the background color for any row that matched a value in the array Right now, there are at least five ways
  • Changing focus in an A-Z index

    Hi, I'm working on this A-Z example with scrolling: A-Z index with Scrolling function It works fine. Now I just need to achieve that each time I click on one of the alphabets, the focus changes to the targeted h1 alphabet. To achieve this I added the following two lines to the code: target.addClass('focus'); target.focus(); But it still doesn't change the focus to the targeted alphabet. How can I change the focus after each click? Thanks
  • Hyperlink Problem

    Hi, I am new with jQuery. Currently I am trying to integrate jQuery with PHP and MySQL (using XAMPP) and the code is: <?php include "latihan36_1.php"; $q = "select * from mhs"; $ex = mysql_query($q); echo "<a href='#' id='tambah-mhs'>Tambah MHS</a>"; echo "<table border=1>"; echo "<tr> <th>NPM</th><th>Nama</th><th>Alamat</th> <th>No Telp</th><th>Action</th></tr>"; while($r = mysql_fetch_array($ex)){ echo "<tr><td>".$r['npm']."</td>"; echo "<td>".$r['nama']."</td>"; echo "<td>".$r['alamat']."</td>";
  • jQuery.validator.format() - Where does it get it's parameter values from?

    Reading through the jQuery.validator documentation on the format() function , there is an example shown like this: jQuery.validator.format("{0} is not a valid value"); There are no additional parameters given to the function, so I guess the "{0}" will not be getting replaced? Or if so, where does it get its value from? Thanks for enlightening me.
  • New to jQuery... does this function look well-written?

    I have a menu that I want to slide toggle in from the left to the right. I would also like to hide the menu when I click off the the menu or when I click the esc key, but I want it to slide back to the left. Here is what I wrote... It seems to work fine, but i'd like to know if it just works or if its actually well-written. //Toggle functionality for menu $(function(){     var effect = 'slide';     var options = { direction: 'left'};     var duration = 500;          //Slide toggle menu     $('#m').click(function
  • Alert is not showing

    I have this code: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="/js/jquery-ui.min.js"></script> <div class="row col-lg-5">   <h2>Get Request</h2>    <button type="button" class="btn btn-warning" id="getRequest">getRequest</button>   <br><br> <script type="text/javascript"> $(document).ready(function(){ $('#getRequest').click(function(){   alert($(this).text()); }); }); </script> </div>  The alert is not showing when I click the button. The jquery.js
  • Iterate Table Rows and Color

    Hi all, i have the requirement wher i have a table as attached image i need to iterate all the columns that starts with 'Pass_' (in the image Pass_Balance, Pass_Currency) and if the values of those columns is zero i need to colour the previous 2 columns(in the image SCD Balance and Calypso Balance ) For Ex: I need to color all the  SCD Balance and Calypso Balance Columns except the 5th Column where the Value of Pass_Balance is one) Please help !!!
  • jQuery keypad plugin - change position/size of keypad popup

    I'm using the jQuery keypad plugin. It attaches a keypad to an input box. However, the keypad appears right next to the input box. I would like it to appear at the bottom of the screen, far from the input box to which it is attached. Is there an easy way to achieve this? I browsed through the source, but I'm not sure my JavaScript/jQuery knowledge is up to the level required to try to modify this. I suppose I could use jQuery to dynamically change the CSS positioning and width of the keypad-popup.
  • Detecting status of reflow table

    Hi guys, I have a table in JQM with data-mode="reflow" (ui-responsive). Is it possible to dynamically detect whether the table data is positioned in horizontal or vertical mode? Maybe by adressing a certain class or something? Thanks!
  • why showErroes fired when all already filled?

    Hi, In https://www.cakeboutiquebh.com/enter.php?signup=true Enter any data in all fields but for the email enter jrahma@yahoo.com it should give you a message that the email already exists but it's giving all fields are required error although you have already entered all field. Why? Thanks, Jassim
  • Open jQuery Accordion with link

    Hi there, I have inserted this jQuery accordion on my website: //accordion jQuery(document).ready(function() {     function close_accordion_section() {         jQuery('.accordion .accordion-section-title').removeClass('active');         jQuery('.accordion .accordion-section-content').slideUp(300).removeClass('open');     }     jQuery('.accordion-section-title').click(function(e) {         // Grab current anchor value         var currentAttrValue = jQuery(this).attr('href');         if(jQuery(e.target).is('.active'))
  • my global variable wont work

        //when i console array variable row in the second click handler its displayed as undefined.     $(document).ready(function(){                  var row = [];                 $('tr').click(function(){              $tds = $(this).find("td");             // Finds all children <td> elements                       $.each($tds, function(index) {               // Visits every single <td> element                                        row[index] = $(this).text();                                     });//
  • jQuery onclick event is not binding to new DOM element

    I am integrating jdPicker (http://jdpicker.paulds.fr/?p=demo) which is anjQuery Date picker into my jsp as follows: Supplier.jsp <html>      <script type="text/javascript">           $('#calenderOpener').jdPicker({                      date_format:"dd/mm/YYYY",                      select_week:1,                      show_week:1,                      date_min:"19/05/2010",                      date_max:"21/12/2050"                 });                         </script>     .....    <td><input type="text"
  • How to animate elements being loaded using jQuery load method

    I am using ajax to load a new form once the old form has been submitted. the code looks like below: $(document).on('click', '.next', function() {         if ($(this).hasClass('disabled')) {             return false;         }         var toLoad = $(this).attr('href') + '#content';         $('#main-container #content').transition({ 'x' : '-100%' , duration:700 } , function() {            loadContent();              });         // $('#main-container').animate({ 'opacity': 1 }, loadContent);        
  • Want to use jQuery UI Widgets in Wordpress but don't know where to put the code/function

    Hi I have installed jQuery UI Widgets in my Wordpress site. I can see all the script in the page source code. While I can see the code " jQuery(document).ready(function($){ //Add jQuery code here…}); " in the admin page of the extension with all the possible effects, I can't figure out where to put that code to make it work. I have then try it with jQuery(document).ready(function($){$( "#accordion" ).accordion();}); I have tried all day to make something appended. I've tried to put it in the function.php,
  • Textarea Character limit function

    Hi, I found this solution for limiting characters inside a textarea for IE 10 and bellow: <input class='textField' type='text' maxlength="40" value='' onkeyup='charLimit(this, 40);'> And following JavaScript function for IE 10 and bellow, which don't support maxlength="40" function charLimit(limitField, limitNum) { if (limitField.value.length > limitNum) { limitField.value = limitField.value.substring(0, limitNum);} } It works. However I wonder why it uses onkeyup='charLimit(this, 40);' inside the
  • Reordering rows as well as drag them to another target

    I have one table where I'm reordering rows, then I have added a second table where I want to drag n drop rows from table one. As for now I can drag rows from table 1 to table 2, but then the rows is moved from table 1. What I want is a clone, so that all rows still remains in table 1, and only a copy is made to the targeting table 2. Can I have both? Reordering rows in table 1 and still be able drag a copy to table 2? I guess the starting position (table 1) won't know if I'm just gonna reorder the
  • Offline docs for jquery-ui?

    I'm using jQuery UI in a project that develops on an isolated network with no Internet access. I'd like to make the jQuery UI API documentation available on our internal network (as we do for virtually all of the other libraries we use, including the core jQuery documentation from jQAPI.com), but I cannot find anyplace where the documentation can be downloaded. We already have a copy of the documentation from jqapi.com, but that includes only jQuery itself, and not jQuery UI. Is there anywhere that
  • Get Month Name from Jquery Date Picker

    Dear All, Can anyone help me in getting the month name ,from the selected date using Jquery Datepicker. Thanks Quality Communication Provides Quality Work SAM
  • What a best practice way to organize (what directory structure) the jquery mobile .css files, html files etc in a macBook Pro environment?

    For a hobby, I’m trying to develop a mobile app solution for my uncle’s small business. I have a lot of programming experience, but no web development experience.  I’ve got a mysql database designed, implemented and populated. I just have no idea who how to organize the downloaded jquery mobile css files, the jquery core files, Node.js, Express, ... or the html files to be created later. Help!
  • Add "helper" to draggable on drag event.

    How to add clone helper to draggable div conditionally For example, I have two container divs. I do have a draggable div in one of the container div. Now if i drag my div within the parent container , no clone is needed. But, if i drag the div outside of my parent container, clone needs to be added . How can i do this on on drag event ?
  • Detect Final Page Render

    How do i detect when my website is totaly rendered, all the contents, fonts and images and every thing i want to detect the event when the browsers loading icon at page title bar stops rotating !
  • Only the JSON_ENCODE works for a variable from PHP to javascript

    In the following, why echo 123 DOES NOT WORK? <!DOCTYPE html> <html> <head>     <meta charset="UTF-8">     <script src="https://code.jquery.com/jquery-1.11.2.js"></script>     <script type="text/javascript"> $(document).ready(function () {     var jsvar = <?php echo json_encode(123); ?>;     <---- //WORKS!!!     var jsvar = <?php echo 123; ?>;       // NOTHING HAPPENS!!!  alert('ak=='+jsvar);     <---- //WORKS!!! console.log(jsvar);      // NOTHING HAPPENS!!!   });//$document </script> <style>  
  • ui dialog

    Hello, us any body have encountered this, jQuery don't know the $("#selector").dialog. the error jvascript is :0x800a01b6 - Erreur d’exécution JavaScript: L’objet ne gère pas la propriété ou la méthode « dialog » Translate : Error executing javascript: The object don't handle the property or method <<dialog>>. The dialog window is created and i see it with autoopen:true, i Close the win dialog and then click on button toggle, this generate the  error.     <link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/ui-darkness/jquery-ui.min.css"
  • looping a variable with dynamic incremental number

    Hi guys! I'm looking for a way to just use one row for variables.. This stuff works, but I guess I should write this more effective? var H1 = moment.unix(data.hourly.data[0].time).format("HH"); var H2 = moment.unix(data.hourly.data[1].time).format("HH"); var H3 = moment.unix(data.hourly.data[2].time).format("HH"); var H4 = moment.unix(data.hourly.data[3].time).format("HH"); var H5 = moment.unix(data.hourly.data[4].time).format("HH") what I want is
  • TableSorting Issue

    Hello, I'm using a jQuery TableSorter plug-in to sort a Gridview. One of the column (Dev ID) contains data in the following format and is failing to sort in ASC order on Load: 17-143,17-162,17-45, 18-12,17-65,18-2 This above data should be sort by default as: 17-45,17-65,17-143,17-162,18-2,18-12 Please assist. Thanks, Smith
  • Using jquery to display a specific array of images (from a filter category) in a light box

    Hi, I have created an filterable image gallery using Mixitup. I have added a lightbox functionality to the thumbnails when clicked using foundation clearing-thumbs. The issue is that I don't know how to have the lightbox display the correct images depending what filter category is selected. At the moment it just scrolls through the 'All' filter. Here's the URL to the site: http://www.clairenolan.ie Could anyone help me with this? I’d greatly appreciate it as it’s pretty frustrating! Thanks
  • Drag n drop - save the reorder of rows

    I'm working on a simple project and so far I'm not using any databases, but instead stores anything I need to save in the local storage. This time around I need to store the reorder of rows when using drag n drop.  If I set an ID on each row, would it be possible to loop through the IDs to find the current position: 4, 2, 1, 3. Then store the order in the local storage, then display them again in that order when opening the project/website the next time?
  • toggle a switch status icon from an admin page then reflect it to multiple pages

    I have created a link with two states, which will be a default status of [verify=false] and secondary status [verified=true], and will be changed from a manager through an admin page. jquery will toggle this status using SVG icons and change its background position through CSS. This link icon selection, will only display statically on multiple pages that this/that user has been verified or not by the manager. It is off [false] by default. The toggling works great, which I am happy with this, but
  • Why do I sometimes get a blank page

    I move between two pages using one of the following: $.mobile.changePage("ScheduleCleanDetailsV2Entry.html", { data: { SchedIndex: data_schedindex, AreaIndex: data_areaindex, LetterIndex: data_letterindex, RoadIndex: data_roadindex, CleanIndex: data_cleanindex } , allowSamePageTransition:true, reloadPage:true}); $(":mobile-pagecontainer").pagecontainer("change","ScheduleCleanDetailsV2Entry.html", { data: { SchedIndex: data_schedindex, AreaIndex: data_areaindex, LetterIndex: data_letterindex, RoadIndex:
  • jquery validation integer only

    Hi, I am using jquery validation and I would like to ask how can I make sure only integer number is entered? no dots / decimals? Thanks, Jassim
  • why required is not fired

    Hi, In https://www.cakeboutiquebh.com/enter.php?signup=true Choose Yes for Are you an Existing Customer Then enter anything i Customer ID, leave the Last name blank you'll get a validation error asking you to enter both but when you leave the Customer ID blank and enter the last name it doesn't do the same, it proceeds with show ajax action although both required are set to true Where is my mistake? Thanks, Jassim
  • jQueryUI dialog

    I need to make a few minor changes to the theme used for the dialogs; b/g colour of the header, close 'X' button and 'OK' button.When I re-roll the theme, using the existing them as a starting point, do I need to redeploy all the files, or just one or two. Deploying a minimum number of files would be ideal, to avoid stepping on files that have not changed. Cheers!
  • Autocomplete Dynamically Assign Value

    I have a SQL database that I'm querying for 1) record indices 2) associated names 3) associated email addresses I'm creating an array(array("key","name","email"),array("key","name","email")) using a for() loop in PHP and populating "var availableTags[]" in my jQuery with a foreach() from that array. Ultimately what I (think) I want to do is have Autocomplete display the name but I want to also submit that name's key[] (perhaps as a hidden input value). Upon SUBMIT the submitted key[] value would
  • If one class exists and the other class doesn't exist

    Hi, This code should say that: if one class exists and the other class doesn't exist, do something if( $('.file').length && $('.table-striped') == 0 ) {        // Do something       } Is there any error in the above code? Thanks
  • Create an array and explode it with \n

    I need to change the var text into an array and explode it with "\n".Please help me <html> <head> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <form id="web2lead" action=""> <div> <label for="txtName" class="addtocomment">Name </label> <input type="text" id="txtName" class="addtocomment" name="txtName"><br> <label for="txtEmail" class="addtocomment" id="txtEmail">E-mail </label> <input type="text" id="txtEmail" class="addtocomment" name="txtEmail"><br> <label for="txtAddress"
  • trigger the mouse cursor automatically every 5 minutes

    Hi , How to trigger the mouse cursor automatically every 5 minutes ? Because my windows display screen is locked out after 30 minutes if we are not touching PC.  I want to keep the windows to display active till shut down. Please let me know if there is any other way to keep the windows screen active. 
  • jQuery UI draggable is not a function Error

    Why function draggable works in Chrome and does not work Safari? gems.js $(document).ready(function(draggable) {     $('.draggable').draggable(); }); index.html <!DOCTYPE html> <html> <head>     <meta charset="utf-8">     <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">     <title></title>     <link href="lib/ionic/css/ionic.css" rel="stylesheet">     <link href="css/style.css" rel="stylesheet">     <link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css">
  • Next Page

  • Announcements

  • The Basics of jQuery AJAX

    A step-by-step tutorial for those new to jQuery and wanting to use AJAX in their projects. Includes valuable information about troubleshooting using the console and understanding the request / response. http://jayblanchard.net/basics_of_jquery_ajax.html
  • jQuery Conference 2010: Boston Announcement

      The jQuery Project is very excited to announce the jQuery Conference 2010: Boston on October 16-17, 2010.  The conference will be held at the Hilton Boston Logan in Boston, Massachusetts.  The best part of this announcement is that Tickets are on sale now!  This venue is the largest that the project has worked with to date (Harvard Law School in ‘07, the MIT Stata Center in ‘08 and Microsoft New England Research Center in ‘09) and we expect to sell out very quickly. A brief synopsis of some of