Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* All onReady Event */
- jQuery(document).ready(function () {
- /* Add/Clear Search Text Field onClick/onBlur */
- jQuery('input#s').val('Search');
- jQuery('input#s').each(function () {
- var form_text = this.value;
- jQuery(this).focus(function () {
- jQuery(this).css('color', '#222');
- if (this.value == form_text) {
- this.value = '';
- }
- });
- jQuery(this).blur(function () {
- jQuery(this).css('color', '#999');
- if (this.value == '') {
- this.value = form_text;
- }
- });
- });
- });
- /* All onLoad Event */
- jQuery(window).load(function () {
- /* Flexslider (init) */
- jQuery('.flexslider').flexslider({
- slideshow: false,
- animation: "fade",
- direction: "horizontal",
- controlNav: "thumbnails",
- slideshowSpeed: 7000,
- animationSpeed: 600
- });
- /* Flexslider Bounce Effect */
- jQuery(".flex-control-nav li").hover(function () {
- var e = this;
- jQuery(e).stop().animate({
- marginTop: "-14px"
- }, 250, function () {
- jQuery(e).animate({
- marginTop: "-10px"
- }, 250);
- });
- }, function () {
- var e = this;
- jQuery(e).stop().animate({
- marginTop: "4px"
- }, 250, function () {
- jQuery(e).find(".flex-control-nav li").animate({
- marginTop: "0px"
- }, 250);
- });
- });
- /* Flexslider Wrapping Of Text Inside Main Caption "p" Tag */
- var flex = jQuery('p.flex-caption');
- var text = flex.text().split('\n');
- jQuery.each(text, function (i, val) {
- text[i] = '<p class="inside">' + val + '</p>';
- });
- flex.html(text.join(' '));
- /* Flexslider To Autogenerate And Increment The Id Of Main Caption "p" Tag */
- jQuery('p.flex-caption').each(function (i, el) {
- el.id = 'flex-caption-' + i + 1;
- });
- /* Flexslider To Display Appropriate Values From Required Main Caption "p" Tag */
- jQuery("#flex-caption-51 p:nth-child(2)").css('display', 'block');
- jQuery("#flex-caption-61 p:nth-child(3)").css('display', 'block');
- jQuery("#flex-caption-71 p:nth-child(4)").css('display', 'block');
- jQuery("#flex-caption-81 p:nth-child(5)").css('display', 'block');
- jQuery("#flex-caption-91 p:nth-child(6)").css('display', 'block');
- /* Flexslider Wrapping Of Text Inside Main Caption "p" Tag */
- var flex = jQuery('p.flex-url');
- var text = flex.text().split('\n');
- jQuery.each(text, function (i, val) {
- text[i] = '<p class="inside">' + val + '</p>';
- });
- flex.html(text.join(' '));
- /* Flexslider To Autogenerate And Increment The Id Of Main Caption "p" Tag */
- jQuery('p.flex-url').each(function (i, el) {
- el.id = 'flex-url-' + i + 1;
- });
- /* Flexslider To Autogenerate And Increment The Id Of Main Caption "p" Tag */
- jQuery('.flex-control-nav li').each(function (i, el) {
- el.id = 'flex-nav-' + i + 1;
- });
- /* Flexslider To Display Appropriate Values From Required Main Caption "p" Tag */
- var str = jQuery("#flex-url-51 p:nth-child(2)").text().trim().trim();
- jQuery(".flex-control-nav li:nth-child(1) a").attr("href", str);
- var str = jQuery("#flex-url-51 p:nth-child(3)").text().trim();
- jQuery(".flex-control-nav li:nth-child(2) a").attr("href", str);
- var str = jQuery("#flex-url-51 p:nth-child(4)").text().trim();
- jQuery(".flex-control-nav li:nth-child(3) a").attr("href", str);
- var str = jQuery("#flex-url-51 p:nth-child(5)").text().trim();
- jQuery(".flex-control-nav li:nth-child(4) a").attr("href", str);
- var str = jQuery("#flex-url-51 p:nth-child(6)").text().trim();
- jQuery(".flex-control-nav li:nth-child(5) a").attr("href", str);
- /* onHover Effect */
- jQuery(".flex-control-nav li").hover(function () {
- jQuery('.flexslider').flexslider("pause");
- jQuery('.flexslider').flexslider(jQuery(this).index());
- }, function () {
- jQuery('.flexslider').flexslider("play");
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment