I am developing some JavaScript that should work with either Prototype.js or JQuery, thus I need some way to identify what is the primary library in use. How can I do that?
I want to be able to show information (HTML basically) over an image when the mouse rolls over the image... I know there is a .hover() jQuery function but am unsure how to use it to get the desired effect.
Ideally when a user hovers over an image it would "grey out" (e.g. layer of 50% opacity black) with some HTML like a title etc etc.
Can someone point me in the right direction or provide sample code
Thanks
Hi,
I am executing the following javascript on my browser(firefox)
1.console.debug("Screen height = "+ screen.availHeight); //output 770
2.console.debug("Window Height ="+ $(window).height()); //output 210 (i am using jQuery as well)
What is the difference between the two? Are units of 770 is pixels and 210 is mm ?
Similarly, when I write $(document).height() and $(window).height() , there is a difference . What is the reason ?
I am trying to make a javascript function (although jquery is perfectly OK) that will return a number that corresponds to the number of checkboxes checked in a form. Seems simple enough but I can't figure out a good way of doing it.
Thanks.
I have an issue with menu dropdowns that use JQuery. Take a look at my menu. Hover over 'Acrylic Awards', then 'Award Plaques', then 'Crystal Awards'.
http://www.blackacedesign.com/
Anyone know what causes this issue in IE8? And how I can fix it?
Hello all,
How do I remove numbers from a string using Javascript?
I am not very good with regex at all but I think I can use with replace to achieve the above?
It would actually be great if there was something JQuery offered already to do this?
//Something Like this??
var string = 'All23';
string.replace('REGEX', '');
I appreciate any help on this.
is it possible to in-place replace the entire html document?
i tried jQuery("html").html("....")
but style information does not survive.
i'm trying to avoid using data uri because i do not want the generated document to be stored in the browsers history
Am a newbie to programming and have seen examples on dragging and dropping items from one list to another list using jQuery. My problem is that my list is populated dynamically and so i cannot predefine the list items. Can anyone provide a solution to this? Am working in Visualforce.Thanks in advance.
I have 4 mysql tables and have a single query with JOIN on multiple tables and I am requesting it via jquery ajax, but it takes to much long time from about 1-3 minutes while I want to execute them on average 2-5 seconds.
is there any special way to execute the quries fast
Hi,
If you ever visit dzone.com you'll notice that all the posts appear on 1 page only. When we scroll that page down, older posts will be added to the end of the page (and maybe some posts at the beginning of the page but outside the view port will be removed).
My questions are:
- how to know if the user scrolls down/up with javascript/jQuery?
- how to know if the user is at the top of the page (they click Ctrl + Home)?
Thank you.
I'm using Facebox, and when I tried to change the content of a tag, it's giving me raw HTML but the rendered form, the code snippet is:
jQuery('#facebox .content').html("<%= escape_javascript(render :partial => 'form')%>");
Anybody has any idea about this? Thanks a lot.
I remember having used such an event, but I can't remember the name.
The specific task I'm trying to accomplish is to stop my slideshow when the browser window isn't in the foreground. I'm fading the different images with jQuery, which uses quite some CPU power.
Is there an event that tells me, when the user switches to another application / page.
Did not have luck with these examples:
Javascript File remove
Javascript FSO DeleteFile Method
Deleting a File
There are no special permissions on the file.
Is there a way to do this in JQuery?
The requirement is - a certain file must be deleted from the web directory when another page is loaded. There is no security issue as this is on a closed network.
Any help is appreciated.
Thanks.
i am doing a jquery back end search of data from a DB table..until i fetch the data from the table...how do i show am image like every where its shown like searching or something like tht
The question was asked to me in an interview.
How to find which element is clicked by the user in the DOM using JQuery or Javascript or Both?
NOTE: User can click on any element in the DOM whether it is an img, div or even span.
If you can suggest some example then it will be very much helpful.
Thanks in advance
I'm trying to build a pager where it's just Next / Previous buttons that call a jquery function that post a JSON request. Inside the function, the current page "index" is retrieved from a hidden field and passed to the controller. Inside the controller, I reset the index if I'm on the last page of data. How would I pass the new index value back to the view? Or is there a better way to do what i'm trying to do?
Thanks
I often saw this code in jQuery.
$('div').action1().delay(miliseconds).action2();
I could realize it in one level action in the following code.
function $(id) {
var $ = document.getElementById(id);
$.action1 = function() {
};
return $;
}
How to write the method delay() and action2() so that I could use them this way?
$('div').action1().delay(miliseconds).action2();
I have a background image on top of which there is some text.
It is very hard to read the text because of the background.
I would like to add a white background just around the text itself, such that the text could be easily read. How can I accomplish this using CSS/Javascript/jQuery ?
i have a parent window and a child window. in javascript, i want a function in child window to be called whenever the parent window loads a new page. i'd like to use something similar to jQuery's $(document).ready() so that I don't have to worry about whether the parent is done loading yet - but ready() only appears to fire when the window loads the first page - but not when, say, a link is clicked in the parent and it loads a second page.
any suggestions? thanks.
I need to stop all the page redirection thro' javascript.
I have some script which will redirect the page to some other location.
How can i stop all the page redirection in my page thro' jquery or javascript.
Hi,
I Want a php code to turn a youtube/dailymotion/vimeo/metacafe... URL into an EMBEDABLE code so i can show it using echo , it is really hard to read the API of every website, so i'm wondering if there is a class or code to do this.
Note: if there isn't anyone, then maybe a jQuery facebox alternative who supports more than youtube.
Thanks
Hey,
I've got a repeater which is placed inside an updatepanel. When the user enters a new value, the repeater is updated without a postback. Is it possible to get the row that was updated in JQuery so that I can place an effect on it to make the change less subtle? For example, I'd like to fade a new color in on just the row that was changed.
Thanks
i am trying to find a way using javascript or jquery to write a function which remove all the html tags from a page and just give me the plain text of this page.
How this can be done? any ideas?
How do I come up with this, the sidebar and the top sliding bit:
Apple iPad Page
Scriptaulous or jQuery, etc.
I'd like this for one of my pages on my website to do the effects on load.
Thanks :)