jquery

Unpredictable mouseover behaviour in jQuery

I am using jQuery draggables/droppables bound to a live() mouseover event. I'm using live because I use load() to load a page, and need those elements accessible after the load. In Firefox and Safari, I'm getting a strange behavior where when I initially load the page, only some of the droppable areas work. But upon letting go of the dra...

After jQuery poll, do I have to destroy and re-init draggable and droppables?

when polling the server do i need to destroy the draggables and droppables before i re-instantiate the functionality? Basically every so often I run a function that updates a div and then i have the function run: $(".dragMe").draggable({helper: 'clone', opacity: 0.50, appendTo: 'body', zIndex:4, addClasses: false}); $(".drop").drop...

jQuery table sort function only sorting one-way

I'm working through a jQuery book and am currently on the chapter of table sorting. Using the example code in the book I've set up the following test scenario, when I click on a column heading it correctly sorts the data one way (ascending), but when I click on the same column heading again nothing happens (I'm expecting the data to be s...

Positioning DIV

Hey Guys, I'm looking to deconstruct some javascript I found for a lightbox plugin on a site. I was curious if someone could help to decode this piece of script? I would like to implement it into my jquery but need to discern what I can use what I cannot. Currently my issue is that my positioning jquery aligns my div to the vertical...

Javascript or jQuery: Download and redirect

Currently some guys programmed this in a HTML page: <script> location='http://example.com/downloadable.zip'; </script> They want to redirect the user to another page once the file has started downloading. I can only modify this page but not the destination page. What would be a good and clean javascript solution for making a user...

Jquery - Loading a page with .load and selector doesn't execute script?

I'm trying to load one page into another using the .load() method. This loaded page contains a script that I want to execute when it has finished loading. I've put together a barebones example to demonstrate: Index.html: <html> <head> <title>Jquery Test</title> <script type="text/javascript" src="script/jquery-1.3.2.min.js"></script>...

jQuery .live() "click" event being unbound when new matches are added to the DOM

Here's the problem I'm having. I have two jQuery .live() events, both for click events. These are initialized at the beginning of the page's load; they then wait until items matching the selector come along and are clicked on. Now, the problem with these is that when an item is added to the DOM that matches the selector, the live even...

jQuery UI: Nested sortable errors.

Hi All, Thanks for reading. Two issues: I am creating a task-list type of system, which will use nested sortable lists. Here's some very basic demo code: <script> $(function(){ $('.sortable_test > li').attr('style', 'border:1px solid red; padding:3px; margin:2px;'); $('.sortable_test').sortable({ distance: 5, ...

Jquery Ajax response Using ThickBox

So I have a ajax call to a service(using JQuery) that returns valid html: <table class='datagrid' style='width: 600px; text-align:left'> <tr><th>User</th><th>Full Name</th><th>Company</th><th>New Prints</th><th>Reprints</th></tr><tr> <td> <a class='thickbox' href='UserSessionReportPopup.aspx?user=1&start=9/2/2009&end=9/30/2009&TB_iframe...

How to block form submission when the enter key or return key is pressed?

I have a form that I use JQuery, I don't think I need to put code in this post, the question is pretty basic. But I would like to block the form from submitting when people press the Enter Key or the Return Key. At the same time, I have textareas, where the user will need to be able to press the Enter / Return keys. ...

Drop Down Box Keeps flickering - JQuery and CSS

I am having difficulty with something really basic. I am trying to implement a drop down box with JQuery and CSS. I can not figure out why my drop down box keeps flickering when I hover over the "Products" link. Here is a demo of what I am working on. http://174.132.101.73/~ree/header/ I would appreciate any help on this. Edit Well t...

need to add .css to a class

I need to add some css to a class. This is what I have so far: $(document).ready(function() { $('.tech').css({ "border-bottom": "dotted 1px #0860a8", "text-decoration": "none" }); $('.tech').Tooltip(onMouseEnter) }); Its not working. What can I do to show up for all class="tech" ...

appending a jquery object throws invalid arguement in IE

I am trying to create a jQuery plugin that will clone a form to an iframe then submit a form. It is a hack to fake an ajax file upload. I also know there are plugins like this already, but none that I have trie meet my needs. I have a problem appending a jQuery object to anything in IE. (I am running IE 7.0) I have tried FF and it wor...

jQuery select based on text

I need to select an element based on its text in jQuery. For instance: <span>this text</span> I know I can use .contains() to select based on text, but it's not exclusive. I don't want to select: <span>this text and that text</span> I want to select the element if it's the only text of the element. Aside from using regex, how do...

ASP.MVC Ajax response returns form with some JS not executing

ASP.NET MVC Page has one link (Ajax.ActionLink), which gets the form to create and puts it in one of the div. I see the form in div but none of the JavaScript returned is getting executed. I am using JQuery validation and needs to run the validate() on the form so that returned form from AJAX request is validated. Is there any setting ...

jquery cloning html problem, update DOM?

Hi, I need help of javascript / jquery experts to solve the next problem: ---- 1. this javascript alerts the id of a selected option in a select html tag: $(function(){ $("#id_productos_list").change( function(){ var op = $(this).selectedValues() alert(op); } ); }); ----2. this javascript clone html code: ...

How do you protect Web Services when using it as JSON via Jquery?

I currently use asmx for Json transactions using Jquery. How do I protect it from being accessed across other websites and make it exclusive only through my domain? ...

How to call jquery ajaxStart + ajaxComplete

Hey guys, I have a load function and would like for the code to write some html into a div while it loads, and when it completes, to display the page. I saw some little writeups on the ajaxStart and ajaxComplete events, however I am not sure how to implement them. Here is the jquery I am thinking of using, however not sure how to imp...

Multiple jQuery functions & Autocomplete

I found that using declaring jQuery Autocomplete as the first function in your script prevents other functions from being executed. The second and third functions below will not work: <script> $(function() { $("#ent_input").autocomplete('get_suggestions', {autoFill: true, scroll: false}); }); // Freebase Suggest $(fu...

Div positioning

Hey guys, I am giving the if else statements a stab, not sure if I am writing this correctly… Trying to get it so that if the popupHeight dimension is bigger than the windowHeight dimension, then it would position it to the top of the viewport + 10px… $("#data").load("/content/" + htmlName + ".html", null, function(){ //Set Variable...