• List Task Creation in Shaerpoint Server using REST API

    Hi guys my task is to create a task in list in sharepoint sever 2013 using REST concept..I tried this code but i don't know where i am lagging..My code is   function createListItem(webUrl, listName, itemProperties, success, failure) {                 alert("hoi hello method");                 $.ajax({                     url: webUrl + "/_vti_bin/listdata.svc/" + listName,                     type: "POST",                     processData: false,                     contentType: "application/json;odata=verbose",
  • is something wrong with my code?

    i have two weeks of learning experience jQuery, what is wrong this code? it keeps displaying this on Console [button, context: button, jquery: "1.11.2", constructor: function, selector: "", toArray: function…]0: buttoncontext: buttonlength: 1__proto__: m[0] this is the actual code <!DOCTYPE html> <html> <head> <title>jQuery Event</title> <link rel="stylesheet"  href="day.css"> </head> <body>         <h1>my website</h1>     <button>day</button>     <button>night</button>    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
  • Adding the SharePoint PeoplePicker to jQueryValidator using rules method

    Hello, I have a SharePoint custom list form where I use the jqueryvalidation.org library to provide form validation. When the form is running the document.ready() event/method I assign relevant fields for validation using for example: var _validator = $('form').validate({      debug: true }); var assignedTo = $().SPServices.SPFindPeoplePicker({      peoplePickerDisplayName: 'Assigned To' }); $(assignedTo.contents).rules("add", {      required: true,      messages: {           required: "Title is
  • center div not happening

    Dear All http://webvikas.net.in/marathe/kuladevata.php Click on the sqaure box displays a div in pop displays the required data in popup. if we scroll down to bottom of the page, and click on the square,     a pop up window appears  but not exactly in center of window. please help
  • Issue on Renaming Image File On Upload Using jQuery Ajax

    I am trying to Rename an image when uploading it. I have a text field with id of  newName  now I would like to pass it into FormData ( )  and over write it on the file name in the PHP file Here is the the code I have  <input type="text" id="newName" /> $(document).ready(function (e) { var newName = $("#newName").val(); $('#imageUploadForm').on('submit',(function(e) {       e.preventDefault(); var formData = new FormData(this); $.ajax({ type:'POST', url: $(this).attr('action'), data:formData, cache:false,
  • [question] stop .animate if x.top > 200

    question: When a lion and a tiger meet, can they stop???? http://jsfiddle.net/jsfiddle135/f4qjadvL/2/ $(document).ready(function() {     $("#meet_liontiger").bind("click", function() {        var lio;          $("#lion").animate({top: 30 }, 3200, function(){                       lio = $(this).position();          });       //top:420, left:0                               $("#tiger").animate({top:500}, {   //top:20, left:0            speed: "slow",            step: function(top) {                if
  • Dialog UI Won't Perform Click Action Callback Function

    Hello everyone, I'm trying to write a script utilizing the jQuery dialog UI. The form shows up in the dialog box as it's suppose to. The "Submit" button is created. The weird thing is when you click on the Submit button, if I have a "close" action inside the function, it works. But if I have another function to be called inside of the click function, it won't call that function.     /**      * set the dialog      */     var createDialog = function(autoOpen=false, height=300, width=300, modal=true)
  • trigger works with button click but no with document ready

    I have some checkboxes which trigger an ajax search. I want to check the boxes automatically and trigger the search. If I run the triggers from a button click, it works fine. But if I add them to the initial load function, the checkboxes are checked but the triggers don't work. Why? Here is the code first I uncheck all the boxes. jQuery( "[id^='radio_']" ).prop('checked', false ); Then I trigger checking certain boxes. jQuery('#radio_2155').trigger('click'); jQuery('#radio_1775').trigger('click');
  • On mouseout from float div hide but not from the main div

    Hi, i am baby to jquery, this is my first try. I want when the user mouseout  from a drop menu to hide. I have made it to a point but the menu disappears when it is out of the main div not the new one appearing. Here is the html <div class="notifications"> <button class="btn btn-primary" type="button">   Notifications <span class="badge">2</span> </button>   <div class="messages">     <a href="#" class="message">This is a message</a>     <a href="#" class="message">This is a message</a>   </div>
  • Jquery says 'a.split is not a function'

    i'm trying to make an adress book using team leader. I can perfectly open the first item, but everything after that can't open.         <!DOCTYPE html>         <html>         <head>             <meta charset="utf-8">             <meta name="viewport" content="width=device-width, initial-scale=1">             <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">                                        <?php             error_reporting(E_ALL);             ini_set('display_errors',
  • javascript quiz

    I am new to javascript but am trying to incorporate an interactive self grading quiz in my website I recently saw th following code as a way of implementing it but I don't quite understand how it works; < style type="text/css"> < !-- .bgclr {background-color: white; color: black; font-weight: bold;} --> < /style> < script language="JavaScript"> < !-- Begin // Insert number of questions var numQues = 4; // Insert number of choices in each question var numChoi = 3; // Insert number of questions displayed
  • This add(var a, var b) doesn't work. Why??? So simple funciton

    <!DOCTYPE > <html> <head>     <title>Loop through an array using jQuery</title>     <script src="https://code.jquery.com/jquery-1.11.2.js"></script>     <script type="text/javascript"> $(document).ready(function () {      function myFunction( var a, var b) {   //Without var, the function works fine!!!!!!        return a + b;     }     var m=0;    $('# iknow').click(function(){            m=m+1;    var k = myFunction('king', m);    alert(k);   }); }); </script>  </head> <body>     <button id ="iknow">
  • Function not always executed when it should

    Hi guys, I'm developing a page with a background color and a color for a word that are randomly picked between nine colors when you click on a button. These two colors should never match because otherwise you wouldn't see the word. I created a function that checks if the colors match and if they do, calls the functions to choose the colors again. The problem is that it seems to work just some times. Here's a link to JSFiddle  Do you know why it doesn't work? EDIT: I managed to solve the problem increasing
  • jQuery addClass question

    This is nasty but at least I have the variables I want, yes it's the old Firfox on a MAC issue. So I know what OS and what browser is being used what I want to do now is to add some class names to the body tag. <script> $(document).ready( function() {  if OSName = "MacOS" && browserName = "Firefox" {   $('body').addClass("mac ff");  if OSName = "Windows" && browserName = "Firefox" {   $('body').addClass("win ff"); }); </script> </body> </html> as a guess I think I need to add on onLoad somehow and
  • Freezing Pages

    Hello Everyone, A site I just did in Jquery mobile starts freezing up when you click any regular text link on the page. The site is http://www.myuniversalawnings.com and you can see the site starting to get screwy right on the front page links at the bottom. Does anybody have a good solution to this? Thank you! Will
  • Problem with Jquery UI select custom menu open when Mouseover occur.

    Hi All, I am using the "selectmenu with custom avatar 16*16 images(select menu i need images)". reference link and code same in this site(http://jqueryui.com/selectmenu/#custom_render ). I have a problem in this selectmenu open when mouse over occur and closes when mouse over out. $('#people-button').on('mouseover', function() {         $('#people').selectmenu('open'); }); but it show an error like cann't call methods on selectmenu prior to initialization;attempted to call method 'open' ' add the
  • Jquery Ui problem regarding to menu select.

    Is their any function In Jquery select menu for user clicks the menu select items. My sample code here .http://plnkr.co/edit/7Z3E4UF9oosvnJaykIca?p=preview () Is their any function to call after the user select(clicks ) the menu items.
  • How to target an identifier that is not loaded into the DOM?

    With AJAX, I want to change content of a div. But this div is loaded by another Ajax Script. This content has a SELECT INPUT. To target, if i use : $(''#id_select').on('change', function(){---}); #id select isn't found. But if i use : $('#id_container').on('change', '#id_select', function(){...}); It's ok. No problem for this. But then, i have to change html data on a div, with : $('#search_modele').html(data); But #search_modele isn't found. How can i do ? Thanks a lot for saving my life :)
  • slideToggle: problem with positioning of the to be increased DIV box

    Hello, I'm using jQuery version 2.1.3 and the slideToggle function. During the sliding effect, the div box "mycontainer" in the example below is increasing but not correctly: at the beginning, the div box will be increased to its maximum height. At the end, the complete div box is moved some pixels upwards. It looks like that the box will be repositioned at the end - or - the upper left corner at the beginning of the sliding down effect is not correctly calculated. Here a HTML sample: <!DOCTYPE html>
  • Hover bug in Google Chrome with jQuery in Windows 8

    I've got a problem with a dropdown menu using simple click and hover jQuery functions to make it drop down and close. I wasn't sure where to post this since it seems to be a bug. What's strange about it is that there's a problem with the hover function in Windows 8 (not 8.1 as far as I know) and Windows 10 when using the latest version of Chrome (41.0.2272.89). Same Chrome version works great in Windows 7, OSX, etc. The dropdown item contains of a clickable div container with a span text inside of
  • tablesorter - can it sort using alternating rows?

    Standard HTML table. But the output is weird: a dozen columns of data on a row then the row immediately after it is a colspan of all those columns which contains a random amount of text, but  attached to that row. How can I sort on any of those dozen columns yet maintain the following row still attached to the sorted row? Example is hard to enter but imagine a table of 3 columns like this: [table] [tr] [td]data1[/td] [td]col2[/td] [td]col3[/td] [/tr] [tr] [td colspan=3]long amount of text here[/td]
  • Make child DIV larger than parent DIV with jQuery

    Hi, This has been a discussion that I have found all over the web with no solutions yet, but I refuse to believe that its impossible, especially with using a bit of jquery magic :) The problem: I want to make the Child Div of a fix width Parent 100% width, like so: I know that with CSS this is partially achievable: .child-div{ position: absolute; left: 0; right: 0; } .parent-div{ position: static; max-width: 900px; } But the issue I'm having is that I can't actually change the position: static; prooperty
  • Wrong count is also accepting in Jquery and accepting keywords any where

    Requirement: textbox limit: 25characters, max limit:40char allow  IF text contains {State},count for {State} only is 16,  {City} count 14, {St}=2,{Zip}=5   Problem: I have written JQuery code for this (below code) but it accepts 1.25chars={City}123456789—correct 2.25charcters=1234567891245678{City}-wrong- but it also accepting this one 3.25-chareacters=123456789123456789{City}---wrong- but it also accepting this one     1 dropdown:MainContent_ddlSelectAdLine Options: HeadLine   1 Textbox: MainContent_txtAdline
  • This easy animation doesn't work?

    http://jsfiddle.net/jsfiddle135/2g138o5m/2/ What I want is: 1) Each time a user clicks $(#fly).click, the related div shall go up. 2) Then it shall set its css to the original position. Why doesn't this work?
  • How to simplify code and how animate an element inside a another element

    Hi guys, I'm new here and I'm learning jQuery. I have this piece of code: $('#portfolio ul li').mouseenter(function(){         $('.overlay', this).stop().animate({             opacity: '0.5'         }, 250, 'easeInOutQuint');         $('.overview', this).stop().animate({             top: '50%',             left: '50%',             margin: '-50 0 0 -125'         }, 250, 'easeInOutQuint');         $('.link', this).stop().animate({             bottom: '50%',             right: '50%',             margin:
  • Issue on Ordering - Indexing Multidimensional Array

    Can you please take a look at This demo let me know how I can force Javascript to push the items into the array based on the items id? <!-- begin snippet: js hide: false --> <!-- language: lang-js -->     var theArray = [         ["A", "B", "C"],         ["D", "E"],         ["F", "G", "H", "I"],         ["J"],         ["K", "L", "M"]     ];     var res = theArray.toString();     $('#textarea').text(res);     $("input[name='m1']").change(function () {         if ($(this).is(':checked')) {        
  • GSoC 2015 jQuery Learning Center

    I am very interested in online learning platforms. In the past I have tried many, starting with free w3schools testing and then paid to checkout codeschool after doing the rails for zombies course. jQuery is a pretty exciting thing to learn as almost everyone who wants to learn to do something quickly will be looking for the $. I would very much like the privilege to be a part of the design process and build for jQuery a framework to allow for interactive tutorials. I have quite a bit of experience
  • Reposition Div text when div is scrolled based on the visisble viewport of the div

    Is it possible to reposition the text inside a div which has scroll and recalculate the the position of the text based on the visible section . eg: the  text needs to appear 100px; from left or text -align:left but once the div scroll the text doesn't move.I have tried using the within viewport plugin of jquery  and reposition with css("left","100px") ;
  • JQuery/JavaScript syntax error while dynamic binding

    Syntax error while binding the dynamic table along with JavaScript function call <p id="dashboard">     I’m trying to bind table dynamically along with JavaScript function call <p id="dashboard">   <script> // some code Loop{ Table = Table + "<tr class='TRCol'><td class='TDColHead'><a onclick='openBasicDialog('"+ itemValue +"');'>" + itemValue + "</a></td>"; } // some code Table = Table + "</table>";          $("#dashboard").replaceWith(Table);    </script>   In browser it’s rendering with syntax
  • Running a Function When AJAX Finishes

    I am using some jQuery code to resize images client-side and send them to Amazon S3 via jQuery File Upload (https://github.com/blueimp/jQuery-File-Upload/): I want to first upload a one size file to S3, get the url back then upload the same photo again in thumbnail size. I am using Ruby on Rails (the 'get' is getting presigned credentials via controller action from S3) .  My knowledge of javascript is not very strong so please correct my terminology or point to my a how-to for what I am missing.
  • facebook like_box not working

    hey guys i am trying to add the facebook likebox on my page and nothing is appearing on my page . now what i did was followed the exact same instructions as given in the facebook screen shot seem below: but nothing appears in the browser . i went through a few online tutorials too but nothing seems to help . now as it stands my code looks as follows : <div id="fb-root"></div>          <script>(function(d, s, id) {            var js, fjs = d.getElementsByTagName(s)[0];            if (d.getElementById(id))
  • selectMenu() not working on dynamically generated HTML select

    So I have a table with a bunch of selects and I apply selectMenu to them and they work great.   Then I have an option for the user to dynamically insert an additional row, so I have a javascript function that inserts a new html row with cells and an HTML select inside one of the cells.  Then I execute the following javascript to transform the new select into the selectMenu version.   $('#dailyblock' + weekdayid + '-' + scheduleid + '-' + childid).selectmenu({               style:'popup',        
  • Having a problem with jQuery when displaying error message.

    Hey guys, I am having a problem with displaying an error message in form validation, specifically line 68. I am trying to take my var errorMessage and do a function that displays both error messages. any ideas? code is this:<!doctype html> <html> <head>   <title>test</title>   <meta name="description" content="Colin Portfolio">   <meta name="author" content="SitePoint">   <meta charset="utf-8"> <script type="text/javascript" src="jquery.min.js"></script> <link rel="stylesheet" href="mystyle.css"
  • Stuck... have a question...

    /////////////////////////// // Enter your info below// ///////////////////////// var channelName = 'thedallascowboyshow'; var vidWidth = 500; var vidHeight = 400; var maxResults = 10; var key = 'TEST KEY'; ////////////////////////////// // NO edit below this line // //////////////////////////// $(document).ready (function(){ $.get (   "https://www.googleapis.com/youtube/v3/channels",{   part: 'contentDetails',   forUsername: channelName,   key: key},   function(data){   $.each(data.items, function(i,
  • Download CSV file through ajax post

    Hi there, I'm just trying to download a file generated from PHP with ajax. Even if I set headers PHP and contentType in Ajax parameters, I have still an issue as I can't have my response in a file but in my callback success as a parameter. NB: I must send a lot of data with ajax, so I have to use POST method. My PHP code : <?php header('Content-type: text/csv'); header('Content-disposition: attachment;filename="' . $csvFilename . '"'); echo $csvContent; return; ?> My JS: $.ajax({       url: url,
  • Pass controls as attributes to jquery funtions

    How can I pass a control as a function attribute? In my case I would like to pass txtDirections and charStatus. Thanks $(document).ready( function () { $( '.txtDirections' ).keyup( function () { var maxLength = 1000; var textlength = this .value.length; if (textlength >= maxLength) { $( '#charStatus' ).html( 'You cannot write more then ' + maxLength + ' characters!' ); this .value = this .value.substring(0, maxLength); e.preventDefault(); } else { $( '#charStatus' ).html( 'You have ' + (maxLength
  • How to Delete Row using jquery Ajax

    How to Delete Row using Id    var row = $(this).closest('tr');             $.ajax({                 url: "/Course/Delete",                type: "POST",                 ajaxasync: true,                 data: {Id:1},                  ///Manually provided                 success: function () {                                                           row.remove();                    location.reload();                     alert("success");                 },                 error: function (xhr, ajaxOptions,
  • change the bg color of a container div class depending on a value of child class

    For the below codes, i want the bg color to be changed  1) to yellow for the class ms-acal-item if <a>Pending.... 2) to red for the class ms-acal-item   if <a>Rejected.... 3) to green for the class ms-acal-item  if <a>Accepted.... how do i achieve it, please help <div class="ms-acal-item"> <div class="ms-acal-sdiv"> <div class="ms-acal-title"> <a>Pending - Loren Ipsum1 </a> </div> </div> </div> <div class="ms-acal-item"> <div class="ms-acal-sdiv"> <div class="ms-acal-title"> <a>Approved - Loren Ipsum2
  • dynamic list with null value in jquery

    I've a function to make a dynamic list. $sel = $('<select id="Addlst">').appendTo($td); $.each(TableStruct[post].Liste, function (ind, value) { $('<option ' + (ind == 0 ? 'selected="selected "' : "") + ' value="' + value + '">').html(ind).appendTo($sel); }); I use value is a nullable(of integer) VB.net side. In 99.9% of cases, I've no problem. But when I've null value (it's for ranking product) My root is null in DataBase. Then when I ask $('#Addlst').val(); ... I've "null". Someone can help me?
  • app not connecting to external link

    I  developed an app which works well in the simulator and on device, but when submitted to google play app store , my app could not reference jQuery mobile/jQuery link as well as  linking to external pages and sites. Could it be a problem on the Google. This is my first app and have just been 3 weeks. Thanks
  • 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