Skip to main content

Posts

How to scroll down with jquery when user reached a specific part of an image?

It's hard to describe what exactly i was looking for and sorry for my english. What i want to do is, while user scroll down slowly, when user reached a specific point, starting to scroll down page like 1000px and then stop scrolling at the second specific point. Here is an example: http://comic.naver.com/webtoon/detail.nhn?titleId=350217&no=31&weekday=tu It should be cross browser compatible.

Lightbox and dynamic links - how and why does this work?

I had a problem, was going to ask how to fix it, but then the answer popped up in a related question. Seeing I have little experience with jQuery, I would like to understand exactly "what" happens with what I'm doing. FYI: jQuery (latest) + jCarousel + Lightbox. jCarousel creates a few links for me, and Lightbox captures these links and shows a nice frame around the picture I linked. The code that did the trick was $('a.gallery').live("click", function(e) { $(this).lightBox({ imageLoading : 'img/lightbox-ico-loading.gif', imageBtnClose : 'img/lightbox-btn-close.gif', imageBtnPrev : 'img/lightbox-btn-prev.gif', imageBtnNext : 'img/lightbox-btn-next.gif' }); $(this).triggerHandler('click'); e.preventDefault(); }); ..instead of $('a.gallery').lightBox({ imageLoading : 'img/lightbox-ico-loading.gif', imageBtnClose : 'img/lightbox-btn-

Lightbox and dynamic links - how and why does this work?

I had a problem, was going to ask how to fix it, but then the answer popped up in a related question. Seeing I have little experience with jQuery, I would like to understand exactly "what" happens with what I'm doing. FYI: jQuery (latest) + jCarousel + Lightbox. jCarousel creates a few links for me, and Lightbox captures these links and shows a nice frame around the picture I linked. The code that did the trick was $('a.gallery').live("click", function(e) { $(this).lightBox({ imageLoading : 'img/lightbox-ico-loading.gif', imageBtnClose : 'img/lightbox-btn-close.gif', imageBtnPrev : 'img/lightbox-btn-prev.gif', imageBtnNext : 'img/lightbox-btn-next.gif' }); $(this).triggerHandler('click'); e.preventDefault(); }); ..instead of $('a.gallery').lightBox({ imageLoading : 'img/lightbox-ico-loading.gif', imageBtnClose : 'img/lightbox-btn-

How to do this in jquery style

I have this code: <p><label for="mobtel">Enter mobile no.:</label><br /> <input id="mobtel" type="text" name="mobtel"/></p> I hide it using jquery with this: $("label[for=mobtel],#mobtel").hide(); And now I want now is to display a new label and new input that will look like this: <p><label for="mobtel">Enter verification no.:</label><br /> <input id="verification_no" type="text" name="verification_no"/></p> How can I do this in jquery style?

How to do this in jquery style

I have this code: <p><label for="mobtel">Enter mobile no.:</label><br /> <input id="mobtel" type="text" name="mobtel"/></p> I hide it using jquery with this: $("label[for=mobtel],#mobtel").hide(); And now I want now is to display a new label and new input that will look like this: <p><label for="mobtel">Enter verification no.:</label><br /> <input id="verification_no" type="text" name="verification_no"/></p> How can I do this in jquery style?

issue with URL validation MVC razor and JQuery

I am working on MVC Razor. I face an issue to validate URL validation. I need to do URL validation before inserting in temp DB. I got a reference of http://www.regxlib.com/Search.aspx?k=&c=2&m=-1&ps=20 and found one nice validation pattern, (http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])? While i work in MVC view, it gives me error so i have change it to (http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@@?^=%&amp;:/~\+#]*[\w\-\@@?^=%&amp;/~\+#])? i.e. @@ instead of @ when it runs and if i see the console, i got the original one, so i think it is okay for me to do @@ instead of @ But in console i got an error can anyone tell me what is wrong with this, so got the error, "invalid range in character class"

issue with URL validation MVC razor and JQuery

I am working on MVC Razor. I face an issue to validate URL validation. I need to do URL validation before inserting in temp DB. I got a reference of http://www.regxlib.com/Search.aspx?k=&c=2&m=-1&ps=20 and found one nice validation pattern, (http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])? While i work in MVC view, it gives me error so i have change it to (http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@@?^=%&amp;:/~\+#]*[\w\-\@@?^=%&amp;/~\+#])? i.e. @@ instead of @ when it runs and if i see the console, i got the original one, so i think it is okay for me to do @@ instead of @ But in console i got an error can anyone tell me what is wrong with this, so got the error, "invalid range in character class"