jquery

How to get an HTML element from a string with jQuery

I'm looking for a way to get an HTML element from a string that contains HTML. Is it possible to use the jQuery selector to do this? Basically I have an javascript functions that get an entire page from the server but I only need one element from that page. Thanks in advance ...

How can I intercept/get notified about asynchronous requests in ASP.NET?

Hi, I need to get notified about asynchronous requests in ASP.NET. I used the jQuery .ajaxSend global event but it does not trigger when using UpdatePanels. Any dieas? ...

Jquery select containers with same id's - IE 7 issue

Hello, "I have html that has 2 divs with the same id's in jquery i have it select the containers using $('#idname') in IE8/firefox/chrome it changes the html on both divs with that same id, but in ie 7 and below it only changes 1, how can i make this compatible with ie7 to select all divs with id? I would use classes but i already have ...

jquery ui autocomplete - manipulating results

Hi, I'm returning multiple pieces of data for each result. In each result I have different link's that I am passing that I'd like to make selectable. Right now no matter where someone clicks on a result it just puts the title into the text box rather than processing the link. $(function() { function log(message) { $("<div/>").text(mess...

I'm having a problem removing an element with jQuery.

I'm trying to remove this element on success function, but it's not doing it!! jQuery file: $(function () { //More Button $('.more').live("click", function () { var ID = $(this).attr("id"); if (ID) { $("#more" + ID).html('<img src="moreajax.gif" />'); $.ajax({ ...

Variable Scope: this.remove is not a function

this.remove() is not a function. How come? var vehicle = function () { return { init: function () { jQuery('.vehicle-year-profile .options .delete').bind('click', function (e) { e.preventDefault(); this.remove(); }); }, remove: function () { ...

MVC JSON actions returning bool

I had my ASP.NET MVC actions written like this: // // GET: /TaxStatements/CalculateTax/{prettyId} public ActionResult CalculateTax(int prettyId) { if (prettyId == 0) return Json(true, JsonRequestBehavior.AllowGet); TaxStatement selected = _repository.Load(prettyId); return Json(select...

Dynamic Image Resizing

I have an image on a webpage that needs to be stretched to fit the available space in the window whilst maintaining its proportion. Here's what I've got: http://www.lammypictures.com/test/ I would like the large image to proportionally stretch to match the height and widths of the browser, minus the size of the divs to the left and bot...

JQTouch glitch on the iPad

I have a simple JavaScript function which replaces an image's source. document.getElementById("star1_"+i).src ="full_star.png"; i being an id attached to the name to differentiate different stars. It works fine in Safari, but once I add the site to home screen, this action stops working and the image source does not get replaced. Is t...

access post vars JS or PHP?

hi, I am using jquery to post vars to a php script. Is it possible to access these vars once the script has posted? If I post the data to the php script, is the only way to access it in the html/js that i posted it from, to send it back from the php script as json? I cant seem to do it in JS, but even php will not work?, Sorry correct...

Navigation Bar sub menu Issues in Opera and IE

Hi! I created a navigation bar uisng simple HTML&CSS only. The navbar is located here: http://www.disenyoexport.com/de-nav-bar/nav-bar.html It looks good in Firefox and Google Chrome, but it messes up in IE and Opera. The mess happens when you hovered on the 'products' link, which should show the submenu. The 'right' behavior should be...

How to change this code in to $.ajax so that I can display message after saving to the database?

Hello Friends, I am using this ccode right now.. <%using (Html.BeginForm("SaveNewServiceTypeCategory","ServiceTypeCategory")){ %> <table> <tr> <td>Service type category:</td> <td style="padding-left:5px;"> <input type="text" id="txtNewServiceTypeCategory" name="txtNewServiceTypeCategory" ...

Juggling multiple context menus within .toggle

I'm further along in making this all work, but when I try to add some code that hides the others when one is clicked it expects a second click to hide again. How do I only show one menu at a time? PS These are not sibling menus. $(function() { $("a[rel=tooltip]").tooltip({ position:"bottom" }); $(".dd").toggle(function() { $("...

Update Image based on Response Stream

Is is possible to update an image on an HTML page using the response stream of an ASP.NET Generic Handler? For example, if I have the following code on a handler: // http://www.example.com/?Guid=&lt;AccountGuid&gt; public void ProcessRequest (HttpContext context) { context.Response.ContentType = "image/png"; context.Response.W...

jQuery: how do I have different effects based on where you are in navigation.

I have this: $('#mask').cycle({ fx: 'scrollLeft', timeout: 0, speed: 300, startingSlide: 0 }); But there is a certain case where I want the fx to be scrollRight lets say when (myCondition == true) how do I do that? ...

Search for location.hash inside block

We are on the page http://site.com/movies/#posters <div class="content"> <div id="posters"></div> </div> I'm trying to use this code, for jump to block with id posters and add class active to it: $(location.hash).addClass("active"); It works good, but has a problem. If there is a link like <a href="http://site.com/movies/actual...

Fancybox won't load inline content.

To make things easy, here's the site - http://schnell.dreamhosters.com/folio/pixelread.php View the source code all you like. The middle button of the top bar in your browser window that says "Palette" is supposed to open up a fancybox in the middle of the screen, and that box should load into it the data inside the element with id of ...

jquery - how do i access those arrays and variables in the dom?

Hi, Im using firebug to debug jquery and in the dom tab i can see all the vars and arrays in there. How do I access the different arrays and vars in the dom? Cheers Ke I cannot access these object items, even though firefox lists them, i have sitems in the top level of the dom, i also have sitems within the parent variable. a lot of...

jQuery.parent() doesn't appear to be working

.parent() is not returning the parent element that I'm specifying. I don't see any problems with my code or html. Javascript: var vehicle = function () { return { init: function () { var that = this; jQuery('.vehicle-year-profile .options .delete').bind('click', function (e) { e.pre...

Get First Hidden Field

I have the following code: $(document.body).click(function() { $(".content").each(function(i) { $(this). }); }); How can I retrieve the value of the first hidden field within $(this)? ...