javascript

How to do relative animating with Jquery on mouseover and mouseout?

I'm trying to have the following: There is a fixed positioned div on the bottom of my page. When the mouse enters and exits the div animates its height to resp. 100px and 50px. The default height is 50px. I've found that Jquery does this correctly with only one big no-no. When the mouse exits while animating and then reenters again it ...

How do I build a Rhino project as a runnable JAR in Eclipse?

I have a Rhino project where I've written some .js files, and from Eclipse I start my program by calling org.mozilla.javascript.tools.shell.Main with a parameter to one of my .js files, "src/bot.js". Now, in order to run this on my server I would like to be able to build it into a single runnable JAR for easy deployment. How do I do this...

How to re-load a jQuery plugin on page resize?

I'm using the Galleria plugin in an AP div that is elastic. Galleria centers and crops itself nicely on page load but doesn't handle resizing so gracefully. If I resize and then reload the page, it looks great, so I'm wondering if there is a way to unload/reload the plugin ONLY on resize? ...

What is the TinyMCE jQuery Package?

I've been asked to use the TinyMCE editor in a project. On the download page, there's a main package, and then a jQuery package This package contains special jQuery build of TinyMCE and a jQuery integration plugin. tinymce_3_3_7_jquery.zip What is the jQuery build of TinyMCE? Is it just TinyMCE with the same features built on top of...

JavaScript vs AS3 for Interactive Globe

I am developing a web application that should display data points below the Earth's surface. It should also include user navigation, zoom, and rotational capabilities. It reads in the data from a XML file and should display 500-1000 spheres. Ideally, I would like to use HTML5, but it doesn't run in IE8. This is a Flash application that ...

CSS absolute positioning elements inside a div

I have a .wall div with a some .toy divs inside it. I want to arrange the toys inside the wall just like http://goo.gl/4MqM. float:left property has done it for me nicely. Now the problem is I want to add position:absolute for the toy divs to make it draggable later. How can I do this either via Javascript or via CSS? Applying position...

IE doesn't apply css loaded through ajax.

As every web developer finds out the hard way sooner or later, IE does not apply css styles loaded via ajax. I know I could just put that css in a more global place, but I'm wondering if there happens to be some "hack" or "trick" to get around this. Perhaps there is some javascript magic? UPDATE WITH EXAMPLE: For example, say you have ...

Expand and Collapse Paragraphs with JQuery Inside of a Loop

I am attempting to write some jQuery code that will expand a paragraph when a link is clicked and once expanded present another link that will allow the paragraph to be collapsed. These paragraphs are all generated within a foreach loop and I am having trouble selecting the correct paragraph because I am not sure of the best way to crea...

Difference between 2 jquery binds

function runSomething () { // some stuff happens } $(selector).bind('event', runSomething()); $(selector).bind('event', runSomething); What's the difference between these 2 versions of the bind? Here's a practical example: http://jsbin.com/icajo/edit Can somebody explain why works the way it does. I'm trying to get multiple butt...

Issue loading external files (CSS and JavaScript) in Safari

I'm having a bizarre situation here where my external site files, both JavaScript and CSS, are being interpretted as somehow corrupt on Safari browsers. The same site looks fine in Internet Explorer, but on Safari the javascript and css are being completely ignored. If I look at the files through the Inspector, I can see that Safari view...

jQuery: running 2 different jQuery versions on the same website ?

can I run 2 different jQuery versions on the same website and avoid conflicts ? please don't ask me why.. it is a long story. Thanks! ...

Load Ads after the page Loaded With jQuery

I wrote a plug-in for jQuery that copy the the output of the ads JavaScript to there container Div. so i put the Ads JS at the bottom of the page (so they will not decrease my page load speed) within inadvisable Divs that looks like: <div id="ad_loader_4" class="ads_loader"></div> the id of those divs point to the container divs. the...

Save contents of textarea from external site - Any Language

Hi, I'm wondering if this is even possible, but here it goes. There's this website ok, and it lets you submit your link to a bunch of other sites and it shows a full debug and everything while its running. Only bad thing is it clears it every 100 lines using javascript, I'm wondering if it would be possible to save the contents of the ...

How do i call a js function on pressing enter key

Hi, I'd like to know how I can initiate a javacsript function when pressing the enter key. I'm trying to create a function called handleEnter(event, fn). I want to use the function on an input field eg: onkeypress="return handleEnter(event, update_field(this)); If anyone can help - I'd be very grateful ...

Trouble with check boxes using get and javascript/jquery

Hi, I am working on the following form for a local charity: http://bit.ly/dtcuv7 I am having trouble with the check boxes in the availability section. What I really want is for people to be able to simply check the times they are available to help out and then have these checked times sent with the rest of the form data to the charit...

javascript textbox new line replacement

I have a text box that can allow the users to hit enter. When they hit enter I check the input and replace the carriage return with \n. However it still sends to my db a carriage return. What could be wrong? Here is the code: var pp = comment.value; alert(pp.replace(/\r?\n|\r/g, "\n")); comment.value = pp.replace(/\r?\n|\r/g, "\n"...

ASP Enable enter key

I have a login box that I need to have submitted when enter is pressed. Below you are going to find part of the code. Please any help would be appreciated. <div class="box-login clearfix"> <div class="box-login-header"> <h3> Registered Users</h3> </div> <div> <asp:Label ID="LblMessage" runat="serv...

How to refresh the data in a jqGrid?

Hello, I have been trying to get a grid to be updated from the datasource when a button is pushed. So I have in the click event something like this: $('#grid').jqGrid('trigger','reloadGrid'); However this does not work and I get an error thrown for unknown method 'trigger' I have also tried $('#grid').jqGrid('trigger("reloadGrid"...

stopping or destroying jQuery fjTimer

hi. im using this javascript timer in jQuery: http://plugins.jquery.com/project/fjtimer how can i stop the timer (destroy it for example)? the documentation has nothing about this issue; still if someone has an idea, pls give me a hand. Thanks, Andres ...

How to Call Client-Side Code Before Server-Side Event?

<asp:RadioButtonList ID="rbEmployeeGroup" runat="server" RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged=" [Call java script to check first] then rbEmployeeGroup_SelectedIndexChanged"> <asp:ListItem Selected="True" Text="Employees" Value="employees"></asp:ListItem> <asp:ListItem Text="Groups" Value="gr...