jquery

How to not display error element as label with jquery.validation plugin

Okay guys, I have read through all the other posts and question on jquery validation plugin and they don't seem to have what i'm looking to do. I would like to have the display error not show with message but just create a red border around the input field instead. Here is just some of the form: <form id="donate_form" name="checkoutF...

How should I design my page to allow for dynamic movement of elements on the page?

I'm working on an ASP.NET page where I've got 10 entities. I'll call them Items. An Item can be displayed in one of two modes: Featured or Thumbnail. At any given time there is one Featured Item at the top of the page, and the rest are Thumbnails arranged in a 3x3 grid underneath the featured Item Each item is an ASP usercontrol tha...

Using multiple hyperlinks as submit and input

Need the three "Options" to be hyperlinks that submit the "choice" form. When submitted, I would like the value to be the text of the option selected (i.e. value=Option1, Option2 orOption3) and all three to have the same name. (i.e. name = Options) I saw this and some other posts here, but did not work with my set up - many "hyperlink i...

Suppose I have a list of 500 thumbnails followed by the title. How do I load the images as the user scrolls down? (JQuery)

In mobile, the internet is slow. If I have a list of 500 images, this is going to take forever to load. I'd like to load the title of the image in a list, but as the user scrolls down, I want to start loading/downloading the <img> tag. How do I use Javascript/Jquery to do this? ...

How to wait for jQuery Ajax requests to complete from WatiN?

I'm writing WatiN tests to test an Ajax web application and have come across a timing issue with Ajax requests. After an Ajax request is triggered by an action on the page, I'd like WatiN to wait until the request is complete before validating that the page was updated correctly. I have a feeling that the solution will involve eval-in...

List of items is too long, how do we detect condition and resolve it?

We have a fixed size div in which we are displaying some news items. We display 6 news items, and then a link that follows, which links them to archives. When the news article titles are all one line in length, everything fits. When multiple news items have titles that are two lines in height, the group of items takes up more space th...

jQuery: detect pasting into a WYSIWYG editor

I'm using htmlarea for my little CMS, and I was wondering if it's possible to detect if something gets pasted into it with jQuery? ...

Making a table row (tr) clickable with jQuery (with an a href link, and hover!?)

Just a (hopefully) quick question, I have the following HTML code: <tr> <td><img src="img/icons/file_pdf.png"></td> <td><a href="../upload/1267473577.pdf">Bulletin 1st March 2010</a></td> <td>(01/03/10)</td> </tr> Ideally I'd like a way to grab the a href link using jQuery and make it so that no matter where you click on that parti...

IE e.keyCode - How can I differentiate between ampersand and up-arrow?

I am fighting with a very strange javascript behavior on a jQuery UI widget I'm trying to fix. IE7 (win XP), jQuery 1.2.6 (yes, it's an old version). The widget is a combo-box, which captures keyboard events and has special behaviors for the arrow keys. When I try to type the "&" character into the flexbox input field, I get strange be...

jQuery: do I need to put calls to $("img").lazyload() in $(document).ready()?

I am using lazy load jquery plugin. It tells me to put this in my code to activate it: $("img").lazyload(); Do I have to put this in $(document).ready()? or can I just put it at the very top of the page: <head> <script type="text/javascript"> $("img").lazyload(); $(document).ready...{} </script> </head> ...

Language/libraries for downloading & parsing web pages?

What language and libraries are suitable for a script to parse and download small numbers of web resources? For example, some websites publish pseudo-podcasts, but not as proper RSS feeds; they just publish an MP3 file regularly with a web page containing the playlist. I want to write a script to run regularly and parse the relevant pag...

jQuery: create regex pattern from variable

hi all, i'm trying to create a regex pattern out of a variable like: var tag = "style"; var pattern = "/<"+tag+"[^>]*>((\\n|.)*)<\\/"+tag+">/gi"; but it won't work - anyone can tell me what's wrong? thx ...

Is there a way to make jQuery output *actual markup*?

When using jQuery to dynamically build markup, it sometimes becomes useful to have it return the actual HTML that it's generating as a string, rather than as a bunch of jQuery objects. Is there a way to do this? For example, here: $("<strong></strong>").text("Hi there!"); I want to be able to extract the plain-text string "<strong>H...

Passing Data From Initial XML Request To Subsequent Pages

`I am working with an API that sends back an XML response upon request. Here's a simplified example: <buildings> <building attr1="foo" attr2="bar"> <uri>http://blah.com&lt;/uri&gt; <thumbnail>http://blah.com/foo-picture.jpg&lt;/thumbnail&gt; </building> <building attr1="poo" attr2="pee"> ... </building> </bu...

jQuery Slimbox is not requesting files correctly

I am using jQuery slimbox with it's API. Here is my JavaScript that gets image paths via JSON, and then launches the slimbox via it's API. $('#main-container').append('<span id="check-our-adverts">Check our Adverts</span>'); var advertImages = []; $.getJSON( config.basePath + 'get-adverts/', function(images) { advertIma...

How achieve multiple "loading images" for each cell of table's data while it is being asynchronously fetched from PHP script?

I would like to have a box. In the box a user enters a string and presses the OK button. This request is then sent to the PHP backend, which gives me back 20 rows of results. But, for each of those 20 rows, I'll also have a few columns, but this data will take much much longer to generate (~10 seconds each, not from MySQL, but separate ...

jQuery: selector question (images)

I'm having a HTML document which has images to local files like: <img src="file:///C:/... How can I select all images with file:// in the src tag? ...

How to have a jQuery UI tab load a URL/page directly?

I have a set of tabs where the href is the URL I would like to load when the tab is selected. Following the docs I added the following select option. $('#example').tabs({ select: function(event, ui) { var url = $.data(ui.tab, 'load.tabs'); if( url ) { location.href = url; return false; } return true; } }); in a <script> tag ...

Setting ASP.NET control property using jquery script

I'm trying to set new value for asp.net control property when I check a checkbox. In my case I have RegularExpressionValidator asp.net control and when I check the box I would have new value for the properties ErrorMessage and ValidationExpression. I tried this code but did not work with me. please help. here is my code: ...............

jQuery: remove certain elements from HTML document

I'd like to strip certain elements from my HTML document. It seems that removing some tags simply doesn't work. For example - strip all stylesheets: $("style",this._doc.body).remove(); I'd also like to remove comments or something like weird winword tags like: <!--[if gte mso 9]> How to do it? ...