jquery

load is not working in jquery, help please

Hi all I am trying to fix one jquery issue my code is <script language="javascript"> $(document).ready(function() { //if the document is ready $('#img').load(function() { //if the image is loaded pic_real_height = this.height; //finding the height of the image $('#i...

Why do I have to use $(this)?

Possible Duplicate: jQuery $(this) vs this In jquery sometimes I find that within a function I have to use $(this) because this won't work: var listItems = $('li'); listItems.each(function(index) { $(this).css({ }) }) Any ideas as to the reason why? ...

Jquery, getting DIV ID as it is being dragged using "draggable"?

I found another post about this but the solution there isn't working for me... I am trying this (having already instantiated the draggable option separately: $( ".masker" ).bind( "drag", function(event, ui) { testdragging = ui.draggable.attr('id') ; }); Just calling this: ui.draggable.attr('id') ; makes the entire class of D...

Find currently visible div in jquery...

I have a four divs all set display:none and on document.ready i am showing the first div.. I have 4 link buttons link1,link2...link4... I showing div1 on link1 click and so on.. How to find which div is currently visible in jquery? <style type="text/css"> .ContentDivs { width: 90%; height: 300px;...

Compare time in javascript

I need to create a function to filter data according to time. I have a table of flights with departure time in related rows, what i need is, i will put to time filter fields to my form, for hiding flights before and after selected time. In other words, flighs bettween selected time interval will be visible. I have no problem with gett...

Is there a way to customize search rules in jqGrid in particular column?

Hi! I have jqgrid : jQuery("#list").jqGrid( { url : 'ajax/get', datatype : 'json', mtype : 'POST', colNames : [ 'Date', 'ID' ], colModel : [{ name : 'date', index : 'date', ...

jQuery/Javascript - Creating a documentation system

Are there any js/jquery scripts out there like this one: http://jqapi.com A left menu that changes the content on the right, with the ability to search it. ...

Is there a jQuery(&:map) function like in Ruby?

I want to get all ids from a collection of items, how can I make this one short line: var ids = []; $(".post").each(function(index, element) { ids.push($(element).attr("id")); }); Something like: var ids = $(".post").map("id"); Thanks. ...

Slider loading after entire pages loads

Hi, I am using looped slider js for implementing a slider in wordpress. Basically i want to add my slider when entire page loads. please help me. I tried lazyload plugin for that but wont get any success. My markup is like this, <div class="container"> <div class="slides" > <div><a><img /></a><a><img /></a></div> </div> </div> Thanks ...

jquery-ui "help: clone" not running on iphone , what should i do .

this is my code: <div class="demo" style="margin:0 auto;height: 100%;"> <div id="A" style="float:left;height:50%;margin:0 100px 0 0;width:100%;background:#333;"> </div> <div id="droppable" > <p>Drop here</p> </div> </div><!-- End demo --> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <scrip...

Accessing a JQuery Options Variable. (To set the cycle = false variable of a JQuery Accordion.)

(function($) { $.hrzAccordion = { setOnEvent: function(i, container, finalWidth, settings){ $("#"+container+"Handle"+i).bind(settings.eventTrigger,function() { var status = $('[rel='+container+'ContainerSelected]').data('status'); if(status ==1 && settings.eventWaitForAnim === true){ return false; ...

Javascript array traversal overwriting key values

Hi, I have a hashmap that I have created to control the events for buttons. It is defined as so: var Signage_Manager = { init: function() { Signage_Manager.buttonActions.set_events(); }, buttonActions: { buttons: { '#add_product': {action: 'navigate', href: '/manager/add_product'}, '.back_to_dashboard': {act...

jquery .change not firing in IE but working in FFOX

I have the following HTML: <form method="post" action="#" name="dialog_head" id="dialog_head" class="jqtransform"> <ul> <li class="pdf"> <a title="This PDF document opens in a new window" target="_blank" href="#">Save as PDF</a> </li> <li class="print"> <a target="_blank" href="#">P...

Closing Colorbox

I have a simple popup (not an Iframe) where a user can send mail to each other. There is a submit button to send the information and a cancel button which should close the overlay. I do have some trouble getting the close button to work. The code looks like this: <asp:Button runat="server" ID="btnCancel" Text="Cancel" /> <script type...

jqGrid: Large grid within a scrollable container

I have a large grid (about 30 columns and 100 rows) which is placed within a surrounding div that allows the user to scroll vertically and horizontally. I opted for this solution as I could not get the grid to scroll correctly out of the box. The grid uses cell editing, and is purely client side except when loaded from or persisted to t...

jQuery: Load Script, but as a <pre><code> block??

I want to load code and display it inside code tags (for syntax highlighting, etc.) like this: <pre><code>alert("javascript loaded");</code></pre> I am doing this in jQuery right now: $.ajax({ url: "/local/path.js", success: function(data) { alert("success"); var code = $("<pre><code>" + data + "</code></pre>"); $("bod...

jQuery is adding a strange attribute to nodes

I'm using IE8 and jQuery 1.4.2. My web page is no longer rendering correctly, and a quick look in the debugger at the HTML shows that every element now has a new attribute called "jQuery1279875396122", whose value is a small integer, apparently unique to each node. Looking at the jQuery source I can see that the long number comes from (...

jquery make variable public from .click

I am trying to pass a variabel from a .click event to a colorbox plugin like so: $('.w_price_assess p.price_report > a').live('click', function() { var $reportRef = $(this).attr('href'); var $reportID = $reportRef.substr($reportRef.lastIndexOf('/') + 1); return false; }); I need $reportID to be visible to an AJAX call ...

need code for counting from string

dear all.. i want after i have been type 123A0001-123A0100 the result is 100. Or if 123A0123-123A0200 the result is 78. how do i do that?please help. thanks before. ...

Using Jquery to expand all answers below question

Hi there, I am trying to work out how to expand all answers below a question when an .allopener span is pressed. Users can currently expand each answer individually, but not all at once. Any tips would be much appreciated. There would be many items on a page. The allopener span button will open up the remaining unhidden .text classes in...