jquery

jQuery: find a last child that has specific class

If I have deep nested unordered list and I have a reference to the root node, is there a built in way to find a last child of "li" type that has specific css class? For example if I have a tree view branch 5 levels deep, and branch is expanded down to thrid level, levels 1,2,3 will have a class "collapsable". Now I want to find a last "l...

What security considerations / concerns should be addressed when using CDN hosted code?

Working on a major financial company's website, we tend to shy away from using the CDN-hosted versions of the jQuery library used throughout our site because of "security concerns". I'm assuming (although I've never had it fully explained) that these concerns relate to potential physical security threats through the risk of code being c...

Drupal CCK add another item callback

I'm trying to get the last field item to focus when doing a 'add another item' on a CCK multiple value field. Here's my code: $("#node-form table.content-multiple-table tr.draggable input[type='text']").live("keydown", function (e) { if (e.which == 13) { $(this).closest("table.content-multiple-table").siblings("div.content-add-m...

jQuery $.ajax() function's error message source

In the case of failure, the code goes something like: error: function(msg) where does the msg come from? EDIT: I am using this function ($ajax) to call a WEB SERVICE. So if whoever voted this down could explain to me where msg comes from that would be great! Do I set it in web service? If so, how? Please don't copy and paste the def...

How to have LiveValidation submit button validate fields on the current jquery accordion panel that is open?

I am using the LiveValidation script to validate elements. I have a jQuery accordion which has a few panels which some asp.net textboxes and buttons. Everything works fine except that if I open one panel that has a button and I click that button, it not only validates the elements for the panel that I am viewing, but if I open up anoth...

BlackBerry: [un]checking HTML checkboxes with JS not working

I am trying to check and uncheck an <input type="checkbox" /> by adding and removing the checked="checked" attribute using javascript (jQuery). It works great in Firefox & IE. Adding and removing disabled="disabled" works perfectly. But with checked, neither clearing nor adding the attribute does anything. I'm writing in XHTML 1.0 Stri...

My First Grid Doesn't Work

I've follow this instruccion http://www.trirand.com/jqgridwiki/doku.php?id=wiki:first_grid but my grid is not working. The DATA is only in my first page. And the navigation bar doesn't work and there is a message (UNDEFINED) in the grid.. PLEASE HELP ME I Did all the instruccion you can see a screenshot here: http://reyes.hostei.com/scr...

How do I get multiple links to open in the same container?

Example: click first link, view contents. Click second link and have contents replaced with second link? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html> <head> <title>bq13 ----trying Stackoverflow suggestions</title> <script type="text/javascript" src="http://trans...

Expand Div with jQuery

I like to do something terribly simple Had a div that show only a little bit of image click on div, expand to the image height reclick on it, contract to to original height Now, my test is not concluant ! so many problems !, is there a simpler method around ? link on some funny result ! mostly as this ...

jQuery worked yesterday. Not anymore...

Yeah, so I have NO CLUE what happened. I've been writing an AJAX comment script and I got it working, except it doesn't work anymore. I restored it from a backup just in case I chaged anything, but no luck. It goes to the "action" of the form instead of the jQuery, even though I have return false; This leads me to believe that one of the...

determine when contents of html tag changes

Is there a way to determine when the contents of a HTML tag has changed? I would prefer to catch an event rather than polling it. My use case is I have text enclosed in span tags within a rich text editor, and I need to remove the span tags when the enclosing text is modified by the user. ...

Using the jquery layout within an ASP.NET UpdatePanel

I have a ASP.NET site with nested Masterpages that utilize the .layout() function in jquery.layout.js. All of the pages display beautifully resizing dynamically, rendering a resizer bar, and vertically scrolling areas. i.e. all of the layout functionality is working. However I would like to eliminate the "flicker" I am getting on Pos...

jquery cycle: Goto Slide# using text link

http://procollage.com/site10 Please see this page I've been working on ALL DAY to just make the text: • Blended Collage #1 • Bordered Collage • Blended Collage #2 • Magic Mosaic • Blended Collage #3 I would simply like when each is click for the slideshow to show the corresponding slide. I thought it would be simple, but 6 hours later,...

What does the jQuery() function in jQuery do?

In this video there is a snippet of code that goes something like this: if (jQuery) {jQuery(function() { // ... })} I've never seen the jQuery() function before (then again, I'm not a savvy jQuery user), what does it do? Does it ship by default with jQuery or is it specific to IxEdit? Since the usual $(window).load() snippet is mi...

jQuery .load (or $.ajax) to get and set page title?

So far... $('#container').load(hash + ' #page','', function() { $('#container').fadeIn('fast'); document.title = $('#title').load(hash + ' #title').text(); }); ...doesn't work. Is there a better/correct way to do this? FYI: - I've added the ID #title the tag (all pages/it's a PHP template). The container is .fade(ed...

on fancybox 1.2.6 close

I am using fancybox 1.2.6 I want to avoid closing of fancybox when you click on the outside of the content.. But nothing is working.. can you help me with this.. and one more thing.. i am trying to trigger the fancybox close function when you submit a form..How can i do that ? ...

Jquery and Input File

How do you set the value of an input file using jquery? $('input[type="file"]').val(value) just doesn't seem to work. Any thoughts? ...

disabling modal popup in jqgrid

I want to create a custom message without using the modal popup in jqgrid. Is there a way to disable it? Or is there a way to change the contents of the modal? ...

ASP.NET MVC markup in VS2008 script has warnings with "expected expression"

I've searched SO and have been unable to find this question asked before, but I can't believe I'm the only one running into it. If this is a duplicate, please point me to the original question. In VS2008, I have some ASP.NET MVC markup in a script section on some of my pages. I end up getting "expected expression" warning squiggles on...

jQuery UI draggable - Custom data disappears

I'm having a weird problem with using jQuery UI Draggable and setting custom data. My code: $('.drag') .data('foo', 'bar') .draggable({ stop: function(event, ui) { var foo = $(this).data('foo'); alert(foo); // alerts 'undefined' } }); It seems it's losing all it's when dragging (con...