jquery

JQuery mouse over question.

I was wondering how can I delete the mouse over append when my mouse pointer is not over the element? Here is the Jquery script. $('.one').mouseover(function() { $('#log').append('<div>Handler for .mouseover() called.</div>'); }); ...

IIS Virtual directory causes JQuery errors in Fancybox

Fancybox works perfectly on my example.html, but when I make a virtual directory in IIS with the default page as example.html, I get jquery syntax errors returned in line 1 of all js files. 'little help anyone? Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; ...

How to avoid validation loop?

Hi, I have a form that has two checkboxes, "A" and "B" and the form that is broken into steps. If "A" is checked and "B" isn't I need to display an alert when user clicks on the next step button, stopping the form from progressing only once,. like if ($("#A").is(":checked") && $("B").is(":not("checked")") { alert("foo"); }); how do...

how to disable image selection using jQuery?

Hello guys when we drag over an image, the image become selected. how can i disable this selection using jquery or javascript? I am trying to create a custom image crop script. i tried e.preventDefault() but it is not working in IE6, please help Thank you ...

js validate 2 scripts together

I have 2 separate jquery scripts on one page to submit topics to the database. One script is for sending the topic title and the category it belongs to. The second script is for uploading an image. I managed to send data from both via 1 button but validation isn't mutual. For example, if I fill in all the text inputs but don't upload ...

How to create a dynamic form using jQuery?

I've seen a lot of help for dynamically adding rows or fields, but I'm interested in controlling fields that are dependent on one another. For example, I have a form with 3 user inputs: <select id="foo"> <option value="0">No</option> <option value="1">Yes</option> </select> When #foo's value is set to 1, I'd like to enable #bar. ...

how to make fancy scroll

how to make fancy scroll? something like this image. ...

Is it possible to surround all my javascript file with one try catch?

I wrote a bookmarklet, when the user will click on it in his browser it will do some actions on the current website and show some results in a popup. In some websites my bookmarklet fails to load because problems may exist in the current website. My bookmarklet code is using the jquery library. In some cases the errors happens in ...

Keeps prepending several images

I'm working on SharePoint with jQuery and each time I use the prepend() function in combination with the each() function in order to display a image before each cell in a list, I get several of those images. More specifically, the amount of those images matchs the amount of items in the list. I bet that's a clue to what's going on, but ...

Mouse hover using jquery

Hi My code in content editor web part is something like below But I am getting description for all hyperlinks even if i mouse over on first item. Please let me know how to change the code in such a way so that it only displays the discription of the item iam hovering on. Please let me know if i am not clear. My code from XSL: Thanks,...

Jquery - $(this) undefined in .get

Here is the block of code: $('.replaceWithObject').live('click', function(event) { var cid = $(this).find('input').val(); $.get('GetVideoComment.ashx?cid=' + cid, function(data) { $(this).html(data); }); }); It finds the cid just fine, as $(this) is available prior to the $.get. Inside the .get $(this) is undefine...

PHP: Image upload, thumbnails, specific crops

I've created a script which implements jCrop to crop an image before displaying it. In the CMS the client needs to be able to upload logos, which fit a specific size as determined by our designer. So I think I'm looking for something which can crop, resize and save out the original, a specific sized version and potentially other thumbna...

jquery fadeIn not working

Can someone please tell me what I'm doing wrong: style: .warning{border: 1px solid #F0AAAA; background:#FFBABA; color: #C90000;} markup: <p class="warning">A successful authorization already exists. Further authorizations are not allowed at this time.</p> script: $().ready(function () { alert($(".warni...

How to retrieve JSON via ASP.Net context.Request

var OrderInfo = { "ProductID": "ProductIDValue", "ProductName": "ProductName", "Quantity": 1, "Amount": 9999, "SLQuantity": 9999, "SLDate": "08/03/2010" }; var DTO = { 'OrderInfo': OrderInfo...

Is jQuery method chaining an example of fluent programming?

I'm somewhat new to JavaScript/jQuery, but when I saw examples of method chaining it struck me as instantly familiar. Other interfaces like LINQ do something similar where the return type of a set of methods is the same as the type they operate on (TweetSharp does something very similar). Is this an example of fluent programming? Much...

Struts2 JQuery how to do onchange ajax

Hi all, Let's say I have sj:autocompleter like this : <sj:autocompleter id="idDistributor" name="idDistributor" list="%{idDistributorList}" label="ID Distributor" indicator="indicator" /> when the value is changed, I'd like to pass the detail value to other text field like this : <sj:textfield label="Nama Distributor" id="namaDi...

How to make autocomplete posting data to the server with first char only and filter the returned result with jquery

All what I need to make any auto complete jquery plug-in to take the first char in the textbox and return all matched names for example from the server, then after writing the rest of chars I can filter the returned result by jquery not all the time posting the chars to the server and return the result. I am using a plug-in that like th...

jQuery: How do I wrap() a dynamically loaded element?

I am skinning a 3rd party app that has no HTML natively. It all comes back from an onLoad event and a bunch of ajax calls. I added jQuery to the page. I need to wrap() an element that is dynamically loaded. I can include a plugin if needed. How do I do this? Thanks. UPDATE: This works, but is there a better way? $(document).ready(...

Jquery: Possible to dynamically change source of Autocomplete widget?

Greetings, I am using the official Autocomplete jquery widget and am having troubles dynamically changing a variable (selectType) I'm passing via the query string. The variable would change depending upon which option is selected via a select box. $(function() { var selectType = $('#selectType option:selected').attr("value"); $(...

:visible selector not working in Internet Explorer

I'm working on some basic form validation styles for an ASP.Net website. I need to select all span elements that are visible, and add a css style to another element. (Just to indicate which input fields are invalid.) The below code works like a charm in FF and Safari, but fails in IE. I've narrowed the problem down to the :visible selec...