jquery

Jquery - Add entry to the rightclick contextmenu

Hi, you can disable the menu $(document).bind("contextmenu", function(e) { return false; }); you can show a div $(document).bind("contextmenu", function(e) { $('#menu').css({ top: e.pageY+'px', left: e.pageX+'px' }).show(); return false; }); but is it possible only to add an entry to the rightcl...

.replace, unwanted overriding of cufon replace also.

I have this in the js file: vars explained (%id=inject is: @inject) (#%id% is just the wrapper div) $(document).ready(function(){ var injectionKey = /%id=inject%/ig; var injectionStack = $('#%id%').html(); (function($) { var theInjectionPage = $("body"); theInjectionPage.html(theInjectionPage.html().replace(injectionKe...

window.onbeforeunload functionality

When the user click on the OK button before redirecting how to call the delete function and then continue redirecting $(document).ready({ window.onbeforeunload = confirmExit ; }); function confirmExit() { var ele = document.getElementById ("localchanges") ; if (ele.value == "1") return "Changes are not saved. Discard change...

Making elements droppable by using its CSS class Name when multiple CSS classes are applied to a single element

Hello I've the following element <div class="class1 class2 class3"></div> I'm trying to get all the elements with class name 'class3' using jquery $('.class3').droppable(); But i'm not getting the above div as droppable. Any ideas? ...

jQuery : File Input Value needed ?

How could we get the file input full path using jquery ? ...

How to extract data from a HTML.TextArea contained in a foreach loop using JQuery or other means

Hello Everyone. I am new to jQuery. I have a Html.TextArea called "CommentPost" displayed for each item in a foreach loop. I am trying to return the data typed into my text area as a parameter in my ActionLink call. The first parameter item.CommentId get populated correctly but the second one item.CommentPosting evaluates as null. I t...

Access a dynamically created control through javascript - ASP.NET

Hello I've a JavaScript function in my page through which i make some elements in the page as 'JQuery UI droppable'. function setDroppableTargets() { $(.cssDockZone).droppable(); } But the elements with the class cssDockZone is created dynamically upon user interaction. So in the code behind i create the control first and finally at ...

How to rewrite the code using jQuery

How to rewrite the code using jQuery? <script type="text/javascript"> window.onload = function(){ var array = document.getElementsByTagName('div'); for (var i=0; i<array.length; i++) { (function(i) { array[i].onclick = function() { alert(i); } ...

How do i apply fadein and fadeout effect for this?

Hi there, i have a navigation menu and i am using the hover element to change the image when an hover event occur. i am using the following CSS #navigation li.contact a:hover { margin-left:1px; background: url('../img/hover.jpg') no-repeat; float:left; width:147px; height:109px; } my navigation menu is composed o...

Problem with jQuery Coda Slider and IE7

Hi, I have this website using "jQuery Coda Slider" but the slider is not working in IE7. It works with no JavaScript errors both on IE8, Firefox and Google Chrome, but not on IE7. Can you please help me? The website's at http://portelaresidence.com/ . Thanks in advance for your help. ...

lazy loading of images on my webpage

hello everbody, after some research and after I've asked some questions, I've realized the following: jQuery plugin Lazy Load (http://www.appelsiini.net/projects/lazyload) doesn't work on Safari and even not on Firefox. I've just tested their demo. Please you need to use Firebug, and see how all the images are loaded at once at the be...

Prevent displaying unstyled page when doing a page-refresh.

How could I prevent my page displaying an unstyled view while the page is loading ? I think its probably because of the order of loading different JavaScript-files. Is there a best-practice, for example loading plugins before my own code ? Should every jQuery/.js-function called after document.ready or windows.load ? link to page Than...

What's wrong with my code

This is the first thing I write in javascript, so I hope its a basic error What I'm trying to achieve here: Take a bunch of links from a page, load their contents query for links inside and add them to a list on current page. I get error on the append And in JQ documentation they say the method can get a JQ object <script type="text/j...

Google AJAX Search - Automatically Load Default Result

Hello, My search page is search.html and when people open that page by default i want to display result for "myword" how to do that please help me and here the code: search.html <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Google Powered Site Search Demo</title> <script sr...

How to "fullscreen" a jqGrid?

Hi all I'm using jqGrid with jQuery to display some data on an application I'm building and am struggling over extending its abilities. How would I go about toggling a "fullscreen" mode for the grid. i.e. expanding the grid to the full size of the page, on top of the other elements? Thanks all, Gausie ...

Displaying information from Twitter and Database in DateTime order

I am working on a ASP.Net MVC website and I am querying Twitter's API to return data. I also have a database backend which returns posts for a blog. How can I put this data in date order and parse it to the view? At the moment I am using http://tweet.seaofclouds.com/ which puts data into a div via jQuery however I now have this added n...

How can I make jquery wait for one function to finish before executing another to update row colors?

I'm using jquery ui sortable. When the rows are rearranged I want to reset the row colors to zebra striped. This is the code I'm using. function reset_rows() { $("#rank tbody tr").removeClass("row1","row2"); $("#rank tbody tr:even").addClass("row1"); } $("#rank tbody").sortable({ update : function() { reset_rows(); } }); The fun...

jquery.corner problem with IE8

Been making this site for the past week. Only just came across this error in IE8. There's an error in the jquery.corner.js file: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Timestamp: Sat, 25 Sep 2010 16:13:34 UTC Mess...

Wait for jPlayer to finish loading files before continuing loop

I'm using the jQuery audio player 'jPlayer', I have a loop which creates a number of jPlayer unique instances then assigns an on click 'jPlayer play' to another part of the document for each instance.. The problem is jPlayer uses an internal ready: function() {} to assign the audio path and load the file.. I need to wait for this functio...

calling jquery from a javascript function

Hi , <html> <head> <script type="text/javascript"> function display(id) { // open jquery modal window using jquery UI } </script> </head> <body> </body> </html> I want to open jquery modal window using jquery UI whenever the function display is called using normal javascript function call . I can use .diolog function of jquery...