Hello
I want to generate a preview thumbnail image of a web page using the link for the page. How can i do this? I'm comfortable with C#.NET, Javascript/JQuery.
Regards
NLV
Is it possible? even better, is it possible with jQuery?
I need to know whether use click back button or forward button so I can use page transition effect correctly, eg. slide from left - right if they hit forward and vice versa.
There are various ways to bind events to elements in jquery
.click , .bind, .live, .delegate, saving events data in .data etc
which is the most superior method among these and why?
wouldn't a single pattern like this be more beneficial?
$('selector').bind({
event: 'click mouseover ...',
keepAlive: (true, false, ...),
trigfunction: (function() {
// I run for click
}, function() {
// i run for mouseover
}, function() {
///...
})
});
I'm looking for a jQuery plugin or a standalone script that will take a javascript object and create a navigatable tree like the FireBug plug in does.
Does this exist, or will I need to write one? Googling hasn't found much yet.
jQuery has handy .height() and .width() utilities to get calculated displayed size of a DOM element. It also has .position() to get coordinates. In YUI3 Node, I see that there are .getX(), .getY() and .getXY() utilities to get position, but I do not see anything for size (or can't look).
What's a good way to get element height and width in YUI3?
I am creating autocomplete functionality on an input tag using following code.
$('.query').autocomplete({
serviceUrl:'http://localhost/main/finder.php',
minChars:2,
delimiter: /(,|;)\s*/, // regex or character
maxHeight:400,
width:400,
zIndex: 9999,
deferRequestBy: 0, //miliseconds
onSelect: function(value, data){
}
});
Now the problem is my input element is added dynamically so for first input tag autocomplete is working but when i add one more input tag then it fails for the second one.
so i need some facility that live() provide in jquery ...
please do post the solution
Hello,
I am using Google Docs in my project using its API.
I am loading docs in modal window iframe using http://fancybox.net/ a jquery plugin
It works fine but when in Google Docs Save and Close button is press, it closes the iframe and redirects the current page to Google Docs, So is there any way I can prevent the redirection to Google Docs and just close the modal window?
Thank You.
I have an div Element with the ID mypointer, wich has an absolute position. I animate this div on a page with jquery. The goal is a presentation where the elements show the same reaktion on the div element like the mousepointer. So I want to simulate mouseover, click and rightclick events.
Is that possible? Can someone give me an example which show me how to do that?
Thank you for your answers
Lara
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on.
So the page can refresh to see that there is a valid login session for that user.
Is this possible w/ jQuery?
I want to count the total divs inside a container and toggle their visibilities with structure like this. Please also note that the div.content may also reside inside another nested or even nested-nested containers. That's why I handle it with jquery to add div.topmost for each topmost parent container:
<div id="parent">
<div class="counter">There are 3 div.contents inside the container below</div>
<div class="container">
<div class="content"> 1 </div>
<div class="container"> <!--container inside container -->
<div class="content"> 2 </div>
<div class="content"> 3 </div>
</div>
</div>
<div class="counter">There are 5 div.contents inside the container below</div>
<div class="container">
<div class="content"> 1 </div>
<div class="content"> 2 </div>
<div class="content"> 3 </div>
<div class="content"> 4 </div>
<div class="content"> 5 </div>
</div>
</div>
And the jquery:
// only grab the top most container
$('#parent > .container').addClass('topmost');
var topMost = $(".topmost");
var totContent = topMost.children('.content').size();
if (topMost.length > 0) {
topMost.before('<div class="toggle">There are ' + totContent + ' div.contents inside the container below</div>');
}
topMost.hide();
$('#parent > .counter').click(function() {
$(this).next('.topmost').toggle();
//alert(totContent);
return false;
});
But I can't make it work to loop for each div.counter. The counter always shows all div.content. So placing the each function is suspected to be the problem.
Any hep would be very much appreciated.
Thanks
Hey,
I'm developing an blog using ASP.NET, and I want that the user can be able to add comments.
So I want to implement the idea of facebook on adding comments.
The comment will be stored in the database, so I will be able to load it with the page if the user goes to another web page.
You have any idea how can I do this thing ( Ajax, Javascript, jQuery, Ajax Toolkit ) ?
If I have a beacon:
<img src="http://example.com/beacon" />
I want a method to be called once the beacon request finishes. Something like:
<script>
$("img.beacon").load(function() {
// do stuff knowing the beacon is done
});
</script>
Is it possible? Is it in jQuery?
I have a function that issues an AJAX call (via jQuery). In the complete section I have a function that says:
complete: function(XMLHttpRequest, textStatus)
{
if(textStatus == "success")
{
return(true);
}
else
{
return(false);
}
}
However, if I call this like so:
if(callajax())
{
// Do something
}
else
{
// Something else
}
The first is never called.
If I put an alert(textStatus) in the complete function I get true, but not before that function returns undefined.
Hey all,
I was just wondering how do you dynamically resize an input as you type in it??
I'd like to use jQuery if possible & I would rather it be a small script than a bulky plugin.
Please let me know,
Matt Mueller
Hi guys i previously asked a question and got a good solution. here is the question:
http://stackoverflow.com/questions/2536892/jquery-how-to-find-an-element-which-is-comming-2-elements-before-current-element
when im using the solution which i got :
paragrafheading.push($(this).closest('
h3').find(' h3').text());
im getting only [object Object] instead of the element text
Hello, I found this on the web:
$('a[href^=http]:not("[href*=://' + document.domain + ']")').click(function() {
pageTracker._trackPageview('/outgoing/' + $(this).attr('href'));
});
But it's not working. In my Google Analytics account there are no /outgoing/ links showing (it's been 24+ hours since I implemented it).
What's wrong with this code? I'm using jQuery of course ;)
How to give sentence case to sentences through CSS or javascript?
I've tried these CSS properties but these are different
capitalize Transforms the first character of each word to uppercase
uppercase Transforms all characters to uppercase
lowercase Transforms all characters to lowercase
Edit: 19 FEB 2010
is there any option in jquery to achieve this?
I'd like to change language labels used in TinyMCE. E.g. "Überschrift 2" - "Überschrift".
Im using the jQuery plugins version of TinyMCE.
Is there a way to overwrite those labels without editing the label files?
I've managed to write some jQuery to find an element and copy it's html to the clipboard (ie only).
The problem is that when I paste this into a rich text box area in sharepoint it pastes the HTML as text only.
How do i replicate the user action of highlighting a link on a page and pressing copy. When I do this manually and then paste the clipboard contents the rich text area realises that it is markup and replicates the link as an anchor in the text content.
How can I (using jquery or other) insert html at the cursor/caret position of my contenteditable div:
<div contenteditable="true">Hello world</div>
For example, if the cursor/caret was between "hello" and "world" and the user then clicked a button, eg "insert image", then using javascript, something like <img src=etc etc> would be inserted between "hello" and "world". I hope I've made this clear =S
Example code would be greatly appreciated, thanks a lot!
This was added to the page later with jQuery:
<input name="pdfRadio" id="pdfRadioNo0" value="0" type="radio">
This code:
radio_id = "pdfRadioNo0"
ie.radio(:id, radio_id).set()
does not set it but returns an error message:
Watir::Exception::UnknownObjectException: Unable to locate element, using {:id=>"pdfRadioNo0"}
Does watir also find radio butons that were added later?
This is windows 32bit XP SP 3 , IE 7, watir 1.6.5, ruby 1.8.6
I have been writing my first jQuery plugin and struggling to find a means to time how long different pieces of code take to run.
I can use firebug and console.time/profile. However, it seems that because my code executes so fast I get no results with profile and with time it spits out 0ms. (http://stackoverflow.com/questions/2690697/firebug-profiling-issue-no-activity-to-profile/2690846#2690846)
Is there a way to get the time at a greater level of detail that milliseconds in javascript?
Hi,
I've created a menu with jQuery superfish but I'm having problem when drag-drop on one of the top menu items. .sfHover class is added when pressed on a item and if this item is not clicked and dropped item remains with .sfHover class and because of this, background of the item is changed.
How can I fix this problem?
Here is the demo.
Hello all,
I'm trying to read all filenames from a specified (server- not client) folder, and insert all the filenames into a javascript Array.
It should behave like the Directory.GetFiles method in ASP.NET C#.
I created a new array, and I just need the loop method (Javascript or jQuery) to iterate in the specific folder, and insert all the filenames into the array.
Thanks all helpers!