Search Results

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

Page 235/935 | < Previous Page | 231 232 233 234 235 236 237 238 239 240 241 242  | Next Page >

  • Can jQuery's fadeIn work without AJAX?

    - by Thierry Lam
    I'm submitting a form, sometimes I have some messages that I want to show to the user. I want those messages to jQuery fadeIn after they click on the submit button. Is it possible to achieve that if the submission doesn't involve any AJAX? Here's a sample Django/Python code: # View code message = 'feedback to user' # Template <div id="messages">{{ message }}</div> The equivalent PHP code of the above might be: <?php $message = 'feedback to user'; ?> <div id="messages"><?= $message ?></div> I want #messages above to fade in after a POST. How can I achieve that?

    Read the article

  • Two methods with different signatures, jquery is not calling correct method

    - by Lee
    There are two methods GetUserAssignedSystems() and GetUserAssignedSystems(string Id) These methods act very differently from each other. The problem is, when I want to call GetUserAssignedSystems(string Id), the parameter-less method is called. Here are the methods: [WebMethod] [ScriptMethod] public IEnumerable GetUserAssignedSystems(string cacId) { return Data.UserManager.GetUserAssingedSystems(cacId); } [WebMethod] [ScriptMethod] public IEnumerable GetUserAssignedSystems() { //do something else } Here is the jquery making the call: CallMfttService("ServiceLayer/UserManager.asmx/GetUserAssignedSystems", "{'cacId':'" + $('#EditUserCacId').val() + "'}", function(result) { for (var userSystem in result.d) { $('input[UserSystemID=' + result.d[userSystem] + ']').attr('checked', 'true'); } }); Any ideas why this method is being ignored?

    Read the article

  • jquery, simplemodal with a tooltip?

    - by matthewsteiner
    I'm using http://dev.mariusilie.net/content/simple-tooltip-jquery-plugin for my tooltip and simple modal for a modal window. I've got a link in the modal window and when I put my mouse over it, the tooltip is there, but it's beneath the modal window. I think it has to do with "z-index". I looked and I think the modal window is at 1000. I've set the #simpleTooltip property in the css with various z-index values, with no luck. It always appears beneath the modal window. Any Ideas?

    Read the article

  • Alternative to jQuery .data()?

    - by thebossman
    I'm a big fan of jQuery's .data() method, but I can't always use it. Often times I am rendering html templates that I pass via AJAX and I need to attach metadata to each of the elements in the template. For example: <ul> {% for item in itemlist %} <li metadata="{{ item.metadata }}">{{ item.name }}</li> {% endfor %} </ul> I know attaching attributes to store data is bad practice (and it might not even work in older versions of IE). What is the best practice? Is there a good alternative to this method?

    Read the article

  • Using Jquery to check if a URL is valid

    - by user102533
    A long running background process creates a text file to indicate the completion of the process. From the frontend, I'd need to check every few seconds if the text file has been created or not. I am doing this check from However the file is created in http://DomainB.com/Mytext.txt Can someone help me write a jquery script that checks for a file across domain? PS: Currently, I am doing a ajax postback that executes a WebMethod in ASP.NET that creates HttpWebRequest. This works functionally, but I have major performance problems. So, I need a light weight way of finding if a URL is valid or not.

    Read the article

  • Display an ashx image using jQuery?

    - by Abe Miessler
    I've been trying to use the jQuery plugin Colorbox to display images I have in my DB through an ashx file. Unfortunately it just spits a bunch of gibberish at the top of the page and no image. Can this be done? Here is what I have so far: $(document).ready ( function () { $("a[rel='cbImg']").colorbox(); } ); ... <a rel="cbImg" href="HuntImage.ashx?id=15">Click to see image</a>

    Read the article

  • jquery adding in select list by textbox

    - by mazhar
    ok what i am trying to do is to add something in the textbox and after pressing the add button it should go into the select list. how would i do that with jquery? I am not really able to make it work by your method .Please help? What i am doing wrong <%= Html.ListBox("FeatureLists", ViewData["FeatureListListBox"] as MultiSelectList)% $("#add").click(function() { var val = $("#txtaddfeature").val(); alert("aaa"); $("", { 'value': val, text: val }).appendTo("#FeatureLists"); //$("#textbox").val(''); here if you want to clear the value for next time });

    Read the article

  • Stopping jQuery Jumping to Newly Loaded Content.

    - by Damien
    I have a div with is replaced upon certain user actions. These actions are performed under the div that is being replaced and in the case that the div is too large to fit completely into the view window, along with the buttons used to change it underneath, the browser will jump to the top of the newly loaded div. Which is annoying. Does anyone know of a way to stop these? Cheers. Here is the jQuery code. ChartContent is a small blob of html function UpdateChartImage(ChartContent) { //do updates on div here var existingChart = $("#" + $(ChartContent).attr("id")); existingChart.fadeOut("fast", function() { existingChart.replaceWith(ChartContent); }).fadeIn("fast"); } Incidentally I have prevented the button from doing it's default behaviour so I don't think it's related to that.

    Read the article

  • jquery mouseleave issue when moving too slow

    - by David
    Hello. I am using the jQuery mouseenter and mouseleave events to slide a div down and up. Everything works well except for the mouseleave which doesn't appear to fire ONLY if the mouse of moved off of the div quite slowly. If i move the mouse at a relatively normal or fast speed then it works as expected. Can anyone explain this or provide any info on how to get around this? Code: $(document).ready(function() { $('header').mouseenter(function() { $(this).stop().animate({'top' : '25px'}, 500, function() { $(this).delay(600).animate({'top' : '-50px'}, 500); }); }). mouseleave(function(e) { var position = $(this).position(); if (e.pageY > position.top + $(this).height()) { $(this).stop().delay(600).animate({'top' : '-75px'}, 500) ; } }); });

    Read the article

  • How to get a related element with Jquery?

    - by Jova
    <div class="severalDivs"> <table> <tbody> <tr> <td class="target"> <a href="link"></a> </td> <tr> </tbody> </table> <div class="fromHere"> <a href="somescript()"></a> </div> </div> How do I with Jquery get "link" in "target" when clicking the anchor with "somescript()" in "fromHere"? Hope It's clear what I want to do. =)

    Read the article

  • JQuery: Remove duplicate elements?

    - by Keith Donegan
    Say I have a list of links with duplicate values as below: <a href="#">Book</a> <a href="#">Magazine</a> <a href="#">Book</a> <a href="#">Book</a> <a href="#">DVD</a> <a href="#">DVD</a> <a href="#">DVD</a> <a href="#">Book</a> How would I, using JQuery, remove the dups and be left with the following for example: <a href="#">Book</a> <a href="#">Magazine</a> <a href="#">DVD</a> Basically I am looking for a way to remove any duplicate values found and show 1 of each link.

    Read the article

  • Delay the display of image loaded using jquery + ajax

    - by niczoom
    I am using the following code : $.ajax({ url: "pgiproxy.php", data: ({ data : $("#formdata").serialize(), mode : "graph"}), success: function(result){ var temp = $('<div/>').html(result); var val = temp.find('center').html(); $('#BFX').html(val); }, error: function(){ $("#error").html("ERROR !!!"); } }); The 'result' from the ajax call to 'pgiproxy.php' is a whole web page (returned as a string), this is then converted to a jQuery object and stored in 'var'. I then extract the data I need (a .gif image) using .find() which is stored in 'val'. This image is then inserted into a #BFX div for display. My problem is every successive time I click my button to update this image it shows the image loading from top to bottom as it is reading it in from the web. Is there a way to only display this image once it has fully loaded so the user doesnt see the image loading and only sees the image change instantly.

    Read the article

  • Pass Success variable to code

    - by João Dias
    How can I pass a variable that has been calculated in the success callback of an ajax function, to the document.ready ? I have this code function loadActions() { var countDiv; $.ajax({ type: "POST", cache: false, url:"modules/actions/actions.php", success : function (data) { $("#actions-container").html(data); $('.action-details').hide(); countDiv = $('.action-tab-odd').length + $('.action-tab-even').length ; } }); return countDiv; } $(document).ready(function(){ var count = loadActions(); }); But count is allways undefined. How can I get this to work? Thank you

    Read the article

  • JQuery+Java setting field value with val() + single quote

    - by Fabio K
    I have a problem setting the value of a textarea element with jquery's val(). Basically, I have a JSP file which receives a string parameter called 'text'. Java code: String text = (String) request.getParameter('text'); Now I want my textarea element to receive this text: Javascript code: $('#textarea_id').val('<%=text%>'); It works when my text doesnt contain quotes single quotes (and possibly other chars). For example, for text = test' this error happens: Uncaught SyntaxError: Unexpected token ILLEGAL $('#textarea_id').val('test''); I hope you guys understand. I need a way to encode this value... i tried using escape so the quote is replaced by %27, but after unescaping its replaced again and the error happens. Thanks!

    Read the article

  • Jquery – Append selected items in spans

    - by criley
    Hi. I'm trying to select all elements that have a class, get their ID's (if they have one), and append individual spans to the end of my document based on that information. This is as far as I've managed to get: var element = $(".foo"), element_id = element.attr("id"), span_id = "for-" + element + "-id-" + element_id, ; I am hoping to append a span for each element gathered. Here are some examples of the span format I wish to achieve: <span id="for-img-id-profile"></span> <span id="for-div-id-content"></span> If possible, I would also like to allow for elements without an ID to be formatted like so: <span id="for-h1"></span> I really appreciate the help as I'm very new to jQuery and am trying to learn.

    Read the article

  • using javascript with help of jquery

    - by tazim
    Code written by me based on previous suggestions as follows . Any help to efficinetly use jquery in order to make this code work . Thanks in advance $(document).ready(function() { self.setInterval("clock()",1000); $("button").click(function() { clock; }); function clock() { clock(); time=new Date(); var s = "<p>" + time + "</p>"; $(s).appendTo("div"); } }); <button > Click Me button </div> <div id="someid"></div>

    Read the article

  • jQuery sanitizing comments and linkifying URLs

    - by iWasRobbed
    In terms of jQuery (or Javascript), what happens behind the scenes when a person posts a comment on Facebook, Twitter, or a blog? For instance, do they sanitize the text first, and then pattern match URL's into an actual link? Are there other items of concern that the client-side should check in addition to doing some checks on the backend? I have found a few regex's for turning URL's into links, but I'm not sure if there are better solutions. I'm trying to wrap my head around the problem, but I'm having a difficult time knowing where to start. Any guidance you can provide is greatly appreciated!

    Read the article

  • Delete current row in a <table> with jQuery

    - by omgkurtnilsen
    I have a table that lists a bunch of customers. The last cell is an ajax delete button. I want the row containing the deleted customer to be deleted through jQuery. <table> <tr><td>Customer info 1</td><td><a href="javascript:deleteCustomer(1);">Delete</a></td> <tr><td>Customer info 2</td><td><a href="javascript:deleteCustomer(2);">Delete</a></td> function deleteCustomer(customerId) { $.post("somepage.php", {cid:customerId}, function(data){ //...delete the row that called the function... }

    Read the article

  • jQuery Week Calendar overlapping problem

    - by araid
    Hi, I'm developing an application with uses this calendar for resource reservation, but I have a problem when creating a new event. I don't want events to overlap, so I set allow allowCalEventOverlap to false. However, it still overlaps in a transparent way. But the biggest problem is that I can't drag an event if there's another on the same day, even if their start and end dates don't overlap. You can try this strange behavior in the 2nd demo: http://robmonie.github.com/jquery-week-calendar/weekcalendar_demo_2.html Any help on how to fix or understand it will be very appreciated. Regards,

    Read the article

  • refresh page with ajax jquery without use of reload function

    - by Ronak Patel
    I am performing delete records by using jquery ajax in php. I want to refresh that content without the use of location.reload() function. I tried this, $("#divSettings").html(this); but, it's not working. What's the correct logic to get updated content in div. Thanks. Code: function deletePoll(postId){ $.ajax({ type: "POST", url: "../internal_request/ir_display_polls.php", data: { postId: postId }, success: function(result) { location.reload(); //$("#divSettings").html(this); } }); }

    Read the article

  • simple jquery image change onclick failing

    - by ian
    I have a simple jQuery image switch that is failing. $('.heart_img').click(function() { var heart_type = $(this).attr('src'); //alert( heart_type ); if ( heart_type == 'images/unheart.png') { //alert('uheart'); $(this).attr('src','images/heart.png'); } else if ( heart_type == 'images/heart.png'); { $(this).attr('src','images/unheart.png'); } }); The alerts fire correctly when not commented out so and the images are in the correct place so I am not sure what the problem is.

    Read the article

  • Error: Get JSON Data from Web API Using Jquery

    - by Kenneth
    I'm really new at this. And I'm really stuck. I have the jquery code, it will load data from Web API, but it does not display on my page. $.getJSON("/api/Order", function(data) { if (data != null) { var str = ''; $.each(data, function (item) { str = '<li>' + item.ItemName + '</li>'; }); $("#contents").append(str); } }); Can anyone explain what is going on? Thanks.

    Read the article

  • return from jquery ajax call

    - by michael
    hi im tryin to use the return from a jquery ajax call in my own function, but it keeps returning undefined. function checkUser2(asdf) { $.ajax({ type: "POST", async: false, url: "check_user.php", data: { name: asdf }, success: function(data){ return data; //alert(data); } }); } $("#check").click(function(){ alert(checkUser2("muma")); }); the ajax call definately works, because when i uncomment my alert i get the correct return, and i can see it in firebug. Am i doing something stupid.

    Read the article

  • [jquery] editableText plugin enabling problem

    - by noName
    Hi, I've been experimenting with this plugin http://valums.com/edit-in-place/, so far so good... But i ran into this problem. I want to update my page when update or new request to save data is sent but if i update this function(edit-in-place) it will add second set of buttons, third, fourth and so on. How could i tell it that it would update just on that returned data, but not all elements? I have an idea it has to do something with each function of jquerys, but I'm not sure as I'm quite new to jquery. Thanks for any help!

    Read the article

  • Toggled() text input field not working in IE6 in Jquery 1.3.2

    - by Michal
    In IE6 after showing() or toggling() an initially hidden text input field it is impossible to enter any text in the box. It is also impossible to focus() on the element. I am using jquery 1.3.2 Here is the code... Any ideas? $(document).ready(function(){ $(".hide").click(function(){ $(".form").toggle(); }) }) and HTML <form> <div class="hide"> Show </div> <div class="form" style="display:none"> <input type="text" name="crap"> </div> </form>

    Read the article

< Previous Page | 231 232 233 234 235 236 237 238 239 240 241 242  | Next Page >