jquery

How do you reference a custom object outside of the function it was created in with JavaScript?

Hi, I'm currently using JavaScript and jQuery. I have an function which executes once the document is ready, and inside that I am creating objects which contain various attributes. Within the same function, I can access these new object's attributes no problem, however once I'm inside a different function I can't seem to reference the...

What does JQuery do to a <div> when you set it to hide?

I was wondering what JQuery actually does to a <div> when you set it to hide? Does it simply set it's CSS display style to none? The reason i ask, i wanted to set a <div> to be hidden initially (by setting the property manually, not by calling .hide) then use .show() to bring it into view when needed. Cheers, Kohan ...

Jquery Cycle plugin and scrollVert

Anybody know the easiest way to create a scrolVert effect with the Cycle plugin which scrolls up to display the next item rather than scrolling down as is default? ...

Why won't this Jquery run on IE?

Hello All, I have this Jquery code (function($){ $.expr[':'].linkingToImage = function(elem, index, match){ // This will return true if the specified attribute contains a valid link to an image: return !! ($(elem).attr(match[3]) && $(elem).attr(match[3]).match(/\.(gif|jpe?g|png|bmp)$/i)); }; $.fn.imgPreview = function(userDe...

ASP.Net MVC 2 editor templates

Can you recommend any good open source editor/display templates (mostly editor), preferrably utilising jQuery. Like AutoComplete, datePicker, color picker, multi-select, grids, trees etc. Thanks in advance ...

Jquery function doesn't work (with smarty).

Hi! I can't find whats the wrong with this script. Please help me! {elseif $text[i].text == "%SubPages"} <!-- js--> {literal} <script type="text/javascript"> $(function(){ $("#button_{/literal}{$text[i].id}{literal}").click(function(event) { event.preventDefault(); $("#settings_{/literal}{$text[i].id}{literal}").toggle(); }); $("#setti...

How to prepare data from more tables for JqGrid in Rails app

Hello, I have a problem with prepare data for JqGrid. I have used this plugin http://www.2dconcept.com/jquery-grid-rails-plugin and I need table with data from more models. for example User model: has_one :profile has_many :users_roles has_many :roles, :through=>:users_roles and i need this data in jqGrid [user.login, user.profile....

What is the easiest way to let user to update the web page contents based on a file on his computer ?

I'm writing an application that runs on Firefox 3.6.3 for internal use only. I would like to be able to update the contents on the page based on a file on my computer. What is the easiest way to achieve this ? I understood from other posts here that I must upload the file to the web server and then return the contents back to the brow...

Cannot cause $(this).find("a").click(); to fire using JQuery

Hi Everyone, I have a small question which should be very easy for the jquery experts out there. I am trying to follow http://aspdotnetcodebook.blogspot.com/2010/01/page-languagec-autoeventwireuptrue.html to be able to perform an action on gridview row double click. I can redirect to another page fine (as shown in the example) but I ca...

Move document.ready function to a separate javascript fucntion?

Hi, Is it possible to move the following code within a jQuery document.ready function into a separate javascript function, so that it can be called just like any other javascript function, i.e.: <script type="text/javascript"> $(document).ready(function() { $('div#infoi img[title]').qtip({ position: { adjust: { x:-1...

Jquery date format

Hi, I want to validate my date field in "mm-dd-yyyy" format using jquery validation plugin. I want to display message "Please enter date in mm-dd-yyyy" if anybody vilates the date formar How will i do that ? Thanks ...

Get the label of click check box

hi i have a page which generate check boxes dynamically and i have the following event which fires every time a user click on any of the check boxes $(':checkbox').click(function() { }); My question is how can i get the text of the check box that has been trigger by the user? Thank you ...

jQuery toggle elements with class in parent div only

I've been beating my head against my desk for the last two days over this one. I'm making an app that displays info from a db, the title/link, thumbnail, and time saved wrapped in an unordered list, like so: What I'm trying to do is have a minimize button on the element, toggling the thumbnail and time saved on and off: I can accomplis...

Change Vimeo Video using JQuery

Hello all, How can I change the ID of the embedded vimeo video? Here is the embed code for example: <object width="578" height="325"> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11527784&amp;amp; server=vimeo.com&amp;sh...

jQuery getScript and Google Maps API Problem

HI I got a problem with loading the google maps api. I got my own object with a function that initializes the map, and the google maps api gets loaded via jquery.getscript. but i always get an error message in the callback function: var MyGMap = { GMapScriptURL: "http://maps.google.com/maps?file=api&amp;v=2&amp;async=2&amp;key=", Map:...

how to use jquerydate picker with partial views in asp.net mvc?

hello i am working on asp.net mvc. at staring i used the jquery which works fine but now i am converting my pages in to partial pages at this point am using ajax function to convert it in to partial view but every thing is working fine except date picker plz tell me the solution. the script that i have used: ...

How to get value of href in Jquery

I am trying to grab the value of my href in jquery how is it done'? This is what I have done: $('#playbackbutton').click( function() { $("#playbackdiv").load("$('a:href').val();", [], function(){ $("#playbackdiv").dialog("open"); } ); return false; } I need to get the ...

jquery load data

dumbest question ever... but I want to somehow fill 'gid' value in data load gid = 123; from = 33; to = 44; $('#x').load('y', {'range['+gid+'][]' : [from , to]}); so I could get [range] => Array ( [123] => Array ( [0] => 33 [1] => 44 ) ...

populate select boxes from json string using jquery

I have a list of select boxes with incremental numbers to identify then e.g. <select id="my-select-0"> <option value="1">first option</option> <option value="2">first option</option> < option value="3">first option</option> </select> <select id="my-select-1"> <option value="1">first option</option> <option value="2">first option...

jQuery/javascript delete suffix of variable

I have a variable set to retrieve the id of a specific element which is "PubRecNum-1" (the number is also variable and will change depending on the record number). What I'm needing is a way to only take the first 3 letters of the variable "Pub" (needed for comparison purposes). Any ideas? ...