jquery

IE: Jquery slidetoggle hides content when it must be shown

So i made this webpage with a photo gallery I have a which serves as the gallery caption. WHen clicked it should show the gallery (done with the slidetoggle from jquery) This works. EXCEPT (ofcourse) in IE (ONLY when the documents mode is in IE9) There are a few other problems with other IE versions but those are for later. So the we...

jqGrid prevent pager navigation?

We use a custom formatter to output html form text boxes. In the case that a user has entered in data and they hit the next/prev button, we want to tell them "you've edited data, hit ok to stay on this page and save your data". How can you do this? The 'onPaging' event fires when you use the pager but it doesn't seem to let you preve...

select all text in contenteditable div when it focus/click

Hi, I've got contenteditable div as below. <div style=" border:solid 1px #D31444" contenteditable="true">12 some text...</div> What I need is, when I click on the div, all the text will automatically get selected. Can you give me solution please? ...

ASP.NET MVC not submitting in Internet Explorer

$('#btn').submit(function () { $('#btn').attr("disabled", "disabled"); setTimeout('enableButton()', 500); return true; }); function enableButton() { $('#btn').removeAttr('disabled'); } How can I submit the form in Internet Explorer? ...

jQuery/CSS image issue. Opera only loading parts of the images for unkown reason.

Not that it's a surprise you encounter daily problems with Internet Explorer, but when you actually do it with a browser like Opera - it kind of throws you off the chair. I got most things working with Firefox, Chrome and IE (apart from the fact that fancybox isn't validating all the IE-fixes as green, but that's an issue for another ti...

How do I grab several elements and wrap them in a div using jquery?

Hello, I am familiar with wrap() and innerWrap(), which grabs every div and individually wraps each instance of the div in a wrap() parameters. IE: <div class="wrap me"></div> <div class="wrap me"></div> <div class="wrap me"></div> Becomes <div class="wrapped"><div class="wrap me"></div></div> <div class="wrapped"><div class="wrap m...

How to remove default value of input on focus.

I have an input box that has default value text assigned to it. How can I remove this text when the user focuses on the field:: CoDE <input type="text" name="kp1_description" value="Enter Keypress Description"> ...

jQuery: Why would trigger not fire from a JS object?

I've been implementing a form of a publisher/subscriber design pattern in jQuery. I'm basically building classes in Javascript utilizing CoffeeScript that serve as components on my page. i.e. Navigation, DataList, etc. Instead of having DOM elements fire events, I have instances of these classes that use trigger on themselves to send cu...

How to call mouse over function on dyanamic divs.

i have dyanmic divs as rows <table border=1><tr><td> <div id='div1'>fgg</div> <div id='div2'>dfgdfg</div> <div id='div3'>vcbcvb</div> <div id='div4'>sdfsdf</div> </td></tr></table> How can i call jquery funtion on moueover of each div.? These divs are dyanmic, can vary the number . ...

Redirecting to AND posting data to an external page

I have a search page on my .NET 3.5 Web Forms site that redirects a user to an external site based on the user's search parameters. I would redirect to: http://www.site.com/search.aspx?searchterm=Hello. But now they are changing the site so that the search parameter is passed as a POST parameter, and not in the query string. So the page...

How to get the "absolute" position of an html element

Hi guys, I have some elements positioned via CSS this way: #myItem{ position: absolute; left: 50%; margin-left: -350px; } I'd like to get their distance from top and left margin of the page. How can I get those measure with javascript/jquery? Thanks ...

Synchronous GET request with Javascript/jQuery

I have a function that makes ajax GET request and based on the value returned sets one global JS variable. I use this variable (isCalculateTax in the code below) for further processing: var isCalculateTax; function setCalculateTaxValue(taxStatementId) { $.get('/taxstatements/calculatetax/' + taxStatementId, function (data) { isCalcu...

animate text-align with jquery

I'm new to jquery and have developed a simple resizing navigation menu using $(this).stop().animate({width:170},"slow"); for the on hover effect. My question is, how would i be able to add an animate effect to changing the text alignment. I understand that this changes it: $('.myElementClass').css('text-align','center'); but it l...

Tooltip in IE position problems

Hey Everyone, Here is some code I use for a tooltip that hovers above its element so it doesnt popup below and force the user to scroll to see it. It works fine in all browsers except IE. In IE it positions way below the element instead of above it. How can I fix the positioning error with IE? Im stumped. <style type="text/css"> .Too...

disable scroll bar in IE

Can I disable vertical scroll bar in IE. ...

Jquery add disabled attribute to input

I have an input box and I want it to be disabled at the same time as hidden to avoid problems when porting my form. So far I have the following code to hide my input: $(".shownextrow").click(function() { $(this).closest("tr").next().show().find('.longboxsmall').hide(); }); This is the input that gets hidden as a result: ...

Disable keydown during animation

Hi, I'm using the following code to enable the user to show or hide a photo description (#photoinfo) and a menu (.slidetable) using the up and down arrow keys. If one of these two divs is already open, pressing the opposite arrow closes that div before opening the other. $(document).unbind('keypress'); $(document).keydown(function(even...

Drag Jquery draggable out of it's parent jquery dialog

Hi, I have a jquery dialog that is filled with draggable objects. The droppable target is outside of the dialog. When I initiate a drag, the droppable responds correctly (visual indications that it is a droppable target) and after a drop the correct events trigger so I can correctly handle the drop. The problem is that the dragged ob...

Using JavaScript (jQuery), how can I cycle through all 'a' tags on a page, one at a time, and assign an individual style to each?

Let me try to explain... Lets say I have the following 'a' tags on a page: <a href="img1.jpg" class="myClass" alt="0,0,600,200"></a> <a href="img2.jpg" class="myClass" alt="200,0,600,75"></a> <a href="img3.jpg" class="myClass" alt="275,0,600,200"></a> <a href="img4.jpg" class="myClass" alt="475,0,600,50"></a> <a href="img5.jpg" class="m...

How to insert a break tag after ) with jquery?

The following is an output from an old CMS. I'd like to insert <br /> after (<A HREF="edit-8.asp">Rediger dine kundeopplysninger</A>) to become (<A HREF="edit-8.asp">Rediger dine kundeopplysninger</A>)<br /> with jquery. <div id="system"> <FORM ACTION="confirm-8.asp" METHOD="post" NAME="kassaForm"> <TABLE BOR...