jquery

Implementing placeholder="" for opera through jquery

I have implemented through jQuery the placeholder HTML 5 attribute for the browsers that don't support it (all except webkit at this time). It works really great but it has a small problem: it breaks the HTML 5 required="required" and pattern="pattern" attributes on Opera (it's the only browser that supports them currently). This is be...

FireWatir and jQuery

Hello there, after using this excellent peace of software called FireWatir, I wonder if there is a way to integrate jQuery-selector-magic to my test. My first attempt is to use firewatir's js_eval() method like this require 'rubygems' require 'firewatir' f = FireWatir::Firefox.new f.js_eval("alert(42);") The only thing I get is a ...

SimpleModal -- Open OnLoad

I'm new to JQuery -- not new to javascript. Was able to open the OSX STYLE DIALOG using the hyperlink button provided in the demo index.html page, but would like to open it on the page load. I read a couple links on StackOverflow (http://stackoverflow.com/questions/1611727/how-do-i-invoke-a-simplemodal-osx-dialog-on-page-load), but s...

jquery autocomplete input array

Hi there, I have the following code and what I am trying to do is set up an Autocomplete input box that when it is filled out, create another autocomplete input box underneath it. The problem with my code is that since I am using blur, it will create a new input every time I click off of the first one. The second problem is that I nee...

Tokenizing Autocomplete Text Entry -- how to set inital values

Hi guys, Beginner jquery question. I am using the Tokenizing Autocomplete Text Entry plugin, with the goal being to create a similar input as the SO Tags feild. I got it pretty much working, but the issue that I am having is that when I edit my Story model (/stories/1/edit) the tags field appears blank (I guess the plugin makes a bra...

Javascript/Jquery: using a variable in the css-property of animate

Hi! Why does this work: <something>.stop().animate( { 'top' : 10 }, 10 ); but this doesn't: var thetop = 'top'; <something>.stop().animate( { thetop : 10 }, 10 ); To make it even clearer: At the moment I'm not able to pass a css-property to the animate function as variable. Thank you! ...

jQuery chaining and ugly formating

I have a table with two cells to each row. The first contains the data and the second contains the input buttons "Edit" and "Delete". To make this unobtrusive ajax I'm using the code below: <tr> <td>I have some data for you</td> <td> <a href="edit" class="edit"><input type="button" value="Edit" /></a> <a href="de...

Internet explorer only executing function inside jQuery ajax success response once even though there are three requests

Hi, I have a function that uses jQuery.load() to call in 3 snippets of forms from different pages and then on the success text status it tries to load a colour picker: $(document).ready(function() { function ajax_form(putloadingboxhere, putsnippethere, snippeturl) { $(putsnippethere).load(snippeturl, function (responseTex...

Where can I find a jQuery syntax highlighting plugin for Notepad++?

jQuery has a syntax all its own*, and when writing ridiculously lengthy expressions I often yearn for some sort of highlighting. Is there a way to achieve this in Notepad++? *except for the bits that are shared with CSS and JavaScript... ...

Why can't I use jQuery to fire an AJAX request from an unload event handler?

I have the following code, intended to log the event when a user closes a chat window: $(window).unload( function() { test(); }); function test() { alert("Hi"); $.ajax({ type: "POST", url: baseUrl + 'Index/test', data: "user_id=" + "Nisanth" + "& chat_id=" + 2, success: function(msg){ alert(msg...

How to create a fading label in JQuery / ASP.NET after a button press.

I think that this should be pretty easy but I'm not quite sure how to wire things up. I have a page on which the user can define a query. When done, the user enters a name for the query and presses a button. I'd like to process the button click, make a text label (or Span) visible for a few seconds and then have it fade out. Since it...

jQuery: A widget or plug-in to create text balloons

I need to create some balloons that will contain text messages, similar to what you would see on a BBS or a blog comments area. I am not looking for a tool-tips widget - There will be several per page and they will always be displayed. My requirements: Drop shadows, if possible, using images instead of the box-shadow style for compat...

trying to using non-scoped jqueryui widgets within a jquery-ui scoped container

Hello I have a scoped jquery ui theme for my page styling. I want to use an unscoped ui component WITHIN this layout ( the user will be using the themeswitcher utility to customize the look of their 'custom component'. ) like this <div class="my-theme"> content and a bunch of widgets here <div class="unscoped-theme"> ...

clone(true) + remove() vs. detach() in jQuery

Is the usage of e = elem.clone(true); elem.remove(); Identical to e = elem.detach(); If later I append it with e.appendTO($("#someDiv")); In jQuery 1.4? Will the clone(true) method preserve everything using detach() does? ...

JQuery scroll to top of page

Is there a way to pro grammatically scroll to the top of a page with jQuery? I am currently trying to do this with the following code but it is not working. I am using Firefox right currently, $(window).scrollTop($(document).height()); ...

Jquery ajaxStart doesnt get triggered

This code $("#loading").ajaxStart(function() { alert("start"); $(this).show(); }); in my mark-up <div style="text-align:center;"><img id="loading" src="../images/common/loading.gif" alt="" /></div> Here is the full ajax request: $.ajax({ type: "POST", url: "http://localhost/WebServices/S...

jQuery single quote in JSON response

I'm making requests to my server using jQuery.post() and my server is returning JSON objects (like { "var": "value", ... }. However, if any of the values contains a single quote (properly escaped like \'), jQuery fails to parse an otherwise valid JSON string. Here's an example of what I mean (done in Chrome's Console): Is this normal?...

How to make GIF rotate when the tree is loading in Javascript

I have a tree that gets populated through the web service - this part is super fast, the part that's a bit slower is populating the tree...I have a gif rotating image that rotates while the service is loading. Since I use ajaxStop and ajaxStart trigger, the gif stops rotating after ajax request has completed, which is correct. However, b...

what's the jquery plugin that inserts text in a textbox, and it disappears upon focus?

what's the jquery plugin that inserts text in a textbox, and it disappears upon focus? ...

Issue with margins when markup is added with jQuery?

For some reason, if I add these buttons with jQuery (because of an Ajax insert function) they look strange to when they are loaded via PHP on the server? What is the reason for this behavior Here is the jQuery that inserts it: var actions = '<td><a href="#" class="small awesome black editButton" id="'+id+'">Edit</a><a href="/appoint...