I am using the following code to show a jQuery UI dialog when the mouse is clicked on the map:
GEvent.addListener(map, "click", clicked);
function clicked(overlay, latlng) {
$('#dialog').show();
};
Both clicked function and show() function works fine on their own but when I want to open dialog box by clicking on the map it does no...
I load jquery into my greasemonkey script and when the user clicks the start button the script makes a bunch of ajax calls. I then empty body and append data. When i click on something and hit back instead of getting the page post script i lose all the data and need to run the ajax calls again (it can take seconds to run). How do i make ...
Hi all:
I got stuck in this problem for an hour. I am thinking this is something relates to variable scoping ? Anyway, here is the code :
function loadRoutes(from_city)
{
$.ajax(
{
url: './ajax/loadRoutes.php',
async : true,
cache : false,
timeout : 10000,
type : "POST",
dataType: 'json',
data :
...
I want to replace a form element with a div and keep the inner html of the form inside the inserted div element. i tried jquery it gives me unkown html element as selection result,
below is the target form and inner html:
<form name="Contents2_frmLogin" action="/SiteManagement/SiteWizard.aspx" method="post"><table border="0"><tr><td>...
Hey guys, I have a weird problem. I have an update system that refreshes data on a time interval. It works well in all browsers except internet explorer 8. The problem is that once it loads the data, it does not matter if the data updates further, it will not update the data visually until the internet history is cleared. I am not using ...
I'm writing this script to rotate a background Image every 3 seconds but it doesn't work at all and i'm stumped as to why not.
$(document).ready(function() {
var inc = 0;
var bgImages = new Array();
bgImages.push("Images/backgroundDog-small.jpg");
bgImages.push("Images/backgroundDog1-small.jpg");
...
I'm loading a page containing a GMaps using the ajax() method of jQuery.
The HTML page i'm loading is:
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=MY_API_KEY" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
if (GBrowserIsCompatible()) ...
I am trying to call a function "makeQuery" and it's not working, FireBug is telling me:
missing ; before statement
[Break on this error] makeQuery(this.id){\n
I don't quite understand where it wants me to put the ";"
$(".predicate").click(function () {
makeQuery(this.id){
alert(this.id);
}
});
function makeQuery(val...
I'm in the midst of implementing the very excellent Anything Slider plugin by Css Tricks using a number of high res images, which make the page load pretty slow.
Does anyone know how to integrate the Lazy Load plugin to work with Anything Slider?
...
I am creating a dialog like in this page:
http://jqueryui.com/demos/dialog/#modal-confirmation
(click view source)
on the bottom is the div that gets placed in the dialog. The dialog works perfect when called by the javascript but the dialog is apparent at the bottom of the page when it loads. (minus all the styling that gets appli...
Example:
http://jqueryui.com/demos/dialog/#modal-confirmation
The example shown allows you to view the source and even has a theme selector at the top right. But how do you apply a theme to your own code?
...
Using jQuery .ajax() to read "./ex.html" returns the expected contents of the file
in the first alert box. Using the same call just changing the request to "./" does not return an expected directory listing in the second alert box.
<html>
<head>
</head>
<body>
<script type="text/JavaScript" src="jquery.js"></script>
<script type="text/...
I want a widget that allows users to add a request if that request hasnt already been added, or vote for a request if it has already been added. when a user adds a request, i want it to immediately appear as the first element of the list, like what would happen to your timeline if you made new tweet. ive tried to look for a jquery plug...
Trying to adapt the $.getJSON Flickr example:
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?",
function(data){
$.each(data.items, function(i,item){
$("<img/>").attr("src", item.media.m).appendTo("#images");
if ( i == 3 ) return false;
...
I have select values as follows:
<select id="SelectBox" multiple="multiple">
<% foreach (var item in Model.Name)
{ %>
<option value="<%= item.Value %>"><%=item.Text%></option>
<% }
%>
</select>
I have a function in jquery that will have to read both the tex...
I'm using the jQuery validate plugin to validate a multi-step form like this one:
http://jquery.bassistance.de/validate/demo/multipart/
Unfortunately, I can't seem to get it to work at all and there is a total lack of documentation to guide me through implementation. I think the accordion part of script is firing correctly because the b...
How to check for comma separated values in a text box and raise an alert if not found.
And there is should be characters in it like A,B,C,D
function validate()
{
//validate text box;
}
<input type="text" id="val" >A,B,C,D</input>
<input type="button" id="save" onclick="validate()">
Thanks.
...
Hello Friends!
I want to show current day and time(HH:MM) with AM/PM on my page. How to achieve this task in JQUERY. I have done above thing using JAVASCRIPT but I just want to know how to do this task in JQUERY easily as per the require.
Thank You!
...
I have to buttons, image input that work fine when in the markup like this,
<input type="image" class="play" src="images/play.png" />
<input type="image" class="pause" src="images/pause.png" />
But as soon as I try to prepend() it to a generated they still appear, but
the click function does not work anymore.
$('.gallery-nav').pre...
I have written the following code. But it is removing only not <br>
var docDesc = docDescription.replace(/( )*/g,"");
var docDesc1 = docDescription.replace(/(<br>)*/g,"");
...