Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

Thursday, December 13, 2018

Search keywords in HTML content and highlight


Declare below variables in class
highlightClass = "highlightText";
highlightRe: any;
spaceRe = /\s+/;
spaceRe2 = /\s+$/;
before: any = "";
after: any = "";

Tuesday, November 26, 2013

Add Class to Next and Previous links in Wordpress

Write below code in function.php file to add class on next prev links for pagination

<?php 
add_filter('next_posts_link_attributes', 'posts_next_link_attributes');
add_filter('previous_posts_link_attributes', 'posts_prev_link_attributes');

function posts_next_link_attributes() {
return 'class="nav_next_class"';
}

function posts_prev_link_attributes() {
return 'class="nav_prev_class"';
}
?>

above function will add "nav_next_class" to next link and "nav_prev_class" to previous link.
:)


Friday, April 19, 2013

Stop Copy Text from Phonegap Applications

Hello,

Phonegap application is based on the HTML, CSS and JQuery. So if the user double tap on the app content then it will select the text and give option to copy and select text.

So for the application privacy if app admin does not want to copy application text then here is a way to stop selection of text.

Wednesday, December 26, 2012

Reduce query page transition time.

Go to the Jquery mobile css file.

find .in and .out in the css. you can see the below code
.in {
-webkit-animation-timing-function: ease-out;
-webkit-animation-duration: 350ms;
-moz-animation-timing-function: ease-out;
-moz-animation-duration: 350ms;
}
.out {
-webkit-animation-timing-function: ease-in;
-webkit-animation-duration: 225ms;
-moz-animation-timing-function: ease-in;
-moz-animation-duration: 225ms;
}


 and reduce the time 350ms to 10ms or as you want in these css like below.

.in{-webkit-animation-timing-function:ease-out;
-webkit-animation-duration:10ms;
-moz-animation-timing-function:ease-out;
-moz-animation-duration:10ms
}
.out{-webkit-animation-timing-function:ease-in;
-webkit-animation-duration:10ms;
-moz-animation-timing-function:ease-in;
-moz-animation-duration:10ms
}

I hope this will help you.:)
cheers...

Thursday, July 26, 2012

Some Css tricks for square and triangle..

Hello...
Style sheets are the way that standards-compliant Web designers define the layout, look-and-feel, and design of their pages.  and trough the css webpages looks great.
Some times we have to use images instead of the css. because we are aware of some tricks of the css. 
here i share some tricks. 

1) Triangles in the Square.

in above image. i have use the css to create square using 4 triangle.
CODE:

<style>
.triangle{
border-left: 200px solid red;
border-top: 200px solid yellow;
border-bottom:200px solid green;
border-right: 200px solid blue;
display: inline-block;
}
</style>