Search Results

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

Page 154/935 | < Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >

  • jKey (JavaScript key shortcut plugin) Issue

    - by Oscar Godson
    Me and a friend are writing a plugin for jQuery that makes it easy for devs to add key shortcuts and we're damn close but no cigar. We're having issues with the key combos. It seems like we are having issues when you call the same selector multiple times on a page. Try pressing alt+a... youll see it works one time, then gets all mangled up. Anyone know how to fix it? It'll be on github after it's corrected and I'd be happy to add "thank you to" link to whoever can fix this in the header with the copyright info :) It's nicely documented and i have all the code and stuff here. So... anyone? http://jsbin.com/azaha4

    Read the article

  • Count Upwards for ID jQuery

    - by Tom
    Hi Guys, I have the following HTML structure <div id="test-1-yay"></div> ... bunch of code ... <div id="test-2-yay"></div> ... bunch of code ... <div id="test-3-yay"></div> I was wondering how I can use jQuery to basically identify each of these "id's" and then apply some jQuery to them ? I'm new to this so little unsure ? Something like if $('#test-1-yay' || '#test-2-yay' || '#test-3-yay') { do stuff to all ID's } But the prob is I want this to continue as it could go to #test-201-yay, #test-202-yay etc ? Thx

    Read the article

  • jQuery - Ajax post result in html displaying in wrong position

    - by Sev
    I have a site with user posted threads that get voted on (up or down), and a vote count is displayed next to each thread. The voting up and down process is being done through jQuery/Ajax, and using something like this: $.ajax({ url: 'vote.php', success: function(data) { $('.result').html(data); } }); the html of the vote count is being updated (.result being the class of the div that holds the vote count number) Also, the threads are being sorted first by vote count descending, and then alphabetically. I'm having a problem with the ajax updating the HTML vote count in real time, i have a hunch that the issue is due to the fact that the order of the threads are changing when the vote count is being updated, but I'm not certain. I know the database is being updated, and when I refresh the page, it's also being updated correctly, but I'm not seeing the real-time behavior that I expect from jQuery/Ajax. What might be the problem?

    Read the article

  • Using jQuery to gather all text nodes from a wrapped set, separated by spaces

    - by Bungle
    I'm looking for a way to gather all of the text in a jQuery wrapped set, but I need to create spaces between sibling nodes that have no text nodes between them. For example, consider this HTML: <div> <ul> <li>List item #1.</li><li>List item #2.</li><li>List item #3.</li> </ul> </div> If I simply use jQuery's text() method to gather the text content of the <div>, like such: var $div = $('div'), text = $div.text().trim(); alert(text); that produces the following text: List item #1.List item #2.List item #3. because there is no whitespace between each <li> element. What I'm actually looking for is this (note the single space between each sentence): List item #1. List item #3. List item #3. This suggest to me that I need to traverse the DOM nodes in the wrapped set, appending the text for each to a string, followed by a space. I tried the following code: var $div = $('div'), text = ''; $div.find('*').each(function() { text += $(this).text().trim() + ' '; }); alert(text); but this produced the following text: This is list item #1.This is list item #2.This is list item #3. This is list item #1. This is list item #2. This is list item #3. I assume this is because I'm iterating through every descendant of <div> and appending the text, so I'm getting the text nodes within both <ul> and each of its <li> children, leading to duplicated text. I think I could probably find/write a plain JavaScript function to recursively walk the DOM of the wrapped set, gathering and appending text nodes - but is there a simpler way to do this using jQuery? Cross-browser consistency is very important. Thanks for any help!

    Read the article

  • ASP.Net Treeview - Client side event handling (jQuery??)

    - by The Great Gonzo
    I have a Treeview (bog standard ASP.Net Treeview) that is bound to an Xml source which allows the user to navigate to various parts of our system. Nothing special.... However, I wanted to generate a breadcrumb for use in the main content area on the client side when the user clicks a node in the Treeview control. I know there are mechanisms available for breadcrumb generation (such as site maps) but for various reasons I need to do it when a node is clicked. So far hooking up a click event using the document ready function available as part of jQuery is easy. However, having spent sometime looking I can not see how I navigate back up the tree nodes to get to each parent nodes text value to build the breadcrumb. I have been playing with .parent(), .parents() and .closest() available via jQuery but don't seem to be getting anywhere. Has anyone done anything like this or can anyone provide a better method? Thanks in advance....

    Read the article

  • jquery function call with parameters

    - by Kaushik Gopal
    Hi a newb question: I have a table with a bunch of buttons like so: <tr class="hr-table-cell" > <td>REcord 1</td> <td> <INPUT type="button" value="Approve" onclick="" /> <INPUT type="button" value="Reject" onclick="" /> <INPUT type="button" value="Delete" onclick="fnDeletePpAppl(222445,704);" /> </td> </tr> <tr class="hr-table-cell" > <td>REcord 1</td> <td align="center" class="hr-table-bottom-blue-border" valign="middle"> <INPUT type="button" value="Approve" onclick="" /> <INPUT type="button" value="Reject" onclick="" /> <INPUT type="button" value="Delete" onclick="fnDeletePpAppl(237760,776);" /> </td> </tr> I have my jquery like so: <script type="text/javascript"> // JQUERY stuff $(document).ready(function(){ function fnDeletePpAppl(empno, applno) { alert('Entering here'); $("form").get(0).empno.value = empno; $("form").get(0).applNo.value = applno; $("form").get(0).listPageAction.value = "delete"; $("form").get(0).action.value = "pprelreqlist.do"; $("form").get(0).submit(); } }); This doesn't seem to work.I thought this means, the function is ready only after the dom is ready. After the dom is ready and i click the button, why is not recognizing the function declaration within the .ready() function? However if i use the function directly: <script type="text/javascript"> function fnDeletePpAppl(empno, applno) { alert('Entering here'); $("form").get(0).empno.value = empno; $("form").get(0).applNo.value = applno; $("form").get(0).listPageAction.value = "delete"; $("form").get(0).action.value = "pprelreqlist.do"; $("form").get(0).submit(); } This works. I want to get my fundamentals straight here... If i do the declaration without the .ready() , does that mean i'm using plain vanilla jscript? If i were to do this with the document.ready - the usual jquery declaration way, what would i have to change to make it work? I understand there are much better ways to do this like binding with buttons etc, but I want to know why this particular way doesn't seem to be working. Thanks. Cheers. K

    Read the article

  • jquery live() method on custom functions

    - by user271619
    I have a custom event handler, or I suppose some call it a custom jquery function. My problem is I'm trying to apply the live() method to it. But I'm not too successful. Here's a simple custom jquery function: $.fn.myFunction = function() { return $(this).addClass('changed'); } And here I use it: $('.changePlease').myFunction(); Ok, simple enough. But how do I apply the live() method to it?? I actually have no idea if that's even possible. But I do use live() for other things, like: $(".changePlease").live("click",function(){ alert("hello"); }); Any thoughts on this?

    Read the article

  • jQuery reports incorrect element height in Firefox iframe

    - by Augustus
    Here a short test to demonstrate my problem. I have a page that loads an iframe: <html> <head> <title></title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script> </head> <body> <iframe id="iframe" src="box.html" style="width: 100px; height: 100px"></iframe> <script> $('#iframe').bind('load', function () { var div = $(this).contents().find('div'); alert(div.height()); alert(div.innerHeight()); alert(div.outerHeight()); alert(div.outerHeight(true)); }); </script> </body> </html> The iframe (box.html) contains a single styled div: <html> <head> <title></title> <style> div { height: 50px; width: 50px; margin: 5px; padding: 5px; border: 2px solid #00f; background-color: #f00; } </style> </head> <body> <div></div> </body> </html> The four alerts should return 50, 60, 64 and 74, respectively. This works as expected in Safari and Chrome. In FF 3.5.1, they all return 64. This is wrong. Does anyone know how I can force FF/jQuery to return the correct values?

    Read the article

  • Self Executing jQuery Plugin?

    - by GnrlBzik
    I am working on expansion of my jQuery plug-in authoring knowledge, just playing around with my own ideas for learning benefits. So i was wondering how you guys tackle the need of plugin executing without any user specific input. So I have a need for plug-in that executes right away after document is ready, without any user's specific input just as long as doc is loaded, so the only way I see how to execute plug-in on it's own is to attach handler to ready listener that executes my function which I extended the jQuery with. And because this needs to be self enclosed, part of the code, I attach handler to event listener within the function. So how else could one tackle this? Any take at this is appreciated. Thank you in advance everyone.

    Read the article

  • Cached Jquery selector behavior that I do not understand

    - by gaoshan88
    Given the following code why am I getting different values for a and b? I would have thought they would return the same thing: (function() { var a = $('#foo'); var Test = function(){ console.log(a); //outputs 'jQuery()' var b = $('#foo'); console.log(b); //outputs 'jQuery(select#foo)' which is what I want }; })(); This question stems from me trying to stick frequently used selectors into vars. Originally I was doing it in each method (like I did with var b in the above example) but then I found I needed to use the selectors in multiple methods so I moved the assignment out to be available (or so I thought) to all of the methods in that anonymous function. As you can see, it does not work. Why is this?

    Read the article

  • [jquery] return the inserted element

    - by Quamis
    Hello, i'm pretty new to jquery. I'm trying to insert an element to the DOM, and get that element back in my script. Ex: var elem = $("body").append(""); $(elem).show(); but it seems that .append returns the whole jQuery object.. am i supposed to use an ID for the inserted element and always reference it by it?? i really hope that there is a smarter move here. I'm used to do it like that from Prototype..

    Read the article

  • jquery select problem

    - by codedude
    Say I have an unordered list like so: <ul> <li>Some Text</li> <li>Some Text</li> <li>Some Text</li> <li>Some Text</li> </ul> I want to use jquery so that when I click a "li", the background changes to blue. So I do this: $('li').click(function() { $(this).addClass('active'); }); And the "active" class has as background of blue. However, I can't figure out how to make it so that when I click another "li", the other "li" that has a background of blue stops having a background of blue. I guess what I'm trying to say is how to make only one "li" have a background of blue at a time--using jquery.

    Read the article

  • jQuery noob: transfer not transferring..

    - by Kyle Sevenoaks
    I made an example, I copied it straight from the jQuery website yet, it doesn't transfer.. HTML: <div class="addToCart"> BLAHHHH </div> <br> <br> <br> <br> <div class="handelv"> MORE BLAAAHH </div>? jQuery: $(document).ready(function() { $(".addToCart").click(function () { var i = 1 - $(".addToCart").index(this); $(this).effect("transfer", { to: $(".handelv").eq(i) }, 1000); }); });? What have I gotten wrong?

    Read the article

  • webservice doesn't get called by jQuery

    - by aspdotnetuser
    Hi, I want to call a webservice using jQuery.ajax() but the webervice doesn't get called. - If I change the url: to reference a .ashz file it gets called but not .asmx? Here's the code I'm using: jQuery.ajax({ type: "POST", url: "/services/CheckUsername.asmx/CheckUsername", // this doesn't get called //url: "/services/CheckUsername.ashx/ProcessRequest", this gets called data: '{ "context": "' + "username" + '"}', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (msg) { alert("Result: " + msg); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert("Error: " + textStatus) } The .ashz file gets called but a parsererror is retuned because it's returning http context - how can I modify this to get a string return type from a webservice? Thanks,

    Read the article

  • using jquery to parse XML export in drupal

    - by gables20
    I need to use jquery to parse a drupal xml export that was created with views datasource module. The format of the xml export is shown below and on the browser, its access by entering, say for example, http://mydomain/test.xml, where test.xml represents the path of the xml export. <node> <node> <nothing> Lorem ipsum </nothing> </node> <node> The jquery to parse xml is shown below. But, it does nothing, which is kind of the main problem. $(document).ready(function(){ $.ajax({ type: "GET", url: "http://mydomain/test.xml", dataType: "xml", success: function(xml){ $(xml).find('node').each(function(){ var title = $(this).find('nothing').text(); $('#output').append($(this).find('nothing').text()); }); } }); });

    Read the article

  • jQuery code works in Firebug, but not on its own

    - by Ben
    I'm having quite the brainbuster of an issue right now. I am trying to change a link's hash tag at the end from "respond" to "comments" with jQuery. I have a simple script that should do this, however it does not work. The link does not change. However, Firebug shows no errors and when I run the code in Firebug's console, it works just as I intend. Why doesn't this work on its own? Does anybody have a solution, I'm at my wits edge with this one. (function ($) { $(document).ready(function() { $("a[href$='respond']").each(function() { $(this).attr("href", $(this).attr('href').replace("respond", "comments")); }); }); })(jQuery.noConflict()); Thanks so much, I know this might be a pain to test but I'm really thankful.

    Read the article

  • jQuery hovering a div

    - by cxn
    I'm fairly new to jQuery and I really can't get my head around this one. I'm trying to select <a href="contact"><div id="res">Reserveren</div></a>. This is my jQuery code: $(document).ready(function() { $('#res').hover( function () { $(this).animate({backgroundColor: "#fff" }); }, function () { $(this).animate({backgroundColor: "#000" }); } }); However, nothing is working. It doesn't change anything at all... What am I doing wrong? Thanks in advance, Bart

    Read the article

  • Simple modal div in jQuery?

    - by jasondavis
    I have tried almost all of the jQuery Modal plkugins I can find on the net but they are all much to bulky for what I need. I dont need all the fancy features, I want to be able to open a div and have the background of the page go transparent grey like the photo below and have my div be on top of it, that is all I need to do so I would like to write some jquery to do this instead of using a bulky plugin. Does anyone have any small code that can do this task? Is the transparent background an image or just css?

    Read the article

  • How can I track down these Firefox warning messages?

    - by Charles Anderson
    Since I upgraded to jQuery 1.4.4 I've been getting several new warning messages when I run my unit tests in Firefox 3.6.13. Here's a typical one: Warning: Unexpected token in attribute selector: '!'. Source File: http://localhost/unitTests/devunitTests.html Line: 0 Or the even more useful: Warning: Selector expected. Source File: http://localhost/unitTests/ui/editors/iframe2.html?test=15 Line: 0 The web page renders nicely, and all my JavaScript code seems to be running okay too, so I'm reluctant to spend a potentially large amount of time chopping away at my code to track these messages down. However, can anyone suggest what's provoking the warnings?

    Read the article

  • jQuery textbox required validation based on another text box having text

    - by doug
    Pretty basic question, however, I am very new to jQuery and javascript in general. I have a jQuery validation that is requiring a text box to have text in it, if a checkbox is checked. <script type="text/javascript"> $(document).ready(function () { $("form").validate( { rules: { Comments: { required: "#IsAbnormal:checked" } }, messages: { Comments: { required: "Comments are required" } }, onkeyup: false, wrapper: "", errorLabelContainer: "#ErrorMessageBox" }); }); Pretty straight forward, if you check the IsAbnormal checkbox, it will throw a validation if there are no comments. What I am trying to do is require a textbox based on if another text box has any text in it, for instance require the old password if a user enters a new password into a textbox. Is there an easy way to get the required: "#NewPassword:NotBlank" to work?

    Read the article

  • [JQuery] Highlight a Radio field and then pop up an input text box field

    - by kwokwai
    Hi all, I am trying to make some dynamic effect to a HTML page using JQuery. 1. When the user clicks a Radio feild, the field will be highlighted. 2. When the user clicks the Radio 'Man', a Input text box will be provided immeditely just below it. Here is my simple HTML page, but I don't know how to do with the JQuery part: <Table> <TR> <TD>Gender</TD> <TD> Man: <INPUT type=radio name="gender" value="M"><Br/> Woman: <INPUT type=radio name="gender" value="F"> </TD> </TR> <?Table>

    Read the article

< Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >