Search Results

Search found 23364 results on 935 pages for 'jquery ui droppable'.

Page 241/935 | < Previous Page | 237 238 239 240 241 242 243 244 245 246 247 248  | Next Page >

  • Need help in JQuery scroll function

    - by KillerFish
    I am developing a small project and i need a help in JQuery Scroll event. I wrote code loading data while scrolling using following code $(window).scroll(function(){ if ($(window).scrollTop() > ($(document).height() - $(window).height())*.75){ $('#loadingimage').css({"bottom":"10px", "right":"10px"}).fadeIn('fast'); $.ajax ({ type: "POST", url: "../../scroll_load.php", data: "letter="+letter+"&start="+start, success: function(msg) { $('#new_music_videos .appendvideos').append(msg).children(':last').hide().fadeIn('slow'); $('#loadingimage').fadeOut('fast'); } }); } }); But data loading while the scroll bar is moving at bottom of the screen only. How can i make it for scroll upto 3/4 of the screen. Thanks a Lot.

    Read the article

  • jQuery Find Previous Table Row that has a Cell with a Specific Class

    - by Huy Tran
    Hello All, Suppose I have a table like so: <table> <tr><td class="this-is-a-label">Label Cell</td></tr> <tr><td>Detail 1</td></tr> <tr><td class="selected">Detail 2</td></tr> </table> I want to be able to grab the previous "Label Cell" from the "Selected" cell. My jQuery script should be something like: $('.selected').each(function() { var label = $(this).parent().prev('tr td.this-is-a-label'); //... do what I need with the label ... }); But it's not working. Does anyone have any suggestions? Thanks.

    Read the article

  • jquery integrate form parameter in one object

    - by jesse
    There are many forms in my page. I want to merge them in one object and submit them in one object. But I find serializeArray() or serialize() do not match my request, the serializeArray function will generate a array object and serialize is used by get model, it is not an object. is there a jquery or local function can merge them in one object. I have one solution but it is not perfect, loop the array object generated by serializeArray, use $.extend to merge them in one object. is there a better method? kindly help, thanks.

    Read the article

  • JQuery tab Selection problem?

    - by PeAk
    New to JQuery and I was wondering how do I keep any tabbed selected when a user reloads the web page? What part of my code do I need to change? Here is my JQuery code. $(document).ready(function() { //When page loads... $(".form-content").hide(); //Hide all content var firstMenu = $("#home-menu ul li:first"); firstMenu.show(); firstMenu.find("a").addClass("selected-link"); //Activate first tab $(".form-content:first").show(); //Show first tab content //On Click Event $("#home-menu ul li").click(function() { $("#home-menu ul li a").removeClass("selected-link"); //Remove any "selected-link" class $(this).find("a").addClass("selected-link"); //Add "selected-link" class to selected tab $(".form-content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the selected-link tab + content $(activeTab).fadeIn(); //Fade in the selected-link ID content return false; }); }); Here is the XHTML code. <div id="home-menu"> <ul> <li><a href="#personal-info-form" title="Personal Info Form Link">Personal Info</a></li> <li><a href="#contact-info-form" title="Contact Info Form Link">Contact Info</a></li> </ul> </div> <div> <div id="personal-info-form" class="form-content"> <h2>Personal Information</h2> <form method="post" action="index.php"> <fieldset> <ul> <li><label for="first_name">First Name: </label><input type="text" name="first_name" id="first_name" size="25" class="input-size" value="<?php if(!empty($first_name)){ echo $first_name; } ?>" /></li> <li><label for="middle_name">Middle Name: </label><input type="text" name="middle_name" id="middle_name" size="25" class="input-size" value="<?php if(!empty($middle_name)){ echo $middle_name; } ?>" /></li> <li><label for="last_name">Last Name: </label><input type="text" name="last_name" id="last_name" size="25" class="input-size" value="<?php if(!empty($last_name)){ echo $last_name; } ?>" /></li> <li><label for="password-1">Password: </label><input type="password" name="password1" id="password-1" size="25" class="input-size" /></li> <li><label for="password-2">Confirm Password: </label><input type="password" name="password2" id="password-2" size="25" class="input-size" /></li> <li><input type="submit" name="submit" value="Save Changes" class="save-button" /> <input type="submit" name="submit" value="Preview Changes" class="preview-changes-button" /></li> </ul> </fieldset> </form> </div> <div id="contact-info-form" class="form-content"> <h2>Contact Information</h2> <form method="post" action="index.php" id="contact-form"> <fieldset> <ul> <li><label for="address">Address 1: </label><input type="text" name="address" id="address" size="25" class="input-size" value="<?php if (isset($_POST['address'])) { echo $_POST['address']; } else if(!empty($address)) { echo $address; } ?>" /></li> <li><label for="address_two">Address 2: </label><input type="text" name="address_two" id="address_two" size="25" class="input-size" value="<?php if (isset($_POST['address_two'])) { echo $_POST['address_two']; } else if(!empty($address_two)) { echo $address_two; } ?>" /></li> <li><label for="city_town">City/Town: </label><input type="text" name="city_town" id="city_town" size="25" class="input-size" value="<?php if (isset($_POST['city_town'])) { echo $_POST['city_town']; } else if(!empty($city_town)) { echo $city_town; } ?>" /></li> <li><input type="submit" name="submit" value="Save Changes" class="save-button" /> <input type="hidden" name="contact_info_submitted" value="true" /> <input type="submit" name="submit" value="Preview Changes" class="preview-changes-button" /></li> </ul> </fieldset> </form> </div> </div>

    Read the article

  • Can't call page method from JQuery?

    - by user356787
    I have a page called AddNews.aspx and in codebehind a web method called AddNews(Parameters).. AddNews.aspx page is inherited from a master page.. So i used contentplaceholder. I have a button..It's id is btnSave. Here is jquery code: $(function() { $("[id$='_btnSave']").click(function() { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", data: $.toJSON(veriler), url: "AddNews.aspx/AddNews", dataType: "json", success: function(result) { $("#result").html('News added'); }, error: function() { alert('Problem'); } }); }); }); </script> Button click trigger now.. But it doesnt call Web Page Method.. What's the problem?

    Read the article

  • javascript / jQuery variable problem (possibly caching issue)

    - by waitinforatrain
    Standard AJAX query with jQuery: var globalTitle = ""; var pages = ["a", "b", "c"]; for (var i = 0; i < pages.length; i++) { createpage(pages[i]); } function createpage(title) { globalTitle=title; console.log (globalTitle); //All looks good here $.ajax({ url: "createpage.php?id=" + title, context: document.body, success: success }); } The success() function uses globaltitle which is why I had to declare it global. In the success() function though console.log (globalTitle); constantly gives me "a". It's like the variable is assigned but is then cached every time success() is called. Happens in FF 4 and Chrome 8. Any thoughts?

    Read the article

  • Getting the dynamic value of a checkbox in repeating region loop with Jquery

    - by John
    How do I get the values of a check box that is in a repeating region with its values dynamically generated from a recordset from the database.I want to retrieve the value when it is checked and after I click on a link.The problem is that it is retrieving only the first value of the recordset which is 1.This is the code: //jQuery $(document).ready(function(){ $("#clickbtn").click(function(){ $("input[type=checkbox][checked]").each(function(){ var value=$("#checkid").attr('value'); $("#textfield").attr('value',value); }); return false; }); }); //html <td width="22"><form id="form1" name="form1" method="post" action=""> <input type="checkbox" name="checkid" id="checkid" value="<?php echo $row_people['NameID']; ?>" /> </form></td> I would appreciate the help.

    Read the article

  • jQuery: "Nested" visibility

    - by xyz
    I have a table with multiple <tbody> elements. At a given momement, certain <tbody elements are visible and some are hidden, and I need to select only the visible ones. I use jQuery's :visible selector. Now the problem is that I need to perform that task before I display the table, AKA while the table is hidden, and then the :visible selector doesn't work. How can I select "visible" <tbody> elements while the table is hidden? Thanks.

    Read the article

  • JQuery validation based on class?

    - by Mark Kadlec
    I have a form that will have dynamically created elements, one of those will be of date type. There can also be many fields of this type on my form, all which must be validated. I am using a strongly typed view in Asp MVC, so the name will change based on various factors. What I would like to do is validate based on a class name instead, since that will be constant for that type of field. Ie: <%= Html.TextBox("questionAnswers[" + index + "].AnswerValue", qa.AnswerValue, new { @class = "DateTypeClass" })%> So then I would need JQuery validation based on the classname DateTypeClass versus the Name. Any ideas?

    Read the article

  • Not working for single click..Jquery Grid

    - by kumar
    $("#table_id").click(function(e) { var row = jQuery(e.target || e.srcElement).parent(); $("#table_id").bind('click', loaddata); name= row.attr("id"); }); loaddata is the funcation I am calling on click on each row.. but this cilck event is working for double click.. I mean when you double click its working fyn.. but i need it to work for single click on the row.. is that anything I am doing wrong here? thanks

    Read the article

  • jQuery AJAX functions

    - by sundowatch
    I am using jQuery's load() function when getting a page to a div like that: content.php page is : <script type="text/javascript"> $(".content").load("asd.php"); </script> and asd.php is: <script type="text/javascript"> alert("Hello World"); </script> When load ajax finished alert() message appears 3 times. Actually it must appears only 1 time. So load() function get page 3 times. How can I get the page a time?

    Read the article

  • multiple jquery galleries

    - by user1644650
    I'm trying to separate two jQuery galleries, so they don't interlink on my html page: http://mashanova.com/myFAQ/faqGallery.html# here is the html: here is javascript: $(document).ready(function(){ $('.gallery_thumbnails a').click(function(e){ e.preventDefault(); $('.gallery_thumbnails a').removeClass('selected'); $('.gallery_thumbnails a').children().css('opacity','1'); $(this).addClass('selected'); $(this).children().css('opacity','.4'); var photo_fullsize = $(this).attr('href'); var photo_preveiw = photo_fullsize.replace('fullsize','preview'); $('.gallery_preview').html('<a href="'+photo_fullsize+'" style="background-image:url('+photo_preveiw+');"></a>'); }); });

    Read the article

  • jquery: animate function problem

    - by Syom
    i start learning jquery just yesterday. i have a div element with some content, and i want to hide it by changing it's height: here is the script <script type="text/javascript"> $(document).ready(function(){ $("#hide").click(function(){ $("#cont").animate({ height: '0' },1500); $("#cont").hide(); }); }); </script> <input type="button" value="hide" id="hide"> <div id="cont"> text here... </div> but it doesn't work, becouse it automaticaly sets display:block to #cont element, so after animation it starts to show. when i try to set display:none to #cont element, it doesn't happen. could you help me? thanks

    Read the article

  • grabbing text in div with jquery

    - by vick
    <a class="source" href="jquery-lead.php?source=<?=$src;?>">3</a> <script type="text/javascript"> $("a.source").live('click', function() { $("#results").load( $(this).attr('href') ); return false; }); </script> I am able to pass $src variable to my php script, but I also want to pass whatever is in the tag. In this case "3", this is going to be a pagination..

    Read the article

  • Animate/Ease an element to position when other elements disappear

    - by Jonathan
    Please take a look at this fiddle: http://jsfiddle.net/dhcyA/ Try clicking on a block. What I want is that when the other elements disapear, the selected block will animate/ease to his giving position instead of just jumping like it does now. Then the same animation repeats itself when clicking again on the box, but then back to place. Maybe to keep in mind: I'm using a reponsive design, which means those blocks can be vertical and horizontal after scaling the window. Any redevisions on the fiddle or suggustions would be great!

    Read the article

  • Pass var to jquery from div

    - by user1518202
    I am using a jquery function to open a dialog box, and I need to be able to change the height and the width of the box. I am wanting to pass it a parameter from within the DIV. I have looked at many different possibilities, but to no avail. Any ideas would be greatly appreciated. $.fx.speeds._default = 1000; $(function() { $("#dialog").dialog({ autoOpen: false, height: 300, width: 500, show: "drop", hide: "drop" }); $("#opener").click(function() { $("#dialog").dialog("open"); return false; }); }); Here is my Div. <div id="dialog"> Some text here </div>

    Read the article

  • How to use jquery code in Internet Explorer?

    - by ilariah
    I put some jquery in my website that makes the text move to the right when the page changes. It works in Firefox and Safari but it doesn't work in Internet Explorer. My url to my website: http://katieduck.com/Courses/Improvisation%20Winter%20Course%20Dartington.html Here is the code that is not working: $(document).ready(function() { $('#tabvanilla > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } }); $('#featuredvid > ul').tabs(); }); Maybe you can find out what is wrong.

    Read the article

  • How do you send an array as part of an (jquery) ajax request

    - by Ankur
    I tried to send an array as part of an ajax request like this: var query = []; // in between I add some values to 'query' $.ajax({ url: "MyServlet", data: query, dataType: "json", success: function(noOfResults) { alert(noOfResults); } }); } I wanted to see what I get back in the servlet, so I used this line: System.out.println(request.getParameterMap().toString()); Which returned {} suggesting an empty map. Firebug tells me I am getting a 400 bad request error If I send a queryString like attribute=value as the 'data' then everything works fine, so it has to do with not being able to send an array as is. What do I have to do to get that data into the servlet for further processing. I don't want to pull it out and turn it into a queryString in the JS if I can avoid it. EDIT: I used the .serializeArray() (jQuery) function before sending the data. I don't get the 400 but nothing useful is being sent through.

    Read the article

  • JQuery updating label

    - by Zaps
    Hi, I have 2 textboxes and a label on my page. The 2 textboxes will contain numeric values. The label text will be the product of the 2 textbox values. Is there a way to do this using JQuery so that the value can get updated without having to do a postback? Also the textboxes may contain values with commas in it: e.g. 10,000. Is there a way I can extract the number from this so that it can be used to calculate the label value. Thanks in advance, Zaps

    Read the article

  • Jquery li element id

    - by Gazler
    Hi, I am using a jquery contextmenu plugin for right click menus which I am trying to add to each li element of an unordered list with the ID mailbox. The code I have is: $("#mailbox > li").contextMenu('myMenu1', { bindings: { 'open': function(t) { alert('Trigger was '+t.id+'\nAction was Open'); } //CODE SNIPPED }); My assumption is that this should alert the id of the list element that the contextMenu was called from, however it is returning an empty string. Am I accessing/assigning these correctly? t is an object HTMLLIElement in the context above by the way. Cheers, Gazler.

    Read the article

  • How do I "step over" jQuery code while debugging?

    - by Scott Rippey
    While stepping through a script that uses jQuery, I just want to test the code I wrote. I don't want to step into the jQuery file -- I'm not debugging jQuery, just my own file. Are there any ways to tell a debugger to not step into the jQuery file? I use Visual Studio + Internet Explorer, as well as Firefox + Firebug for stepping through code ... and both seem to love to step through dozens of jQuery statements. For example, say I have a script like this: $("div").each(function() { $(this).hide(); }); I would like to press "step into" and not see the implementation of ".each()" etc... In C#, this is possible by using the [DebuggerStepThrough()] attribute on a class. But that doesn't help with JavaScript.

    Read the article

  • Is this the best way to query an element and its children?

    - by Soviut
    I'm trying to query an element and its children to find ID's that begin with a particular string. var foundIDs = containerElement.find('[id^=something]').andSelf().filter('id^=something'); The find() method only searches descendants so I thought I'd try andSelf(). However, andSelf() does not take a selector. This means that the container element is included regardless of whether it matches the find query or not and I then have to perform a secondary filter() on it to remove the container element if it didn't match after all. I attempted to put andSelf() before the find() but it didn't seem to pick up the container element into the stack. containerElement.andSelf().find('[id^=something]'); Is there any better way to achieve what I'm doing?

    Read the article

  • prototype to jquery, help please

    - by Patrique
    Hello, I would ask for any user who knows how to program in jquery and prototype of a help to me in the following code in this prototype. function showPanelAds(){ $('ads').style.visibility="visible" } and function blog(id){ var ActionAjax = new Ajax.Updater( {success:'blogphere'}, '/inc/assistidos.asp', { method:'get', parameters:'queryname='+id, onFailure:function(){ $('blogphere').innerHTML="error...<br/><a href=\"javascript:blog('"+id+"')\">Tente novamente</a>"; } }); } thank you from anyone who can help me. thank you.

    Read the article

  • Mvc4 webapi file download with jquery

    - by Ray
    I want to download file on client side from api apicontroller: public HttpResponseMessage PostOfficeSupplies() { string csv = string.Format ("D:\\Others\\Images/file.png"); HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK); result.Content = new StringContent(csv); result.Content.Headers.ContentType = new MediaTypeHeaderValue ("application/octet-stream"); result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment"); result.Content.Headers.ContentDisposition.FileName = "file.png"; return result; } 1.How can I popup a download with jquery(octet-stream) from api controller? my client side code: $(document).ready(function () { $.ajax( { url: 'api/MyAPI' , type: "post" , contentType: "application/octet-stream" , data: '' , success: function (retData) { $("body").append("<iframe src='" + retData + "' style='display: none;' ></iframe>"); } }); }); but it was not work!!!Thanks!!

    Read the article

  • Serializing to JSON in jQuery

    - by Herb Caudill
    I know how to serialize an object to JSON in ASP.NET Ajax, but I'm trying to do things on the client in a less Microsoft-specific way. I'm using jQuery. Is there a "standard" way to do this? My specific situation: I have an array defined something like this: var countries = new Array(); countries[0] = 'ga'; countries[1] = 'cd'; ... and I need to turn this into a string to pass to $.ajax() like this: $.ajax({ type: "POST", url: "Concessions.aspx/GetConcessions", data: "{'countries':['ga','cd']}", ... Edit (clarification) I realize there are a number of JSON libraries out there, but I'd like to avoid introducing a new dependency (if I'm going to do that, I might as well use ASP.NET Ajax's built-in JSON serializer).

    Read the article

< Previous Page | 237 238 239 240 241 242 243 244 245 246 247 248  | Next Page >