jquery

if isset SESSION display div

How do i do in jquery, to check if there's anything in isset SESSION user_message, each 1 seconds, and if there is then display #box else dont.. thanks ...

Find out divs height and setting div height

Hello, Im quite new javascript/jquery stuff, but i would like to do this kind of thing with it: I have four divs side-by-side like this and content in each one. Now if one has more content it gets streched higher. I would like to make the other divs as high too even if they dont have as much content. So basically i want the script goes...

Embed YouTube video with jQuery in IE6 without SWFObject

Here's my code. <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; <title></title> <script> $(document).ready(function(){ $("#video").html('<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/HPPj6viIBmU&amp;hl=en_US&amp;fs=1&amp;"&g...

Custom JQuery Slideout issues with width, etc.

I'm more of an HTML/CSS guy than JQuery, and I've been struggling with building this concept for a while. I want to get it finished so that I can freely release it as a psuedo-plugin. I'm happy to credit anyone who can give me a little guidance, I think it's mostly there. First, my demo is at http://demindu.com/sandbox/. Issues: 1)...

jquery postback focus

On my pages after a postback I am trying to return focus to a previously focused element $(window).load(function() { $('.focus').focus(); }); $(document).ready(function() { $('input:not([type=button],[type=submit]), select, textarea').focus(function() { $(this).addClass('focus'); ...

Color of placeholder text in an input field

I have an input field which has a placeholder text. I want one word to be a different color say red, how would would I go about that? Styling a span and surrounding the word with the span didn't work. For example on this site, I want to the number in the phrase "Search 649 radio stories" to be red. http://66.251.226.207/library ...

Dynamically add jQuery Datepicker

Hi This is reg.. JQuery Datepicker.Any one having example progam that one add datepicker to dynamically created row.give some tips wat r the i need to include js/css files.and give suggestion how can we add datepicker to dynamically created row for textbox. ...

IE browser caching and the jQuery Form Plugin

Like so many lost souls before me, I'm floundering in the snake pit that is Ajax form submission and IE browser caching. I'm trying to write a simple script using the jQuery Form Plugin to Ajaxify Wordpress comments. It's working fine in Firefox, Chrome, Safari, et. al., but in IE, the response text is cached with the result that Ajax i...

JQuery: How to get all of a selector's html attributes in one statement, as a string?

Hi all, I've got a div that looks like this: <div id="exampleDiv" class="class1 class2" title="example title"></div> I've selected with JQuery using this statement: var $div = $('#exampleDiv'); What I'd like to get is a string of the tag itself as html, so that I actually get: "<div id='exampleDiv' class='class1'....", etc. Doe...

Do I have to duplicate this function? - jQuery

I'm using this function to create an transparent overlay of information over the current div for a web-based mobile app. Background: using jQTouch, so I have separate divs, not individual pages loading new. $(document).ready(function() { $('.infoBtn').click(function() { $('#overlay').toggleFade(400); return false;...

Is this the best way to do this?

I have a navigation bar that has two dropdowns (as nested ul's). I'm trying to toggle the subnavs when its parent is clicked. Or hide one subnav when the other parent is clicked. Here's the markup: <div id="nav-bar"> <a href="#">A link</a> | <ul> <li id="feedback"> <a href="javascript:void(0);">Feedback</a> <ul class...

Sending a complex object as parameter to Asp.Net PageMethod

I am trying to send an object created in JavaScript to an ASP.NET PageMethod. This object mirrors the properties of an existing custom business object, so i was hoping that i could pass a single object instead of a parameter for each property. I am getting an error "Unknown web method SavePart when attempting to use this method. Javasc...

"Append if doesn't exists" in jQuery

I'm trying to write a helper function for jQuery that creates an element if it doesn't already exist. So far I have: function setup(element, parent){ if($(parent).child(element).length == 0){ $(parent).append('<div class="'+element+'"></div>'); } } but I'm wondering if this isn't a solved problem. Is it? (The reason I want th...

jQuery plugins scrollTo and scrollLocal not working on IE

I'm using the following jQuery plugins (along with the jQuery plugin): <script type="text/javascript" src="scripts/jquery.scrollTo-min.js"></script> <script type="text/javascript" src="scripts/jquery.localscroll-min.js"></script> <script type="text/javascript" src="scripts/custom.js"></script> When I click this anchor link: <a hre...

What is the difference between these two ways of returning a JSON object?

I'm playing around with the jQuery Week Calendar and am trying to get this to work, but I can't figure out why this is throwing an error. The calendar has a method that returns a list of events to populate itself with. The method (which uses preset events for demo purposes) looks like this: function getEventData() { var year = n...

jQuery to parse JSON

I'm trying to parse the JSON returned from SocialMention. Here's an example of what the JSON looks like: {"title":"Social Mention","count":100,"items":[{"title":"RT @Jason_IIATMS: More Damon-isms that'll make you wanna puke: \"Let's hope the Chinese are right when they say this is the year of the tiger!\"","description":"","link":"htt...

Telerik and jquery

I'm working on an application I received from a client and they've used some telerik web controls. Telerik apparently includes its own version of jquery 1.3.2, while I'm using 1.4.1. I'm experiencing some weird javascript issues and I'd like to rule out the older jquery as a source of the problem. Is there a way to tell the Telerik contr...

How can I emulate the Jquery UI API?

I've written basic jQuery plugins before, but I'm struggling to get my head around something more complex. I'm looking to emulate the API of jQuery UI, which works like this: $('#mydiv').sortable({name: 'value'}); // constructor, options $('#mydiv').sortable("serialize"); // call a method, with existing options $('mydiv').sortable('opti...

Getting root node attribute, jQuery/XML

Hello, this is probably so trivial that I'm ashamed to be asking this... Why in the world is this not working? <?xml version="1.0" encoding="UTF-8"?> <filter id="4" max_values="10"> <value id="9">strategy</value> <value id="11">simulation</value> <value id="12">shooter</value> </filter> This is the xml response I get when...

jQuery : Running script in the address bar

In most web browsers, you can execute JavaScript in the address bar (i.e. javascript:alert('Test'); Is it possible to execute jQuery in the address bar? ...