jquery

javascript Document ready firefox (jQuery)

In FireFox I have this jQuery at the end of the body: $(document).ready(function() { $.getScript('LiveMapsJavascriptProvider.aspx?type=reference&value=6', init); }); There are a lot of js files in the head that are needed to be all loaded before this would work. So I put my call in a document.ready event. It doesn't work. IE work...

jQuery How to Hide DIVs, they are Showing for a Split Second on page Load

Hi, I have made a very quick jquery slideshow, and i'm using this to hide the DIV's which shouldn't be shown until it's their turn obviously: $(document).ready(function() { //Hide All Div's Apart From First $('div#gall2').hide(); $('div#gall3').hide(); $('div#gall4').hide(); But on loading the page you can see DIV's gal...

jQuery storing and referring to an array of items

I'm not exactly what I'm looking for in jQuery/Javascript terms. The behavior I'm looking for is akin to your typical lightbox slide show with the following elements: a list of items clicking on an item will bring up a new element that references the item in the list while the new element includes next/prev navigation that refers back ...

iFrame in jQuery UI dialog causes horizontal scrollbar on parent

I'm using the jQuery UI dialog to present content in a new iFrame. Everything works out great except that the parent window of the dialog is getting a horizontal scrollbar while the dialog is displayed (IE8). I've tracked down the problem to the <html> element within the iFrame being interpreted as very wide by the browser, even though...

How to integrate CKEditor into Asp.net MVC

Saw this post at CodeProject for FCKEditor. Can someone explain what about the new version? Thanks! ...

Change Menu Styling on fly or pass a param inside jQuery .each iterator

I have a bunch of menu links and want to change their style on click - say you click "about" and it becomes bold and red. I select the items and bind click event to them: $("#nav_menu > *").bind("click",function(){doTrigger(this.id);}); this way I pass the ID of the clicked item to doTrigger. Ok. Now in doTrigger I am trying to itera...

jQuery picture load

Hi everyone, I need some help in jQuery. What I want to do is to create some kind of a small, very, very easy picture gallery. I want to have a couple of small pictures on the left-hand-side of my page. By clicking one of these small pictures I'd like to load this picture into another div where it is shown in full size. <a href="ima...

jquery click question

i have an issue. the code is this: $("#button").click(function(event){ $("#threads").html("hi"); }); when i click the button, the text "hi" is just shown in 1 sec. then it disappear. i want it to always be shown after i have clicked. how can i do this? ...

Why does jQuery use "new jQuery.fn.init()" for creating jQuery object but I can't?

I try to create some class based-on jQuery style like the following code. myClass = window.myClass = function(x, y) { return new myClass.fn.init(x, y); }; myClass.fn = myClass.prototype = { init: function(x, y) { // logic for creating new myClass object. } }; I do not understand why jQuery use new keyword for...

Hierarchical Grid with MVCContrib

I am trying to come up with the best solution for creating a hierarchical grid in my ASP.NET MVC project. First, I looked at jqGrid, and found it's "treeGrid" option which is exactly what I'm looking for. However, from what I can tell, jqGrid is not free, and my client is not interested in purchasing a license for it. To get an idea o...

send variables from php to jquery?

ive got a forum. when i click on a thread it passes GET variables through URL to another php page that displays that thread. url?threadid=10 and ive got a reply form in the bottom. when the user click submit reply it will execute jquery that call a php through ajax. i have to pass the threadid variable to the ajaxcalled php file but ...

Filter results with Jquery

Hi, I've created a search form for a script in php. Basicaly this form have some checkboxes and a submit button. Each checkbox is a category, if I check one or more checkboxes the result is filtered by thoose categories. Here is the html code: <?php if ($_POST['do_search'] == 'true') { $results = 'Do the query and store results in the ...

jquery, submit form when field loses focus

How can I submit a form when a field (In this case the form only has one field) loses focus? I tried this, but it's not working: $("form").submit(); UPDATE I forgot to mention that the form was created with jquery as well: $("div").html('<form action="javascript:void(0)" style="display:inline;"><input type="text" value="' + oldValu...

jQuery AJAX Post not working

I cant not figure out why this script doesnt work. It has to do with something within the AJAX POST script/function. Right now, when I hit submit on my form it runs the php code on the same page. What it should do it is send the values of the form to project_ajax.php, then at page will return a var of success that will be true or false. ...

[jQuery] Why is $(document).ready not firing for me?

In a php file i have used include to include the following js.php file and prior to that i have included the jquery file. <script type="text/javascript"> $(document).ready(function(){ alert("hello"); }); </script> But it doesn't work. Why? when I skip the $(document).ready function it works. But i need jquery code inside. what ...

jquery form BASIC validation question

I am trying to validate a form in that if there is no text in an input field, an error icon pops up... and if ANYTHING is in the input a success icon pops up. There are no true validation methods being used. You can see the form here. As you can see, when you type something in the first field and press tab, the icon pops up correctly, b...

Adding floats with javascript

I'm using jQuery, and I want to sum up the values in my table column, everything seems to work fine, but my value is returned a string with all the values added like: 123.5013.0012.35 How can I sum these properly? var totals $(".add").each(function(i) { totals += parseFloat($(this).text()).toFixed(2); }); console.log(totals); ...

jquery: firefox cant find id tag but safari can??

this problem is so weird. i have used jquery to link a specific id to an alert("hello"). $("#submit_reply").live("click", function() { event.preventDefault(); alert("hellooooo"); }); now in safari when i click it works. but when im using firefox its not working. the submit_reply (a submit button) refreshes the whole page. tha...

jquery each leave early

Hi, I have a jQuery for-each loop on an array and wonder if it is possible to leave the loop early. $(lines).each(function(i){ // some code if(condition){ // I need something like break; } }); break; actually doesn't work, for a reason. If I'd write a for-loop it would look like that (but I don't want t...

jQuery: is mouse still over the element?

Hello, I would like to be able to detect if the mouse is still over the element in the following scenario: If mouseover then sleep for a few seconds. Once done sleeping check of the mouse is still over the same element. If true then do something. How can I achieve #2? Thank you. ...