I have a form loaded in a simplemodal overlay, but it focuses on the first input field. Is there anyway to have the form not focus (meaning the field is selected and the user is able to type into it right away without having to click it) on any text input field after a form loads?
...
In Jeff Roberson's jQuery Regular Expressions Review he proposes changing the rts regular expression in jQuery's ajax.js from /(\?|&)_=.*?(&|$)/ to /([?&])_=[^&\r\n]*(&?)/. In both versions, what is the purpose of the second capture group? The code does a replacement of the current random timestamp with a new random timestamp:
var ts ...
Lets say I want to join two data sets in my $.ajax call as such:
updateData: function(dataDetails) {
$.ajax({
url: './example.php',
data: {
lets:"GET",
real:"funky"
},
type: "POST",
dataType: "json",
});
}
dataDetails in the function argument contains another set...
I am trying to grab that 15 at the end of the href with jquery..
<a class="ajax" href="/organizations/1/media/galleries/15">Silly Gangs</a>
Any ideas?
...
Hello,
I have some jquery code that removes a table row. The problem is when I remove it, it forces my page to goto the top.
The table row has a remove link that removes itself. I am assuming this is the issue that makes it scroll back to the top. I have tried setting the focus of another element outside to be focused after the removal...
Using jQuery 1.4.2 (IE8 in compatibility mode)
Given the following structure:
<div id='something'>something</div>
<div id='parental'>
<div><p>hi there</p> goats</div>
<p>hello again</p>
</div>
<div> end of the line</div>
and this code:
var Fred= $('#parental');
$('div').css({color: 'blue'});
Fred.children('div').css({color: ...
I am pretty new to this, so go easy on me:
I am building an image gallery with a main index page which allows users to select different categories of projects, a sub-index page which allows users to select specific projects within their selected category, and then the gallery page for that project.
The code below is for the main index ...
I'm working on a JavaScript-based banner for a client and have hit a wall. The banner runs fine in Chrome, Firefox, IE7 and 8. Safari, however, allows the user to close the banner once and open it once, then it stops responding to clicks. The user should be able to open and close the banner as many times as they'd like.
Rather than c...
I'm using Facebox (http://defunkt.github.com/facebox/) on one of my websites. Also i'm using jQuery extensively on the site.
My problem is that the .val() function doesn't seem to work inside facebox. Now, this is the DIV that shows up as facebox :
<div id="edit-tags" style="display: none;">
<script type="text/javascript">
$('....
im trying to append data using jquery, but its only showing the status messages but not the button! although the button deos show on firebug?
$("form.follow-form").live('submit', function(e) { /* stop event */
e.preventDefault(); /* "on request" */
$(this).find('i').addClass('active'); /* send ajax request */
$.ajax({
...
I am looking for an easy way to select an option from a select list and be able to perform a number of actions on that option. One of the main operations is to edit the option. I would like to implement a context type menu by right clicking the option and then perform the action.
Does anyone know how to capture a right click on a select...
Hi Folks,
I am trying to invoke an ajax call as soon as my input fields length is 15 (for now I have just put in an alert box in place of .ajax{ }), but the alert box is not firing up until I click somewhere on the screen after input field is filled with 15 characters.
what am I doing wrong here?
$("#serialCode").change(function ()...
Hey everyone,
I have an idea of how I might do this but I was wondering if anyone had a better thought or could help me out. I have an unordered list with a varying number of images dynamically generated within them. I'd like to add the width of each image and set the containing unordered list width to that value.
For example, if thr...
How to make entire screen blackish when jquery ui popup is visible?
...
i have the following javascript file named coupon.js -
jQuery(document).ready(function(){
jQuery('.appnitro').submit( function() {
$.ajax({
url : $(this).attr('action'),
type : $(this).attr('method'),
dataType: 'json',
data : $(this).serialize(),
success : fu...
Hi,
I'd like to fade my first background-image into one that is supposed to be used on hover and then off again once the user removes their mouse. Can use jQuery.
Here is what I have so far:
<ul style="top: -70px; display: block; padding-left: 205px;" id="cats-menu" class="nav superfish sf-js-enabled">
<a href="http://www.ballp...
Hello everybody, I'm here with the following code in prototype
var id = "bugtv";
if(navigator.userAgent.indexOf("MSIE")>-1){
flashObj = $(id+'Obj');
}else{
flashObj = $(id+'Emb');
}
I would like to jQuery
how I do it
flashObj = $(id+'Obj');
flashObj = $(id+'Emb');
in jquery?
thanks
edit
function MontaBugtvFlash(url) {
v...
Ok a have an script for submiting input data. There is an url of my site going like this : http://www.<!mywebsite!>.com. This ajax request works perfectly when user is viewing my iste on http://www.<!mywebsite!>.com, but when he visits my site without www. e.g. http://<!mywebsite!>.com than the request doesn't works. I ...
Instead of .show()'ing and .hide()'ing (or .toggle()'ing for that matter), is there any way to "toggle" a .remove() function?
I realize .remove() literally removes elements from the DOM, so it sounds difficult to magically replace the removed elements once they're gone, but is there a way of faking it?
Note: They must be removed from t...
On my website i want to open a div in jQuery and show the route to a certain address with Google maps.
The problem is that for some reason my map won't load. If i go to the page directly it works, but if i open the page via jQuery i get an empty page. This is my code:
$("#showRoute").click(function(e){
e.preventDefault();
$("#sha...