jquery

How to prevent phone numbers to be converted into Skype links?

On those Windows machines with Skype installed, it tends to convert all phone-formatted numbers to Skype links so you can click it in order to make a call on Skype. The question is how do you prevent that to happen for a certain number on page? ...

Adding characters to string (input field)

Hi, I have a text box where the value is the result of a calculation carried out in jQuery. What I would like to do, using jQuery, is to display brackets around the number in the text box if the number is negative. The number may be used again later so I would then have to remove the brackets so further calculations could be carried o...

How to search with parameters in MVC?

Hi, I need to be able to provide a page for the end user where thay can search in the following : Search work Category Price AdType Location and so on. Its important that the user can copy the url and then use it later(and get the same settings). Its also important to be able to save these settings on the user in the database. So ...

How do i get a href value from a link within a ul li list

I have an unordered list such as: <ul id="cities"> <li><a href="/london/">London<a></li> <li><a href="/new-york/">New York<a></li> <li><a href="/paris/">Paris<a></li> <ul> using jquery how do i get the href value for "New York"? Only the anchor text value is known through the client so i would like to find the matching anchor t...

Custom Django tag & jQuery

I'm new to Django. Today I created some Django custom tags which is not that hard. But now I wonder what is the best way to include some jQuery or some Javascript code packed into my custom tag definition. What is the regular way to include a custom library into my code? For example: {% faceboxify item %} So assume that it'll create a...

Can I pass a querystring that translates to a List<int> on the server?

Hi all, I'm writing a Google Maps app that requests data from the server using jQuery's $.ajax() to send the request to my ASP.Net MVC Contoller. This control expects a List for the amenity types. What should the querystring look like for this? I've tried http://localhost:9090/mapamenities?amenityTypes=1,5 http://localhost:9090/map...

What is the difference between JSON and JSONP?

Possible Duplicate: Please explain JSONP For example in the jQuery documentation I find both JSON and JSONP mentioned. What is the difference exactly? How can I see which is which? Which one should be used for what? And what does the PHP function json_encode generate? ...

alter prettyphoto to pull from div or span, not title

Here's the section of code from prettyphoto.js that I need to alter. What I am trying to achieve is have each photo have a following hidden div or span that holds the description for the photo. This way I can include html in the description. Possible? Thanks! var images = new Array(), titles = new Array(), descriptions = new Array();...

Get value of selected field from a dropdown list

I have this class in my model: class ServiceCharge(models.Model): name = models.CharField(max_length=30) amount = models.PositiveIntegerField() extends_membership = models.BooleanField(default=False) def __unicode__(self): return str(self.name) What I want to have is in the form for charging users a service charge, when a...

How do I limit how often keys can be pressed on a jQuery slider?

Hello, I've made a slider that uses the left and right arrow keys to move the slide but when pressed to quickly it will bug a little and I was wondering if it's possible to limit the amount of presses in say a second. You can see it here: [link removed] $('#slider-nav div').click(function() { $('#slider-nav div').removeClass('select...

How to remove iframe from parent page using a function inside the iframe?

I have an iframe I put on a page using a bookmarklet, I want this iframe to close itself when I navigate to a certain page inside this iframe. How to do that using JavaScript? Note: iframe and container page are in different domains. ...

jQuery. Treat a string as a HTML document?

I'm not sure if I worded the title correctly. Basically is it possible to treat a string as HTML as if it was on the page? So I can use $("#elem") and all the other jQuery functions? The HTML is loaded into a string from an ajax request and stored in a string. Instead of using regular expressions to access the data needed is it possibl...

Jquery Ajaxform with input type=file and multifile

Im using ajax form with multifile. However ajaxform just seems to quietly die and does not do anything if using multifile. Multifile is just a jquery plugin that builds a list of input type=file so that you can upload multiple files at once, before which you can add/delete your file upload list. I've looked at multifile and made one ...

is the jQuery function "change()" working in IE ?

is the jQuery function "change()" working in IE ? I usually use it to detect changes in forms (select/unselect check boxes), and submit them automatically without having to click on submit button (which is hided). i.e. $("#views-exposed-form-Portfolio-page-1").change(function(){ $("#views-exposed-form-Portfolio-page-1").submit...

setTimeout doesn't work with window.location?

i try to rich flash like effect when changing window location, but there is a small problem, i can't solve. look at the script please $(document).ready(function(){ $('a.flash').click(function(e) { e.preventDefault(); $('body').fadeOut(1500); setTimeout("", 1500); ...

One click handler for multiple elements?

Hi, I'm looking to add a click handler to a div. But is there a way to use a single click handler function and share it between multiple divs? Since I may have 100 divs, I don't want to create a click handler for each (they'll all practically do the same thing). The jquery example shows: $("p").click(function () { $(this).foo(); ...

jQuery code not executing when DOM is ready

I have written a simple jQuery script that changes the hash tag of a link. I do this because I am using IntenseDebate comments in Wordpress but the comment link still links replaced id of the old comments. I'm using jQuery so that if javascript is enabled, the user can click on the comments link and it will take them to the IntenseDebate...

Reading Browser Cookies ... jQuery

Is it possible for jQuery to read browser cookies i.e. cookies set by facebook? This would be a great help for my application if it was possible. ...

Retrieve all uploaded videos by a given user

Is it possible to get all videos that a user uploaded on YouTube (without the authentication token)? How? Edit: The best approach is this Pointy answer, but there is a limit of 50 videos per request, so in short there isn't a way to get all videos at once. Accepted anyway. ...

How to handle empty return from getJSON

Alright so I have a php script which gets results from a DB, and to get those results I'm using a jQuery script to pull the results via getJSON. It works perfectly but now I want to do something if the php script returns no results (empty). I tried: $.getJSON('path/to/script'), {parameter:parameter}, function(data){ if (data) { aler...