jquery

Append #hashtag to link in HTML on the fly

Ok, I don't know if this is possible, but I hope it is. I have a nav, each link in the nav just appends a hashtag on the existing URL when clicked, for live filtering, etc. with the use of jQuery. I want to append the SAME current hashtag to a series of links within a div further down the page. For example, I've clicked "work" and my...

Hacking Vertical Scroll into Horizontal Scroll

I know this goes against every usability rule in the book, but does anyone have any ideas for forcing a vertical scroll to scroll horizontally? So if: The user was viewing the page, and scrolled downwards, the page would scroll horizontally? Thanks! ...

Triggering the return key on event unexpectedly refreshes page and gives undefined error - JavaScript

Hey all, When I click in field, type text, and press return on keyboard it triggers the initializeTable function that refreshes page and gives error form[0] undefined. However, when I use change event to change dropdown selection, it doesn't cause this unexpected behavior. So I'm not sure why pressing return key in text field is causin...

What's the difference between .delegate() and live()?

Since $("table").delegate("td", "hover", function(){ $(this).toggleClass("hover"); }); Is equivalent to the following code written using .live(): $("table").each(function(){ $("td", this).live("hover", function(){ $(this).toggleClass("hover"); }); }); according to jQuery API. I bet I'm wrong but isn't it the s...

JavaScript opacity Anti-aliasing bug in Internet Explorer

I have encountered an annoying bug with internet explorer on a javascript animation I made. I have a greyscale image of a city skyline which fades its opacity to 0, revealing a full-color skyline. It looks great in all other browsers, but IE reveals artifacts. (around the taxis, and the barr+barr text). A friend told me this is because...

prepend after element

Is it possible to prepend after a certain element? For example, I am prepending a hyperlink to a div however there is already an element in there represented as <a id="test">test1</a> Is it possible to prepend the test2 hyperlink after the test1 hyperlink? $('div[id='+id+']').prepend('<a id="test">test2</a>'); ...

jquery tools .onSuccess

Can someone point me in the right direction on this? I am using Tools as a validator but wanting to execute the ajax submit function that I have ONLY IF ALL validation passes. I have a working validation script here that works, and an ajax call that works; but I'm having a time trying to figure out how to get them to work together. How ...

Help with JQuery accordion?

Hi everybody, I'm having a little trouble putting a JQuery accordion into a site. I feel like I'm doing everything right, but it is not working properly. I have put the site up, with some simple Lorem Ipsum text in the accordion. If anyone can help, it would be greatly appreciated. Here is the link: http://www.catanesedesign.com/tes...

How to make div item stack

I have the following code that works fine i am trying to get the items to stack when they get moved into boxA. How would i go about that? $(function () { $("#sortable").sortable(); $("#boxA").droppable({ activeClass: 'ui-state-hover', hoverClass: 'ui-state-active', drop: function (event, ui) { ...

toggle div fills up remaining space in IE but not google chrome or firefox

I use the toggle function for jQuery to toggle 4 blocks of content. Screencast of how it works properly in Google Chrome: http://screenr.com/w8l Screencast of how it does not work, in IE 7: http://screenr.com/I8l See page for yourself: http://www.herkimer.edu/impact For each header (h2) you click on, it starts the section on a new li...

jQuery count that includes all chars including ENTER, etc?

I know that usually you want to strip these out, but I need the true char count and I can't find out how to get it... Thanks for the help ...

calling jquery function from a dropdown list

I have the following dropdown list box: <select name="DDLConditional1" size="1"> <option selected="selected">is equal to</option> <option>begins with</option> <option onclick="ShowBetween();">is between</option> <option>is not equal to</option> <option>is greater than</op...

Inserting html with jquery doesn't work

I'm building a simple shoutbox. Here's the html : <div id="shoutbox"> <form method="post" id="form" class="shoutbox-form"> <table> <tr> <td><label>User</label></td> <td><input class="text user" id="nick" type="text" MAXLENGTH="25" /></td> </tr> <tr> ...

jqGrid data stored in browser cache?

Does jqGrid store grid data on the file system? If so, do you need to clear the browser's cache to remove it? Or is it just stored in memory by JavaScript (and the browser)? Would just closing your browser remove the data? Do the answers to these questions change depending on whether you are using loadOnce? ...

JCarousellite does not work from within Fancybox

I have have a link that opens up a Fancybox(also tried Colorbox) to an image gallery page. This gallery page uses jCarousellite for thumbnail navigation then loads the large image using an ajax call. When i access this gallery page directly, everything is peachy and all the JQuery fires correctly. When i load it using Fancybox, none o...

A potentially dangerous Request.QueryString value was detected from the client when sending html markup from jquery post call to asp.net page

I m making an ajax call using jQuery to an asp.net page which acts as my ajax server page to save the data which i am sending to it in the querystring. in the asp.net page when i am trying to read the querystring i am getting this error A potentially dangerous Request.QueryString value was detected from the client... I have set the V...

jQuery start typing between tags

I am making a WYSIWYG editor, what I want to do is preventDefault on the enter key, and instead, when enter is pressed, it creates a new line, with tags <div></div>. So essentially each <div> is one line. I don't know how to create the <div> and have the pointer start between each <div> like this: <div>Line one here</div> // Press enter...

When should Page.Header.DataBind be called?

I'm trying to resolve correct paths to javascript scripts in my head section using: <script src="<%# ResolveUrl("~/Scripts/jquery-1.4.2.min.js") %>" type="text/javascript" /> In order to resolve the path I need to call databind using Page.Header.DataBind(); What event should I place the databind call in? Thanks. Reference: http://l...

jQuery find attribute from url hash

Trying to find the attribute value from a url hash. // URL http://url.com/index.html#link // HTML <a href="#link" rel="3">Some link</a> // JS var anchor = window.location.hash.substring(1); // Need help finding attribute value from finding the anchor var attribute = .find('#+anchor').attr('rel'); //this needs to have a value of 3 Al...

Jquery selected options in conditional statements

I'm trying to display some text in a div named "msg_box" for each selected option. It works but not live. I have to refresh to see the result. The js is.. $(function() { switch ($('#my_options :selected').val()) { case '1': $('.msg_box').html('You selected option one'); break; case '2': $('.msg_box').html('You selected option t...