jquery

Sort masonry jquery plugin script

trying to sort the masonry jquery plugin like vgrid plugin heres the test page http://syndicutsite.syndicut.com/index2.htm what i want to do is when the filters are clicked is sort the items so they alternate by there height. in the vgrid plugin they have this code , any ideas how i can add this to masonry 'vgsort: function(func, ea...

ASP.NET MVC 2: Where to put custom JS files?

Hi there, what is the recommended place to put .js files - not really talking about jquery etc.... but my own custom js files.. The scripts directory seems to contain ajax, jquery etc... So is this the correct place? OR would a better place be COntent? I also was doing a search and saw some arguments for placing the JS files in the V...

jQuery Hover problem in plugin

Hi, I have this code somewhere in my plugin: $('tr', $this).hover(function(){ var cur_color = null; cur_color = $this.css('background-color'); $this.css('background-color', options.tr_hover_bgcolor); }, function(){ $this.css('background-color', cur_color); }); Above, $this refers to wrapped set or table as an example. The code ...

pass var to function() js with jquery

hi there, Just looking for the best practise way of doing this. I have a table listing information and in the last column is a button with "Edit/View". When the user clicks on the button a div area appears with more information which can be edited Code below with some fragments of jstl <script type="text/javascript"> //Click on Edit/V...

Modal Alert box for iphone using Jqtouch

Hi All, I am developing sample i-phone web application, i am stuck-up with creating alert box using jqtouch. Does anybody knows about to create sample modal alert box doe iphone. I don't want to use the existing JavaScript alert due the tile bar problem. Any sample code or ref link available? Thanks in advance Jonson ...

Javascript multidimensioned isset()

When running: if (data.custaccount.webaddress) { alert('found it'); } I get the error data.custaccount is undefined The only way i can get around it seems to be with multiple IFs like so: if (undefined != data && undefined != data.custaccount && undefined != data.custaccount.webaddress) { alert('found it'); } Is there any...

Json callback problem

I'm trying to get a greasemonkey's script to work jquery and json. this is the json url http://www.sora101.net/auction.php?id=1&amp;callback= this is part of the script $.getJSON("http://sora101.net/auction.php?id=1&amp;callback=?", function(data){ alert(data.id); } ...

Access to selector from sub function?

Let's say I've created this plugin: $.fn.my_namespace = function() {} with level 1 sub functions: $.fn.my_namespace.category_func = function() {} and level 2 sub functions (actual application): $.fn.my_namespace.category_func.app_func() { alert(this); alert(this.selector); } Execution: $('div').my_namespace.category_fun...

alternate row table in jquery

Hi All, How to create below mentioned table structure in jquery/javascript: <table> <tr> <td> one </td> <td> two </td> <td> three </td> </tr> <tr> <td> single </td> </tr> <tr> <td> o...

Standard way to append multiple new elements and register a click event for each (jQuery Beginner!)

I'm a jQuery beginner. I'm adding a bunch of new images into a div. I'd like each of these images to respond to a click. My initial, and in hindsight foolish code, looked like this: for (var i = 0; i < 10; i++) { $("div#stargrid").append("<img class='clickme' src='http://placehold.it/90x90' alt='90x90 placeholder image' />").click(...

Any jQuery plugin that could replace html select tag?

It's nothing new - select tag looks damn ugly. Is there nice jQuery plugin out there that could replace it with ease? ...

jQuery AutoComplete Dependency Cache Issue

I'm using the jQuery AutoComplete plugin to pre-fill a field called 'Model' depending on the name of a 'Car' entered in a previous field. However, if the user types in 'C' in the 'Model' text box, and then changes the manufacturer and types 'C' in the Model text box again, the same models appear. I believe this must be a cache issue wit...

jQuery jqPlot defining x-axis as quarterly segments when data is retrieved and recorded daily

Hi, I was wondering if the following scenario is possible in jqPlot. The chart i need to build has y-axis displaying price data and x-axis displaying time series data. The data will be retrieved on a daily basis but i would like the display along the x-axis to be in quarterly segments so Q1 conatins all daily data from 01/01/2010 to 3...

find nesting depth

So, take this html for example: <ul> <li> <a href="#">Test</a> <ul> <li><a href="#">Test</a></li> <li><a href="#">Test</a></li> <li><a href="#">Test</a></li> <li><a href="#">Test</a></li> </ul> </li> <li> <a href="#">Test</a> <ul> ...

Ajax Reload iframe

How can I reload iframe using jquery? //Reload Iframe Function Reload Thanks in Advance ...

Jquery return post data

Ok so I have this function: function getAreas(){ $.post("/custom_html/weathermap.php",'', function(data){ return data }, "json"); } which works fine. now what I am trying to do is to pass the data back to a variable, in other words: var data=getAreas() but it doesnt return anything....

jQuery slideToggle, show/hide speed

Is there anything in jQuery that allows you to specify the speed of a show/hide effect (as opposed to its duration). Thanks. ...

Clearing Value on Multiple Inputs?

I have a jQuery script below that clears the value of an input on focus and puts it back on blur if the input remains empty. It works great, but here's the problem: Let's say I have 3 input fields on the same page. I click on the first one with the value "Name", defaultValue variable becomes "Name" and the field clears. If I click out, ...

Razor View Engine and jQuery

Hi, does anybody know how to force Razor View engine to print exact line which is under foreach loop. Code follows : @section head{ <script type="text/javascript" src="@Url.Content("~/Content/Scripts/jquery-1.4.1.js")"></script> <script type="text/javascript" src="@Url.Content("~/Content/Scripts/jquery.progressbar.min.js")"></script> ...

jquery problem with animate function

Hello., I animate a div with jquery. You can see my animation here. On the bottom of the page you click on the call me button. Now you see a animation that i make with jquery. http://www.mikevierwind.nl/test/ Now my animation going wrong. I used this jquery code for the animation. nieuwsbrief_formulier_open = true; $(this)...