jquery

how to make text color change on mouse over

Page I'm working with is: http://cloudninetech.com/newsite/site/homepage.html Notice the tab slider at the bottom. I wish to make the headings text white when the current tab is selected. I'm not able to do this because I think the color can only be changed by modifying the tabbedContent.js jQuery plugin Can someone suggest a way to ...

Variations of using .data() in Jquery

Would you please tell me, in how many ways jquery's .data() can be used. $("element").data('field','value'); or $("element").data({'field':'value', 'f2': 'v2' }); is there any other way, we can accompany more data like an array or something? ...

jQuery Cycle plugin not generating pager links.

This one has been perplexing me on a couple recent sites I've worked on, and I had to end up going with another solution, but I'm determined to get to the bottom of it this time. Here is the example code from the demo page here: http://jquery.malsup.com/cycle/int2.html $('#s4') .before('<div id="nav">') .cycle({ fx: 'turnDow...

how to drag and drop a div on a website on the iPhone using jquery .

this is my code using jquery-ui , but it can't work on iphone : $("#droppable").droppable({ greedy: true, drop: function(event, ui) { //$(this).find('p').html('Dropped!'); $(this).append($(ui.helper).draggable("disable").addClass('end').find('p')) ...

jQuery AJAX: update two parts of a page with scripts inside the response

Hello, I'm using jQuery AJAX to load (and refresh) a part of my page Here's the jQuery function in my main page: function updateCategories(){ catList = $('#cat_list'); catList.hide(); //send the post to shoutbox.php $.ajax({ type: "POST", url: "../ajax/products-categories.php", data: "action=refresh", co...

Syntax Error? Jquery script not working in IE7

I am using the following code to open a modal box when a button is clicked. Works fine in all browsers but IE7 where I get an error. This is the code. Have I done something wrong??? <script type="text/javascript"> $(document).ready(function(){ var dialogOpts = { modal: true, bgiframe: true, autoOpen: false...

Integrating Tinybox and Tipsy

In index page I have: <head> ... <script type="text/javascript"> T$('signup').onclick = function() { TINY.box.show('externalpage.html', 1, 450, 360, 1) } </script> </head> In external page, I have: <a href="#" id="link" title="link tooltip/tipsy value">Link</a> <script type='text/javascript'> ...

When changing the href attribute of a link using jQuery, how do I reference the current href attribute?

I'm trying to change the href attribute of links on my page. I need the bulk of the url to remain the same but just change a parameter. I've got this so far: $("a[href*='/new_note?']").attr('href', function() { return this.replace(/date1=[\d-]+/, "date1=" + $("[name='new_date1']").val()); }); but I'm getting this error: this.repl...

jQuery script to scale up or down thumbnails on window resize

Hi I have a site with width 100% and height 100% and overflow hidden on the body. So its a fullscreen website using a jquery full screen background image plugin. On one page I have a list of thumbnails, each thumb is set to float left so it fills the entire window with thumb images. With overflow set to hidden, when too many thumbnail...

Is there a way to tell how much of an image is already loaded?

Is there a way to know how much percentage of one image is already loaded? Kind of a onProgress event for the load? So if I would do something like this $('<img/>').load(function(){ $(this).appendTo(some div); }) .error() .attr('src',some source); I could have some progress bar indicating how much of the previous load is complete....

Parse the markup received after an ajax call?

Hello, I am doing an ajax call to a server side function that returns an html response made only of two DIVs, like for example <div id="divOne">text on divOne</div> <div id="divTwo">text on divTwo</div> Can I parse the markup response to extract only the text part included in the DIVs? ...

jquery offset method doesn't seem to return whole numbers

Hi there, When using jquery's offset method on an element to get its top offset from the document, it returns me the following for example: 1150.3999938964844 Is there a reason why it does that, and doesn't return a whole number? Thanks ...

Find default selected option in HTML select tag?

I found code online to clear a form but it had nothing for a select box. With jquery i tried adding code to select the default option in the select box when i reset the form. I figured the only way to find the default was to look for where the SELECTED option was. I then discovered when the user selects something else jquery does not see...

How to focus main web page after opening a new window?

I want to be able to focus the original page after opening a new window/tab, the same way as it's done on this website: http://www.vouchercodes.co.uk/laredoute.co.uk ...

Running code on page loaded?

Hi, I have a MVC view that contains some dropdowns like this : <%: Html.DropDownListFor(model => model.CS.C1, Model.CS.Category1List, "-- Välj kategori --")%> <%: Html.DropDownListFor(model => model.CS.C2, Model.CS.Category2List, "-- Välj kategori --")%> <%: Html.DropDownListFor(model => model.CS.C3, Model.CS.C...

changing form post

I want to change form post data before send. i use some java script code to get some user inputs and want to attach those to request post data. I wanna a normal post that cause to display result as a an HTML page. its may be useful that i linked JQuery and can use its functions. Thanks very much! ...

Can't figure out why Chrome/Safari can't get the ScrollHeight right here

I just asked a question about why a certain js code won't work in Chrome and Safari 100%, but after more troubleshooting I think I have found out that this is the question I should be posting. I have a page which has a form in it. This form's target is an iframe on the same page. The iframe is dynamic, and php based. This is the bottom...

Selector based on text between tags, in Jquery

I need to retrieve data from the DOM, but the containers have no a specific class or id, and sometimes they are not all available. So I could find this: <h2>name</h2> <p>john</p> <h2>address</h2> <p>street 1</p> <h3>email</h3> <p>[email protected]</p> or this: <h2>name</h2> <p>john</p> <h3>email</h3> <p>[email protected]</p> As you can s...

jquery hover menu and back button

I have this code, but when I click the back button in the browser the menu is still visible and it's class still is 'show' $("#courses > a,#masterclasses > a,#the-team > a").click(function (e) { e.preventDefault(); }); $('#courses > a,#courses-nav').hover(function(){ $(...

jQuery keyup and 'enter' in Safari

I am using jQuery and want to make it possible for the user to hit enter after entering data into a search field to start the search. I'm using the following code: $('#textSearch').keyup(function (event) { if (event.keyCode == '13') { doSearch(); } return false; }); ...