I'm trying to convert the following jquery to javascript syntax, but being not familiar with either, I'm getting stuck
var div = $('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');
// Append our div, do our calculation and then remove it
$('body').append(d...
Hey guys,
Using jQuery, the following is not working in FF, but it is in IE
$(this).focus().select();
I looked around for this and found that you could use a timeout to get around this, but that is not something I want to do if I can avoid it. Does anyone know another way to do this and have it work in FF?
Metropolis
...
There are two accordions on my page, with custom accordion CSS in another file, differentiated by class and ID names so as not to conflict with each other. The accordions don't show up at all, they just degrade to showing all the content at once, as if all the accordion styling is gone. The accordions are both called around the middle of...
Hi all,
I'm returning JSON from my controller to my view in order to populate a jquery autocomplete textbox in MVC. The problem is, some of my data contains commas, and therefore is split by the autocomplete helper.
Heres my code.
Controller:
public ActionResult GetData()
{
var data = repository.GetData();
re...
i am trying to get date from my implementation of jquery date picker, add it to a string and display the resulting image in my div. Something however is just not working. Can anyone check out the code and have a look at it?
The code is supposed to take the date from date picker, combine it in a string which is to have the necessary cod...
Hi All,
I was wondering if anyone had any good tutorials around creating a gmail inbox star (favorite) ?
EDIT:
I guess I want to create something just like the stackoverflow star or gmail inbox star. I have a set of list items that i've added several controls to. One being a checkbox (for archiving, or batch deleting) and another I ha...
I'm trying to extract the StateLongName and StateShortName values from the xml below.
I know there has to be a simple elegant way to do this with jQuery.
<NewDataSet>
<Table>
<StateLongName>Alabama</StateLongName>
<StateShortName>AL</StateShortName>
</Table>
<Table>
<StateLongName>Alaska</StateLongName>
<StateSho...
Hey guys, quick question. I have a div that on click will execute a jquery function onclick, and then replace the div with its opposite div which onclick will replace back to the first div just like the favorite function on this site. I am having a simple problem I hope someone can spot or explain to me it is not possible. The function w...
Hi will some one help me to find a free script something like this website has
http://www.paris-beyrouth.org/
...
Hey, I'm still trying to get my pagination links to load properly. But I can't seem to find a solution to this one problem.
the problem I am having is when I click any of the pagination number links to go the next page, the new content does not load. literally nothing happens and when looking at the console in Firebug, nothing is sent ...
Can anyone point me to an example of code for a page that begins to automatically scroll when the user is idle for an amount of time? I think this is slightly beyond my skill set. I think JQuery or something similar might be appropriate but I just can't seem to figure it out. I'm designing a site for the nonprofit I work for and we don't...
I am trying to think of the name of the plugin (or a plugin) that slides content in (up or down).
So I have a hidden div, I click on one of the titles/header, it opens the hidden div, if I click on another header it hides the other visible div, and slides up or down the new one.
I can't think of it for some reason.. anyone?
...
As gmail and the task api is not available everywhere (eg: some companies block gmail but not calendar), is there a way to scrap google task through the calendar web interface ?
I did a userscript like the one below, but I find it too brittle :
// List of div to hide
idlist = [
'gbar',
'logo-container',
...
];
// Hiding b...
I've created a few input fields, that I am cleaning up as the user types.
So, I'm using a keystroke detection event, like .keyup()
It's all working very well, but I do notice one thing that's rather annoying for the users.
While the script is cleaning the data as they type, their cursor is being sent to the end of the input field.
So...
Hey all,
I am unable to get a highcharts plugin to render a chart in a rails application:
http://github.com/loudpixel/highcharts-rails
I believe it has something to do with the sql queries to the database placed in a ruby array, which the javascript is unable to intepret. This is what I have:
def panels
pass = Student.find_by_sql('SEL...
Hello all,
How can I loop through this json data without referring to the data items by a number. I would like to use it as an associative array. I have this so far:
$.post('/controlpanel/search', { type: type, string: string }, function(data){
$.each(data, function() {
$.each(this, function(index, itemData) {
...
I've got the following HTML
<li><input type="checkbox" /><label>This is the label!</label></li>
I bound a click event to the li, and let the click event bubble up to the li before doing anything else.
$('li').each(function(i){
var item = $(this);
var checkbox = $("input[type='checkbox']", item);
item.bind('click', function(e){...
Hi,
I discovered that .attr() only applies to the first matched element on the page! So, I've been trying to get the hrefs from all the matched elements on a page, but to no avail.
Here's what I tentatively wrote:
var thelinks = $("td a").each(function(){
$(this).attr("href");
document.write(thelinks);
});
I used docume...
I'm trying to install jQuery UI with a ThemeRoller theme for the first time. I've downloaded jquery 1.4.2... I've downloaded jQuery UI with a couple of themes. I've tried to follow the instructions but they seem contradictory and don't seem to related to the downloaded files.
When I try to use a datepicker... the datepicker functionalit...
Month view is perfect. Day view is fine too!
But switching to week-view shows event on the first day of the week.
Changing columnFormat, timeFormat or firstDay does not fix problem.
...