jquery

How to test a URL in jQuery

Hello, I have a URL which I want to open in a FancyBox (or any other overlay-type pop-up). I don't know in advance whether URL is good, so I want to test it. If invalid - I won't attach the fancyBox plugin to that particular URL, it will just be a regular link. How can I test a URL before attaching a plugin to it? Tried doing something ...

Why is a 0 being appended to the results of my ajax .load() call from jQuery?

I'm using the .load() function in jquery to insert the results of a php file to an element. My code looks likethis: $('#edit .postcontent').load('admin-ajax.php', {'action':'qe-getpost'}); Everything works great - the returned value is loaded into .postcontent perfectly. However, a 0 is appended to the end. Every time. Even if I ret...

any clear guidelines and best practices on using JQuery and ASP.NET MVC together?

Are there any clear guidelines and best practices on using JQuery and ASP.NET MVC together? articles, blog posts, books? not just MVC, but on the connection between them and known good ways and patterns of making them work together. ...

jQuery Intellisense using something other than $

I'm currently using two libraries (prototype and jQuery), thus I've implemented the jQuery noConflict method and set it equal to $j: var $j = jQuery.noConflict(); Problem is, now the jquery-1.3.2-vsdoc.js doesn't recognize my $j as a valid entry argument. Is there a way to change this? I've played around with the jquery-1.3.2-vsdo...

How do I update the text of a div inside of a table/form in Jquery inside of a dialog box?

I have a div inside of a table which is inside of a form that I would like to update <form id="login_form" method="post" action="#" onsubmit="return false;"><table> <tr><td>Username</td><td><input type="text" name="name" id="login_name"></td></tr> <tr><td>Password</td><td><input type="password" name="password" id="login_password"></td>...

Cross domain scripting error?

I'm using the following piece of code to pull a stock price from yahoo finance <script type="text/javascript"> $(function() { $("#quote").load("http://finance.yahoo.com/q?s=utg #yfs_l10_utg").text(); }); </script> I get the following errors:- Security Error: Content at file:[file url] may not load data from http://finance.yahoo.c...

jQuery $(this) vs this

Hello, I am currently working through this tutorial: Getting Started with jQuery For the two examples below: $("#orderedlist").find("li").each(function(i) { $(this).append( " BAM! " + i ); }); $("#reset").click(function() { $("form").each(function() { this.reset(); }); }); Notice in the first example, we use $(this) to app...

How to generate multiple mousedown events with overlapping objects in jQuery?

I have several (somewhat) overlapping divs, and if the user clicks on part of the overlap, I want a mousedown event (or any similar callback) for each div that's below the mouse coordinates. The standard way, of course, only generates a callback for the topmost div. Is this possible? ...

Json data has {d:"data"}

I am writing jquery ajax code to call wcf service. In this case WCf returns html as string. Some how when data is back in jquery it is in {d:"data"} format, What is this d element? below is code $.get('<%= ResolveClientUrl("~/AjaxServices/ListingBrowse.svc/GetNewsHTML") %> ', null, function(data) { a...

jQuery slider bar with progress bar-type fill

Hi all I'm looking to implement the jQuery UI so that the slider bar fills one side of the bar with a color as you drag the handle along, sort of like a progress bar. Can anyone give me tips on how I might approach this problem? Thank you in advance. ...

is jquery a problem for large scale sites?

can jquery be a problem for large scale sites in relation to something like facebook, where a huge number of visits hit the site or the site containing a great amount of content? ...

What is the best way to get jQuery/Ajax to work with CodeIgniter in this example?

I have a problem trying to get CodeIgniter and jQuery to produce ajax functionality. I have been coding all day, learning jQuery, and generally getting my butt kicked. Let me break down the situation, and hopefully someone will have the courage to help me. I have a trouble ticket system that displays many tickets on a page... each ticke...

How to trigger onclick function when user inputs keywords? Jquery

Hi, I have an input box <input type="text" name="search" id="search" /> <img src="icon.png" alt="" id="doSearch" /> I use Jquery and I have onclick event for "doSearch". So when I enter some words like "ab" .. and click on "icon" It sends an ajax request to php file and gets results back appended to dom. $('#doSearch').click(funct...

iFrame Validation

Hi, I currently have an iframe within my main page that has a number of checkboxes that need to be actioned prior to leaving the iframe, i.e, if the user commences checking the checkboxes and half way through they then click back on the main page, i.e leaving the iframe, I would like to be able to trap/validate that they have left the i...

Problems using $.getJSON

I'm calling the following URL using YQL http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22UTG.L%22)%0A%09%09&amp;format=json&amp;env=http%3A%2F%2Fdatatables.org%2Falltables.env&amp;callback=cbfunc this returns the following in JSON cbfunc({"query":{"count":"1","created":"2...

How do you validate a form with multiple div's using jQuery Validate plugin?

I am using the jQuery Validation plugin and have an issue validating items that are in nested div's in my form: <form id="form1" runat="server"> <div id="theForm"> html <input type="text" class="required date"/> <br /> aspx <asp:TextBox runat="server" CssClass="required" ID="txtone"></asp:TextBox> ...

Possible jQuery memory issues with $('#foo').remove() ?

I've just discovered that when the remove() function is used, the matched elements are not removed from the jQuery object, just the DOM. According to the remove() documentation: Removes all matched elements from the DOM. This does NOT remove them from the jQuery object, allowing you to use the matched elements further. Surel...

Get multiple values through an AJAX query

Hey guys, I am very new to AJAX and and working on a rating script, but I want to be able to pass multiple values back into my ajax function : Right now it runs a to a php script called ratings, where it takes the total value of votes / votes and multiplies it by the width of each start to get an accurate current rating. What I'd like t...

losing css hover with jquery

Css hover is working correctly until one of the menu items is clicked. I believe the problem started with I added this line $("#buttons li a:not(a." + target + ")").css("background-position","0 0"); CSS #buttons {float:left;} #buttons ul {list-style-type:none;cursor:pointer;overflow:hidden;} #buttons ul li {height:195px;width:40p...

how to load a webpage into the google map bubble rather than a textnode of text

rather than using a textnode to show content im trying to figure out how to load a webpage with params into the google map. here is the code im working with if (GBrowserIsCompatible()) { var map = document.getElementById("map_canvas"); var m = new GMap2(map); m.setCenter(new GLatLng(36.158887, -86.782056), 13); m.openInfo...