I am using the idtabs script from http://www.sunsean.com/idTabs/ and so far they work awesome. However, I am looking for a way to make it so that when the page reloads, the same tab that was selected is still open. So far i'm thinking there must be a way to set the .selected class to assign the default tab. I'm a huge js rookie so any id...
hi,
im trying to POST (cross domain) some data to a jersey web service and retrieve a response (a GenericEntity object). The post successfully gets mapped to my jersey endpoint however when i pull the parameters from the request they are empty..
$ .ajax({
type: "POST",
dataType: "application/json; charset=utf-8",
url: jersey...
There are two methods GetUserAssignedSystems() and GetUserAssignedSystems(string Id)
These methods act very differently from each other. The problem is, when I want to call GetUserAssignedSystems(string Id), the parameter-less method is called.
Here are the methods:
[WebMethod]
[ScriptMethod]
public IEnumerable GetUserAssignedSystems(...
Most of the applications that I'm finding, inncluding LiveHelp and PHP Live Chat! feature terrible, un-commented, non-cross-browser compatible Javascript.
I'm looking for chat software that uses a Javascript framework to avoid some persistent and common bugs related to the DOM.
...
what do you guys think of this code to help with some lazy people out there :)
$('a').each(function (i,n){
$title = $(n).attr('title');
if(!$title){
$(n).attr('title',$(n).html());
}
});
Considering that most links have the same title as their text so... let me knwo if any of you out there like this?
So we can te...
Hi,
I have a file where I keep all scripts so my pages wouldn't get messy (I have php file which generates required javascript).
My includes basically look like this:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="script.php"></script>
</head>
<body>
<input type="bu...
Inside of a jQuery plugin I made I have:
$.getJSON(base_url,{
agenda_id:defaults.id,
action:defaults.action+defaults.type,
output:defaults.output
},function(json){
return json;
});
And in a separate JS file (yes, it comes after the plugin):
json = $('#agenda-live-preview').agenda({action:'get',type:'agenda',output:'js...
I have a basic function to alert the user upon refresh, browser back button (except the submit button) or when a link is clicked they will lose form data from a form wizard.
<script type="text/javascript">
var okToSubmit = false;
window.onbeforeunload = function() {
document.getElementById('Register').onclick = function() { okToSubm...
This should be really simple but I'm a javascript/jQuery rookie, so here we go:
With the following code I can select a certain element
var user = $(".ui-selected .user-name").html();
But if there are multiple elements with the above classes, only the first value gets selected. What I would like to accomplish is a variable with all th...
I've build a livesearch with the jQuery.ajax() method. On every keyup events it receives new result data from the server.
The problem is, when I'm typing very fast, e.g. "foobar" and the GET request of "fooba" requires more time than the "foobar" request, the results of "fooba" are shown.
To handle this with the timeout parameter is im...
I am trying to pass some JavaScript variables that I have assigned to form variables into a query string used by a jQuery plug in called fancybox. If I hard code in the string that I want lightbox works great, however I need it to pass some form values in there to make it work as desire.
<script type="text/javascript">
$(document)....
Hello,
I am trying get the html within .event_recur.
$(".entry").each(function(){
alert($(this).find(".event_recur").html());
});
<div class="entry">
<p class="event_title">June 21st Event - eat</p>
<p class="event_start_date">1277160289</p>
<p class="event_end_date">1277505889</p>
<p class="event_body"><p>June 21-25th
</p></p>
<p ...
I am trying to show blockui when ajax starts like so:
// block when ajax activity starts
$(document).ajaxStart($.blockUI({ message: '<h1><img src="busy.gif" /> Just a moment...</h1>' }));
and then I want to stop it doing
// unblock when ajax activity stops
$(document).ajaxStop($.unblockUI);
Problem Is that it won't load...
Hi everyone,
i am trying to reverse the scrolling direction of Jcarousel and make it scroll from right to left. anyone knows how that is done?
I attach here a link to the Jcarousel code file, perhaps this can help.
http://174.133.190.8/~goldarch/jquery.jcarousel.min.js
thanks!
...
Hi,
I have inherited some code in which I now have to add CSRF prevention and am trying to use the struts2 tokenSession interceptor to do this. I am adding a token to my form using the struts2 token tag like so:
<form id="updateObject" name="updateObject" action="<%=request.getContextPath()%>/prv/updateObject.action" method="POST">
...
Is there any good practice to avoid your jQuery code silently fail?
For example:
$('.this #is:my(complexSelector)').doSomething();
I know that every time this line get executed, the selector is intended to match at least one element, or certain amount of elements. Is there any standard or good way to validate that?
I thought about...
See http://jasondaydesign.com/masonry_demo/
I have title divs that overlay the underlying box div.
What I am trying to accomplish is when the mouse hovers over the .box div, the div holding the title will either fade out with jquery or just display:none through css.
...
I use the load function to preload Images before applying a hover effect.
$("img").load(function(){ //image preloading
//some function & variable setting
$listingItems.hover(
function(){
//effect
},
function(){
//effect back
}
)
}) // load
the problem i have i that the...
I'm using jQuery and made a plugin for some in house work that basically builds URLs for our internal API. Anyways, I want to return $(this) and im not getting the right thing and im getting a createdocumentfragment error?
Plugin code:
$.get(base_url,{
agenda_id:defaults.id,
action:defaults.action+defaults.type,
output:defa...
I am getting jquery error when i am passing # contain
var url = "/CheckVol/SaveItem?status=" + status + "&name=" + name ;
$.post(url, function(data) {
});
here name contain 'my name # pankaj # lohani # india' , which is creating error.
...