• concatination in JS failing

    hey guys i have the following code to dynamically change the content in a div :  var pg_prefix = 0; $('#next').on('click' , function(){ pg_prefix++; if (pg_prefix >= 2) { var pg_prefix = ''; } console.log('brands' + '-' + pg_prefix); // if console.logged , this give me "brands-NaN" // instead of "brands-1" or "brands-2" $('#brands').load('brands' + '-' + pg_prefix); }); my problem is my concatination is't working : 'brands' + '-' + pg_prefix i get the following results instead of what i want . what
  • Email regex not validating properly after first validation

    Hello, I'm setting up some custom validation for a form (not using a plugin as I want to force myself to learn). But this problem is stumping me a little, I was wondering if you can help? I have searched on this site but haven't been able to find a thread on this specific issue. The email validation works first time. So if I leave the field empty, or enter a, or enter a@, or enter a@a it will show the error message specified. Once I enter a valid email address, as expected the error message disappears.
  • using simple validator

    Hi, I am trying to use a simple validator just to show an alert when the cboCategory is not filled but I am not getting what I want and no error is how. Below code is for your review with thanks.. $('#frmLeave').validate({ rules: { cboCategory: { required: true } }, invalidHandler: function(event, validator) { alert("error"); }, submitHandler: function (form) { // $(form).ajaxSubmit(); // return false; } });
  • JQ Dialog and JAWS reader

    We are implementing a jq dialog terms and conditions on page load but are having issues with accessibility. By default, focus is set on the dialog close button. We are able to to give focus ( .focus() ) on the header but when using the keyboard arrow keys to read the proceeding content, the browser window responds by scrolling down. How can we provide accessibility for JAWS to read content within a jq dialog using the keyboard?
  • Gsoc 2015 QUnit - Better diff output

    I am interested in this project idea. But I am struct in understanding the project. any Help would be great 
  • Is there any way to prevent Textbox from duplicate entries?

    I am working in asp.net project.I want to prevent my textbox from repeated same entries.I use autocomplete and checkbox values as input for my textbox.Is there any way to prevent Textbox from duplicate entries from pasting,typing,etc..once i click on the existed values from autocomplete means it have to disappear from the textbox..Please help me out guys
  • Check data if already exist in MySQL when typing on the text field

    I have a form where user when clicking the button, it will then check first data to be inserted in database if already exist. Now, I want the ajax to check, if there's duplicate entry in database once the user has done typing/ or when typing in the engine no. field instead clicking the submit button. Would that be possible? Form script <input type =' text ' class =' input-xxsmall ' name =' engine_no[] ' id =' engine_no ' value =' ' placeholder =' Engine No '> <input type =" submit " value =" Submit
  • Accordion - centering display on active div content panel?

    I have accordion working fine It really helps me organize a lot of data on a subject. The "problem" I have is I want the active div content panel to be centered or moved to the top of the display. If I have a long winded set of details on a subject in one div content panel then the next may have an image of the subject then the next div content panel may have some reference material on the subject. And this all works great, except when I open the first long winded div content panel I scroll down
  • JQuery Accordian form with required fields (ASP.NET)

    I'm baffled, hopefully somebody could help. We have an ASP.NET (VB) website and have a form that I've sectioned out into JQuery Accordian tabs, with a submit button at the bottom of the page. The only required fields are in the 1st accordian pane. When somebody is not in the 1st accordian pane and clicks submit, I would like the 1st pane to open if there are required field validation not filled out. Right now it just sits on the last pane opened. How would I go about opening this 1st pane on submit?
  • Frame Forwarding Viewport

    I have a page that have a permanent redirect to another URL and passes a parameter. It is working fine and my page is perfect in iPad, iPhones or Android devices. I am using the following meta tag: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no"> The problem is that the user perceive that he is being redirected and this avoid him to favorite the original URL for example. To not change the URL, I have set my server to frame forward the page,
  • Insert a paragraph, Hide content.

    I need to make a function that when I click a button it inserts a paragraph into a document. I also need to write one that when hovered over a button it reveals content but when the hover is lost the content is hidden. 
  • Display alert based on user's selection with radio buttons

    Hi, I have been having problems with my jQuery function which should display the appropriate message when the user selects a certain radio button. I am trying to achieve this using a conditional statement. When the user selects the first radio button they should see the message "test45", if they select the second radio button, they will see the message "test1".  Here is my code: function test(){ if ($("input:checked")){ window.alert("test45"); } else if ($("input:checked")){ window.alert("test1");
  • Jquery date picker current year issue

    I am using jquery 1.11 which is latest one.          $(".datepicker").datepicker({              dateFormat: 'mm-dd-yy',             changeMonth: true,             changeYear: true,             yearRange: '1930:-18' From my date picker default year is showing as 1930 and current month but current year is displaying on text box once i select date . If i select another year from drop down then it is showing correctly. Problem with initial one only, please let me know how to fix this issue.
  • Side panel -> change click to hover.

    Welcome! I have a script on the sliding side panel: $(document).ready( function() { $(".slide_button").hover(function () { xx = $(this).attr('class'); if (xx=='slide_button') { $("#my-panel").animate({ left: "0px" }, 500); } else { $("#my-panel").animate({ left: "-220px" }, 500); } $(".slide_button").toggleClass("cls"); }); }); It opens when you click the button, and I would like that this action was you hover over it (hover), how can I get one? I tried .click replace to .hover, but then I still
  • Menu solution

    I need help how to create a menu that  1. when loaded on the page is showing  divs css with colour 2. when mouseover all divs except the one that was hovered turns to grey what is the best way to do this? thanks
  • Show results from a php app using ajax

    Is there a way to display the results from a php app using an ajax call.  PHP <?php require_once('related.php') ?> <?php $resp = simplexml_load_file($apicall);   if ($resp->ack == "Success") {     $results = '';        foreach($resp->searchResult->item as $item) {         $pic   = $item->pictureURLLarge;         $link  = $item->viewItemURL;         $title = $item->title;         $price = $item->sellingStatus->convertedCurrentPrice;                   $results .= "<figure class='relative r_image_container
  • AJAX/Same Origin / why does this solution fail?

    I code on a WAMP server and latest jQuery and jQuery Mobile app works fine when tested via latest Firefox, jquery, jquery mobile and with Apache/MySQL Zend serving content. I thought I had a bright idea, it does not work and hoped someone might edukate me as to why it does not work like I expected. My "bright idea": Instead of my jquery mobile app being served from my web server, I called it directly from the filesystem. Afterall, I expect to bundle it and stick it into an app store, and have it
  • Should I use $.Data() instead of Global object variable ?

    I have a client that has a 'switch' - when on it run's various routines every 30 seconds - when off, it avoids running the routines.  I have a jquery mobile ui that permits the operator to switch the status on/off in the client browser. When the switch is on, there are additional values that are stored (a session name, the last record id that the service client previously processed). I am storing the state and additional values via using the switch as a jquery selector and $.data() but I am thinking
  • A tooltip program does not work.. Why ?

    I am studying jQuery and  am practicing with an example on tooltips function. The program does not work despite it is free from any error. I applied another on tooltips function example and it worked normally. The example is listed below. I would so grateful for any enlightening tips. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Hello World</title> <link href="http://localhost/3rd/_css/jquery-ui.min.css" rel="stylesheet"> <link href="http://localhost/3rd/_css/site.css" rel="stylesheet">
  • Style is not working!

    Hi, I have added the js files as well as link to the css files. All files does exist on my localhost and I already checked it using the view source but I am still not getting the style I want. How can I fix it please? [please see the attached] Thanks, Jassim
  • Stop a specific button calling validation

    I have a form with two buttons. For some reason, both buttons call validation on the form even though only one is a 'submit' type. Can I make the other one not validate the form and proceed with its normal (jQuery bind(click)) action? It's probably easy, but I can't see it.
  • problems using redmon theme (1.11.3), style not being applied

    Hi All, I am using asp.net mvc 4 with jquery, and i am trying to use the redmon theme. I have downloaded this from the site and here is what i have done: 1. Under Content/Themes I have created a folder called : redmond 2. Under Content/Themes/redmond I have copied the following content from the jquery ui theme roller .zip file:        a)image folder       b)jquery-ui.css       c)jquery-ui.js       d)jquery-ui.structure.css       e)jquery-ui.theme.css 3. Then I created the bundles:         bundles.Add(new
  • alert

    hi to all, i want displaying text with in the form only ( in javascript we use document .write() . to display text in a page  $(document).ready(function(){     $("p").click(function(){         if ($("p").parent().is("div")) {             alert("Parent of p is div");          }     }); }); <body> <div>   <p>Click me to find out if I my parent is a div element.</p> </div> </body> i dont want to show my text in alert box .
  • how to drag and drop into iframe

    how to drag and drop into iframe
  • Server code can't return an object

    I am using PageMethods to call ASP.NET server code.  My object consists of many properties type, including list object. For example,  Public class ClassA { public string stringA {get;set;} public List<ClassC> ListC {get;set;} }  When the List<ClassC> has more than 1 item, the object will not be able to return to the PageMethods function The PageMethods function is like below: PageMethods.MyCalling(id, function(obj) {    if(obj) <-- will not be reach ... }); However this does not happen in my localhost. 
  • Ajax Post Click Function Submits Twice

    I'm clicking a button type="button" to fire off an ajax post. The problem is, the form is always submitted twice. Generated HTML  <form name="AddItem" id="additemform" method="post" action="WebCatPageServer.exe">         <input name="Action" type="hidden" value="Add_Item" />         <table>         <tbody>         <tr>         <td><a href="WebCatPageServer.exe?PROD_FULL&ProdInfo=00012000551">BRW2394746301</a></td>                         <td>239-47463-01</td>                         <td>Gas Valve
  • Server Architecture for Mobile Website development using the JQuery Mobile.

    I am new to the mobile applications; I would like to understand the server architecture/setup required for the Mobile Website development using the JQuery Mobile. If you can share any kind documentation or simple architecture diagram that will be helpful. Thanks in advance.   Regards, Muthu
  • Validate only one field at a time

    Hi, I have a few fields on a form and when the first control looses focus, all the validations for all other input elements fire at the same time. This makes the whole form look red in colour and I just want only one field (which lost focus) to show error on it. The submit should show error on all the fields which failed validation. I am using jquery validate version 1.11.1 Thanks in advance, Simrat
  • Sortable Icon

    Hi, I'me searching for an Icon for a sortable List. Any Ideas how to visualize that a list is sortable e.g. a list-item is draggable? The only thing I could imagine is a [css]cursor:move but that would work not until mouseover. In my opinion it is an icon like the resize-icon in the lower right corner of textareas but not vertically. Any Ideas? best, heinetz 
  • using replace on val()

    This bit of code works great, removing the commas from numbers to do math. for(i=1; i<$('.coa_table tr').length; i++){     var c_trs=parseInt($('.coa_table tr:eq('+i+')').find('td:last').text().replace(',', ''));     c_count+=c_trs;    } I cannot figure out why I cannot do the same with .val() as the above .text(). This code errors with "Object doesn't support property or method 'replace'" on valhold.replace(',', ''). The code is retrieving the value from multiple input type="text" fields with a
  • jquery-ui-1.10.3.css UI-tabs does'nt switch the tabs when clicked.

    Hello All,   I have an issue on changing the tabs, when we recently upgraded JQuery 1.10.3.css.  Which works great for jquery-ui-1.8.9.css.   For the tabs to work using JQuery 1.10.3.css, does it have any dependencies for .js files. Do I also need to upgrade any of these...   jquery-ui-1.8.10.custom.min.js   jquery-1.10.2.js     Please let me know.   Thanks,   MNK.
  • How to add/change the ease method to a SlideUp() or SlideDown() function

    Hi, I'm new to the forum. I've taken time to search through the forum on the look-out for a similar topic, but have not found one. I would like to add or change the slide effect by adding a easeInExpo to a SlideUp() or SlideDown() function         jQuery(function( $ ){                   var container = $( "#container" );             $( "a" ).click(function( event ){                     event.preventDefault();                     if (container.is( ":visible" )){                         container.slideUp(
  • Uncaught TypeError: undefined is not a function external.js

    I get this in console:  Uncaught TypeError: undefined is not a function . I've tried to put functions between ;(function($){ and })(jQuery);, no succes. jQuery is included in header and external.js in footer. What should I do?
  • load php file

    Hi all I hope someone can help guid me in the right direction. I want to load a php file depending on what link the user has clicked. The correct php files is loaded on click but the code in the included php file doesn't function and nothing works. Here is my working code:                         $( ".link1" ).click(function() { $(".here").load('includes/page1.php'); }); $( ".link2" ).click(function() { $(".here").load('includes/page2.php'); }); $( ".link3" ).click(function() { $(".here").load('includes/page3.php');
  • Inline Style overwritting CSS Style by I unknown code using Cycle 2

    Hi JQueryers, I am using Cycle2 (From http://jquery.malsup.com/cycle2/ ) and my CSS for my "Pager" control (the small control with a series of dots (by default) to allow you to manually select slides to view) is being positioned all the way to the left on my page because the CSS associated with my pager "Div"  (for example left : 800px ; is being overwritten with Inline Style settings by unknown code (eg   left : 0px ; ). I know this by using IE or Chrome debug tools to browse the DOM during execution.
  • Adding a delay while showing sub-menu items

    Hi! I am experimenting with SuperFish/Jquery. I want to add delay in appearance of sub-menu but its not working. I could not figure out the reason behind it. The jQuery script is at the end of HTML code. I am using the default CSS provided by Superfish.  Here is the HTML Code.  <html> <head>           <link rel="stylesheet" href="css/superfish.css">           <link rel="stylesheet" href="css/superfish-navbar.css">           <script type="text/javascript" src="script/jquery-1.7.1.min.js"></script>
  • validation inside a dialog

    Hi, I have a dialog box that is working fine, the end user has to check one or more checkboxes before pressing the button "Assign", I want to have  a validation before submitting, if no checkbox  were checked it should diaply an error validation, here is my code : I would like to check if the array   agenciesId is empty, display an error and don't submit.  $("#divPopUp").dialog({         resizable: true,         autoOpen: false,         height: 500,         width: 550,         modal: true,      
  • Links for datatables

    There are plenty of links for datattables, but i haven't been able to find one with source code; please give some. Your help will be greatly appreciated, Alejandro Barrero
  • Width of selectMenu in jqueryui.

    Hi, I use several selectMenu to filter a table. I've item option with image and/or text I use this code for this : $("select.TFOlstJquery").TFOiconSelectImg({             create: function (event, ui) {                 var widget = $(this).TFOiconSelectImg("widget"); var $SpanTxt = widget.children(":last"); var elem = $(this).children(":first"); var styl = elem.data("style"); var HasTxt = ($.trim(elem.text()).length > 0);                 if (HasTxt && styl) { $SpanTxt.addClass("TFOselectmenu-textDecalTxt")
  • ajax call in jquery mobile

    hi... Please Explain how to call Json file in ajax using jquery mobile ...... give me any examples and links..... Thanks.   Logu.S
  • 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