• How to display a value using id multiple times in a html document

    If I am using an id to display a value in a HTML document, and if i use the same id to display the same value in another part of the screen, its not working...  see below <label id="batchwt">NA</label>   -----------------   I am using this to show the batch weight and now if i use this same ID = ("#bathwt") to display the same value in another part of the same HTML document, say in a table.. it doesn't work...  <td class="d5" id="batchwt"> LB</td> --------------  I used this same id to display the
  • controlgroup events

    I have a select with several options. The onchange event doesn't work for this. Is there a way around this? Any select I have that is not in a controlgroup works fine. The events for the radio buttons that are in a control group work as expected also. <fieldset>     <legend>Certificate of Service</legend>     <div id="controlgroup1">         <select id="servicextype">             <option value='none'>None</option>             <option value='hand'>Hand</option>             <option value='usps'>USPS</option>
  • cycle2: quick question...

    hi, for automatic slideshows, I don't see an "autostop" option... what's the equiv of "autostop" option in cycle2? thank you...
  • How to substract ammount of characters from twitter fetcher

    I have a twitter fetcher script and simply want to cut ammount of characters from tweets. I need to get output of Twitter fetcher, cut it and replace in HTML. So here is my code, but the problem is that it returns text without links. I'm using this pen to modify - https://codepen.io/DeoThemes/pen/jyGPgr $("#tweets .tweet").each(function() { $(this).html($(this).text().substring(0, 50)); });
  • Issue with JSON & Ajax request

    Hi! I try to get some data from one of those APIs out there.. What I can see in the documentation, this should be written something like the code below. I got the data back in Postman, using the URL (with my own api Key), but in google chrome I just 'error ' got Unexpected token : and {"StatusCode":0," - btw, not sure what I should place in the headers..? Any one that could guide me here? Thanks in advance! $(function(){     $.ajax({         async: true,         dataType: 'json',         crossDomain:
  • can anybody help please?

    i have a drop down of companies i.e (kipg-1,kipg-2,kipg-3,kipg-4) and i have used onchange event to access the id of companies. and i have a textbox which will always be opened when trademark is selected. question is if user type something in textbox it should show a list of trademark of kipg-1,kipg-2 respectively.but this can only be done when id of selected company is passed in keyup even. how to do that? thanks in advance
  • using "one()"

    Having a problem attaching 'one' to an audio tag. Here's the structure:       <div id="song"></div> Individual songs are loaded into this div, eg "song1.htm":       <audio id="song1" preload controls autoplay>             <source src="song1.mp3" type="audio/mp3">             your current browser does not support the new audio standard: upgrade if you can       </audio> I want to attach an animation to fire once when the song starts playing:        function myAnimation() { /// } In an external javascript
  • Adding li containing divs to an <ol> in a form

    I'm creating a "document library" of sorts for my car club.  The flex layout appears to be working.  I've got a jQuery add function to "add"/insert several form fields in divs to a new <li> that gets added  to the <ol> named #sortList using .append(). The new <li> with its divs and form fields appears to be created and added as desired.  However, if I submit the form the input type file array named pic doesn't appear to get submitted.  Here's my add function: function add() //--- add row <li> to
  • Uncaught TypeError: $(...). x is not a function

    I am making my first foray into jQuery and I can't seem to solve the 'X is not a function' error. From what I've read online, -for most people the problems seems to be from not declaring jQuery first in the HTML document, but I definitely have it (CDN version and local fallback) before including any other JS files. -for others it was happening because jQuery was not getting loaded for some other reason (but for me it's definitely getting loaded, I tested for it before the line of code that causes
  • Bootgrid in laravel

    How to use bootgrid in laravel for fitering the data on the basis of date range
  • how coordinates in dropdown

    Hello, I have a dropdown and i want there coordinates if value. I saw on the internet that it is possible with jquery. see : https://jsfiddle.net/TroyAlford/ZZEk8/ for example coordinates: north: x 89 and y 14. my question is: how can I get coordinates in the dropdown? thanks in advance <select name="value">         <option value="NW">North-West</option>         <option value="N">North</option>         <option value="South">South</option>     </select>
  • detach() vs remove()

    Can somebody say what is the difference? #box {   background-color: green; } var tt = $("#box").detach(); $(tt).appendTo("body"); // or var tt = $("#box").remove(); $(tt).appendTo("body"); In both situations - it will do the same. Cut and paste. So, what's the difference?
  • Anchors and subpages # and /#

    Hello everyone, hope you are all doing fine.  I am having an issue with a fullpage BootStrap design I'm using. It also has subpages, so I had to replace the anchors  like #services with /#services (a dash in front) so the link also works on subpages. However, when on the main page now, in the navbar (bootstrap), the 'active' section doesn't lit up anymore due to the '/' before the anchor. I'm new to jQuery but I was hoping that jQuery could come to the rescue...
  • How to still active multi tabs in same page?

    I have 2 tabs in a page same as http://demos.jquerymobile.com/1.4.2/tabs/ . Firstly, I select a menu from first tabs ("Use navbar for tabs" in demo) its class and color change to active. But,When I select a menu from second tabs ("Use inset listview for tabs" in demo) , Active menu that I selected from first tab change to inactive. So, Can I make it independently active between multi tab ? Thanks. P.S. i used jquery.mobile-1.4.5
  • Find and return the position in a list by data-attribute.

    Hi, is it possible to search through a list and return the place in the list is resides; For example: https://jsfiddle.net/ysyxvtyp/279/ Search through the resultsBox list and look for the data-color="blue" if it exists return the eq() where it resides - in this case it would be 2. Thanks.
  • jQuery slidedown menu not closing correctly

    Hi, I am building a site and am using a full overlay navigation and some jQuery. It works pretty good, however I have one problem. When you close the menu, it seems as if the mask (the grey background) disappears quicker than the text, making it look weird. Any ideas? I'm guessing that is has something to do with .slideUp()/.slideDown() operation. But not completely sure, and not sure what to edit.  The navgation was originally taken from https://github.com/adtile/fixed-nav . The js is unchanged,
  • How to make loaded html document use only it's own css stylesheet?

    Hi, I have a navigation bar on the left and when I click one of its buttons it loads another html doc in a div on the right. The problem is that the loaded document uses the main css file from index.html and I only want it to use another sub.css file for example. Is there anyway to make it use only the linked sub.css file or do I just have to add lots of additional classes on the main.css file? Here's the function: $("a").click(function () {     event.stopPropagation();     event.preventDefault();
  • On click slidetoggle h4 but hide other ul close first

    Hello, I have two lists. Now if you open one list the other doesn't close. How can I make: if you click on one h4 the other list close. How can I make this? thanks in advance the code is: <!DOCTYPE HTML> <html lang="en"> <head>     <meta charset="utf-8">     <title></title>     <style>ul{display: none;}</style>         <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>     <script>         $(document).ready(function(){     $(".flip").click(function(){            
  • Displaying different image after the page reloads

    Hi Guys, How can I display different images after the page reloads? (The images have to be editable at the front end). I was thinking using the jQuery Cycle plugin and have set up the following code,however it doesn`t always displays a new image when I refresh the page. I was trying to add the random function, but I don`t think is correct. Here is my code so far: - how can I set this so it doesn`t fades every now and then, only when I refresh the page. Many thanks! <!DOCTYPE html> <html> <head> <title>JQuery
  • Is generated html dependent on the browser used ?

    Hi, Sorry for my question but i completly new with jquery. The question is on the title. Thanks, Tackent.
  • Issue with Slick Carousel

    Hi,  So I have an Eventbrite API call that generates a bunch of divs. I want to make a slider out of those divs using Slick Carousel. When I set up the carousel manually, it works fine, but when I use my API loop it doesn't perform correctly.  What the Slick Carousel plugin does is wrap the child divs in a way that creates the slider. It creates the new parent div like it should, but does not tuck the other divs underneath.  Below is the code calling everything (I'm using Wordpress): // Enqueue Scripts
  • Binging data to jq grid on button click.

    Hi Team, I am using jq grid with asp.net mvc4 and C#. I have a requirement to bind a jq grid with data on click of a button. Currently I did a sample which binds some static data to jq grid on page load itself. But I want to bind the data on click of a button once page loads. Please find by the below sample for reference that I did for referecnce. Quick response will be deeply appreciated. HTML     jQuery(document).ready(function () {              jQuery("#list").jqGrid(             {                
  • if(children(first, second).val() == "")

    $("form#zzz input[type='button']").on("click", function(){     $(this).parent().submit();   });   $("form#test").on("submit", function(){     if($(this).children("textarea, input[type='text']").val() == "")       alert("You need to feel up all fields.")     else       alert("OK");   });       <div id="comment">         <h2>Some comment</h2>         <form id="test" onsubmit="return false">           Name: <br/>           <input type="text"/> <br/>           Comment: <br/>           <textarea rows="5"
  • multiple datepicker instances

    I have successfully implemented a datepicker following the examples in the documentation. To create multiple datepicker instances in one document I thought I could do something like: $(function dpInit(dpId) {     $(dpId).datepicker({....}); }); However, how do I call dpInit? tia, cb
  • Can not put a variable of a txt file with tag html in a text element svg

    Hi, I want  to retrieve the text part between tag html from the load command. For this I use an svg file directly in my html page and the load command of jquery. If I download from a text file without html tag it works well: $ ("# DivA"). Load ("demo_test1.txt"); If I download from a file containing html tags this does not work. $ ("# DivA") load ("demo_test.txt # p2"); A remark in my example the "div" works in both casesBelow my file: demo_test.txt: ***************** <p id="p1" >It works fine</p>
  • How to setup active Accordion??

    Hi guys, i need help using Accordion jQuery. I what to add a div code to the "active section". Example: only the title of the active section show an image and not the inactive sections. Can someone show me a simple code to do it?? thanks!
  • hy parseerror?

    Hi, Why I am getting parseerror when I am not returning anything and I am just INSERTing? here is the code: $('#frmSurvey').submit(function (event) {     event.preventDefault();                      viewModel.loadPanelVisible(true);     var formData = new FormData();     formData.append("customer_name", $("#txtName").dxTextBox('option', 'value'));     formData.append("customer_email", $("#txtEmail").dxTextBox('option', 'value'));     // formData.append("customer_birthday", $("#dateBirthday").dxDateBox('option',
  • Is there a way to trigger the language set on device?

    Hello, I'm starting an application in three languages, but I would like to know how I could trigger the language used on the device of the user. Is there a simple way to do it with JQM ? Thanks in advance
  • Syntax Highlighter Problem?

    SyntaxHighlighter is not defined... $(function(){       SyntaxHighlighter.Highlighter.all();     });     $(window).load(function(){       $('.flexslider').flexslider({         animation: "fade", controlNav: false,         start: function(slider){           $('body').removeClass('loading');         }       });     }); This code is right? please help me with this...
  • Div Expand and Collapse

    Hi all, Problem is when I click on link addClass and removeClass working fine but all div's with class "box-panel" slideDown and slideUp at a time and that should not happen. One div should be show or hide instead of all I hope you got my point Script jQuery(document).ready(function () { var topBoxA = jQuery('.box-top > a'); jQuery('.icon').addClass('iconplus'); jQuery(topBoxA).click(function () { debugger; if (jQuery(this).hasClass('iconplus')) { jQuery(this).removeClass('iconplus');
  • How to div refresh on specific tab load

    How to div refresh on specific tab load  // Tabs   $('#tabs').tabs({ fx: { opacity: 'toggle' } }); tab name #finance <script>$('#finance_result').load(code.php', function() { });</script>
  • if element has an image, wrap it and move it

    I have a series of divs that may or may not contain an image. I need to check if each div has an image, and if it does, wrap the div, wrap the image, and move the wrapped image into the newly wrapped div (so I can have it float next to the original div). So from this: <div class="event">image text</div> <div class="event">text</div> to this: <div class="eventHolder" >  <div class="imageHolder" >image></div>  <div class="event" >text</div>  </div> <div class="event">text</div> I feel like I'm close
  • Opposite to $("#resultsBox *:hidden").size();

    Hi, what would be the opposite to:  var a1 = $("#resultsBox *:hidden").size(); I have tried doing the opposite, substituing  var a1 = $("#resultsBox *:visible").size(); Thanks in advance. Thanks.
  • convert json object with spaces

    Hi! I have some JSON to deal with.  The given structure i have is like this. ... "days": [     {       "date": "2017-01-01",       "weekday": "Sunday",       "workfree day": "Yes",     }, ... What I try to do is to use jQuery and Ajax to get an output of some of the values onto a web page.It works fine with for example: var test1 = data.dagar[dayNr].date; (works fine) But.. One of the nodes have a blankspace: workfree day" - I  haven't figured out how to solve that in my output.. var test2 = data.dagar[dayNr].workfree
  • Filterable inside custom select Fixed

    I am trying to "fix" the filter box on a custom select to the top of the screen when scrolling up the list.  I have very long lists and when the user edits a record the value selected can be way down the list.  I need the search box to remain at the top so it is available to the user.  I have tried using libraries like Sticky-Headers, but they do not seem to work.  Is there a native way to make the filter box stick? Thanks, Darren
  • Call function when app page loads

    Hello: I am developing a mobile app using Cordova, but right now I'm simply working on the HTML, JS, and CSS files.  When the app opens, it will first just come to my "home" section. I have a button that will open the left Panel, and from there, if I click the "Programs" item, then it will fire my function which displays my listview (it does this in this HTML page at the "<div id="divShow"></div>") . Here is my home section: <section data-role="page" id="home"> <aside data-role="panel" data-display="overlay"
  • ms-Dropdown

    Hello,  I'm trying to use this https://github.com/marghoobsuleman/ms-Dropdown and I have a few questions that I couldn't find answers in the documentation.  First, my option list has a dynamic "style='display:none;'" that depends on other regular dropdowns (without the plugin applied). Can Initiate the msdropdown only on the visible items and refresh it when things change ?  Secondly, each "option" in the select list has an ID and style, can I add it to the generated MSdropdown in a way that each
  • jquery html need help

    $(document).ready(function(){ $(".iconClass").click(function(){  $("#iconSearch").html("<div class=\"btn-group\"><input type=\"search\" id=\"searchInput\"/><span id=\"searchClear\" class=\"glyphicon glyphicon-remove-circle\"></span></div>");  }); $("#searchClear").click(function(){        $("#searchInput").val(''); }); }); HTML CODE <div id="iconSearch"> <i class="fa fa-2x fa-search iconClass"></i>   <!--Text -->   <div id="desText">   <p>Click search icon</p>   </div>  </div> When I run this code
  • change datepicker

    hi to all. sorry for my english. I found the datepicker calendar. It's very nice. One queston I have. Is it possible to block some Dates myself, so the user can't pick them? Thanks in advance.
  • Onboarding/welcome screen using page div?

    For many apps, on the first launch, it will show a screen welcoming the user or introducing the app's features. If this is not the first run, the just go straight to the main screen. Do we create 2 div with data-role="page", for example "main" and "welcome"? Then use $.mobile.navigate(page_id) to direct to the right page? Where would be the appropriate place to insert the JavaScript codes to check and direct to the right screen page automatically? By default, jQM will jump to the first data-role
  • 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