I have a page where i generate a multiple ID's and i put in page, is ads page like that:
if you see in my page i have that message: The number is: 1 after every ad
I want to increment that number, i try this but i can when de page is in loading my x is alwais 1:
<?php
$x = 1;
if($x <= 5) {
echo "The number is: $x <br>";
$x++;
}
?>
I want to increment always in my page 1,2,3,4,5 not always 1, but how can i do
Above i put all my code from page:
<?php
global $ae_post_factory, $user_ID;
$place_obj = $ae_post_factory->get('place');
$post = $place_obj->current_post;
// et_location_lat et_location_lng
?>
<?php
$query = $wpdb->get_var('SELECT count(*) as featured FROM `eHouTHuQpostmeta` WHERE `post_id`=' . get_the_ID() . ' and meta_key = "et_featured" and meta_value=1');
$date = $wpdb->get_var('SELECT meta_value FROM `eHouTHuQpostmeta` WHERE `post_id`=' . get_the_ID() . ' and meta_key = "et_twitter_url" ');
$hour = $wpdb->get_var('SELECT meta_value FROM `eHouTHuQpostmeta` WHERE `post_id`=' . get_the_ID() . ' and meta_key = "et_google_url" ');
?>
<li <?php post_class( 'post-item' ); ?> >
<div style="width:100%">
<div style="float:left;width:50%">
<?php if($query == 1){ ?><STRONG>SUGGESTED</STRONG><?php } ?>
</div>
<div style="float:right;width:50%;text-align:right">
<?php
if($date != "" && $hour != ''){
echo "<span id='data-time'>" . $date . "</span>";
}
?>
</div>
<div style="clear:both"></div>
</div>
<div class="place-wrapper<?php if($query == 1){ echo " featured-box"; } ?>">
<a href="<?php the_permalink(); ?>" class="img-place">
<img src="<?php echo $post->the_post_thumnail; ?>" alt="<?php the_title(); ?>"/>
<?php if(isset($post->et_google_url) && $post->et_google_url){ ?>
<div class="cat-<?php echo $post->place_category[0]; ?>">
<div class="ribbon">
<span class="ribbon-content"><?php echo $post->et_google_url; ?></span>
</div>
</div>
<?php } ?>
</a>
<div class="place-detail-wrapper">
<h2 class="title-place"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?>
</a></h2>
<span class="address-place">
<i class="fa fa-map-marker"><span itemprop="latitude" id="latitude" content="<?php echo $post->et_location_lat;?>"></span></i>
<span itemprop="longitude" id="longitude" content="<?php echo $post->et_location_lng;?>"></span>
<span class="distance"></span>
<?php echo $post->et_full_location; ?>
</span>
<span class="address-place">
<?php echo strip_tags(html_entity_decode(get_the_excerpt())); ?>
<hr>
</span>
<div class="rate-it" data-score="<?php echo $post->rating_score; ?>">
</div>
<?php
if (!empty($post->et_fb_url)) {
echo "<span class='imageContainer'> <i class='fa fa-usd' style=''>" . $post->et_fb_url . '</i></span>';
}
?>
</i>
</div>
<?php
if(#wp_get_current_user()->user_login == get_the_author())
{
?>
<!--<div class="place-config">
<i class="fa fa-cog edit-config"></i>
<img src="http://romanianusa.com/wp-content/uploads/2015/12/1450310691_6.png" class="edit-config" style="width:22px;height:22px;">
</div>
<div class="edit-place-post">
<a href="http://romanianusa.com/post-place?id=<?php the_ID(); ?>"><i class="fa fa-history place-remove fa-3x" style="padding-right:50px"></i>
<i class="fa fa-pencil place-edit fa-3x" style="padding-right:50px; padding-top:15px"></i>
<i class="fa fa-trash-o place-remove fa-3x" style="padding-top:15px"></i>
<br>
<span style="padding-right:52px">Repost</span>
<span style="padding-right:52px;">Edit</span>
<span style="padding-right:8px;">Trash</span>
</div>-->
<?php
}
?>
</div>
<?php
$x = 1;
if($x <= 5) {
echo "The number is: $x <br>";
}
$x++;
?>
<?php
if (!empty($post->et_url)) {
?>
<!--<center><span id="flag"><?php echo $post->et_url; ?></span></center>-->
<center><?php echo $post->et_url; ?></center>
<?php
}
?>
</li>
Related
I am trying to create a hoverable mega menu, all works fine except the active one.
I checked in source codes and active class is added, but it doesn't show up the content until mouseenter on it.
see image please :
And this is when I go on it with mouse, it show up with no problem.
I gues I need to set main (FINANCE is main menu in pic) menu active, but dont know how to pass it to submenu.
Here is my full code :
$stmt_menu = $pdo->prepare("SELECT * FROM categories WHERE parentId = ? LIMIT 5");
$stmt_menu->execute([0]);
if ($stmt_menu->rowCount() > 0) {
$query = $stmt_menu->fetchAll();
foreach ($query as $row) {
if ($row['cat_type'] == 'mega') {
?>
<li class="dropdown megamenu-fw mega-li-<?php echo $row['catId']; ?>">
<?php echo $row['catName']; ?><span class="caret"></span>
<ul class="dropdown-menu megamenu-content dropdown-top" role="menu" aria-expanded="true" data-mega-ul="<?php echo $row['catId']; ?>">
<li>
<?php
$stmt_menu = $pdo->prepare("SELECT * FROM categories WHERE parentId = ? LIMIT 5");
$stmt_menu->execute([$row['catId']]);
if ($stmt_menu->rowCount() > 0) {
$subquery = $stmt_menu->fetchAll();
?>
<div class="sub-menu-left">
<ul class="nav-sub-categories">
<?php
$i = 0;
foreach ($subquery as $subq) {
$actives = '';
if($i == 0){
$actives = ' active';
}
?>
<li data-category-filter="<?php echo $subq['cat_seo_url']; ?>-<?php echo $subq['catId']; ?>" class="li-sub-category<?php echo $actives; ?>"><?php echo $subq['catName']; ?></li>
<?php
$i++;
}
?>
</ul>
</div>
<div class="sub-menu-right">
<?php
$i = 0;
foreach ($subquery as $subcats) {
$actives = '';
if($i == 0){
$actives = ' active';
}
?>
<div class="sub-menu-inner filter-<?php echo $subcats['cat_seo_url']; ?>-<?php echo $subcats['catId']; ?><?php echo $actives; ?>">
<div class="row row-menu-right">
<div class="col-sm-3 menu-post-item">
<div class="post-item-image">
<a href="is-allowance-instantly-strangers-applauded">
<img src="assets/img/img_bg_md.png" data-src="uploads/images/202203/image_380x226_624239afd7295.jpg" alt="Is allowance instantly strangers applauded" class="lazyload img-responsive img-post" width="1" height="1"/>
</a>
</div>
<h3 class="title"><?php echo $subcats['cat_seo_url']; ?> Is allowance instantly strangers applauded</h3>
<p class="post-meta">
admin
<span>Mar 28, 2022</span>
<span><i class="icon-comment"></i>2</span>
<span class="m-r-0"><i class="icon-eye"></i>894</span>
</p>
</div>
</div>
</div>
<?php
$i++;
}
?>
</div>
<?php
}
?>
</li>
</ul>
</li>
<?php
} elseif ($row['cat_type'] == 'dropdown') {
echo ' <li class="nav-item"><a class="nav-link" href="' . $row["cat_seo_url"] . '">test</a></li>';
} else {
echo ' <li class="nav-item"><a class="nav-link" href="' . $row["cat_seo_url"] . '">' . $row["catName"] . '</a></li>';
}
}
}
I have a block being displayed on my homepage which shows a product, whose id we specify. The code on homepage (static block) looks like this:
{{block type="core/template" product_id="2559" template="catalog/product/one_product.phtml"}}
The one_product.phtml file contains this code:
<?php
$productId = $this->getProduct_id();
$product = Mage::getModel('catalog/product')->load($productId); //load product
?>
<div class="product">
<a href="<?php echo $product->getProductUrl() ?>" >
<img class="product-img" src="<?php echo $this->helper('catalog/image')->init($product, 'image'); ?>"alt="<?php echo $this->htmlEscape($product->getName()) ?>" />
</a>
</div>
<div class="product-detail">
<P><?php // echo $this->htmlEscape($product->getName()) ?>
<?php $prod_name = $this->htmlEscape($product->getName()); ?>
<?php
$count_str = strlen($prod_name);
if ($count_str < 40) {
echo $prod_name;
} else {
$offset = 0;
$length = 41;
$prod_name = html_entity_decode($prod_name);
echo htmlentities(mb_substr($prod_name,0,$length,'utf-8')). "...";;
}
?>
</P>
<!--?php $price = $product->getPrice() ; ?-->
<?php $_product = Mage::getModel('catalog/product')->load($product->getId());
$productBlock = $this->getLayout()->createBlock('catalog/product_price');
?>
<span>
<?php echo $productBlock->getPriceHtml($_product); ?>
<?php $tier_price = end($_product->getTierPrice());
if($tier_price !='0'){ ?>
<span>As Low As:</span>
<?php
echo " ₹ ".number_format( $tier_price['price']);
} ?>
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart"
onclick="setLocation('<?php echo Mage::helper('checkout/cart')->getAddUrl($product); ?>')">
</span>
</div>
So basically I want to show random products out of the ones I specify separated by commas. For eg: I specify in the static block product_id="2559,2661,2857,9293" and it should show any one of those 4 products randomly.
What is the way to do that?
Also any way to make it pull products from SKU also? Since we remember all the SKUs but we have to check each product ID everytime we change the product here.
Please excuse me if the question is too basic, I'm not a developer.
You can see it in action at www.giftzila.com
Thanks!
Create a new file called random-product.phtml at app/design/frontend/default/Your_Theme/template/catalog/random-product.phtml then add the following code in that file
<?php
$chosen_category = Mage::getModel('catalog/category')->load($this->getCategoryId());
$_productCollection = $this->getLoadedProductCollection();
$number_of_products = $this->getNumProducts();
if (sizeof($_productCollection) < $number_of_products) {
$number_of_products = sizeof($_productCollection);
}
$displayed_products = array();
foreach ($_productCollection as $_product) {
$displayed_products[] = $_product;
}
$random_products = array();
if (sizeof($_productCollection) > 1) {
$random_products = array_rand($displayed_products, $number_of_products);
} else {
$random_products = array('0');
}
?>
<?php if(!$_productCollection->getSize()):?>
<div class="note-msg">
<?=$this->__('There are no products matching the selection.')?>
</div>
<?php else:?>
<div class="main-binder">
<div class="cms-box">
<div class="category-title">
<h2>Random Products</h2>
</div>
<div class="category-products">
<table id="products-grid-table" class="products-grid">
<?php
$k=0;
for ($i=0; $i < $number_of_products; $i++): ?>
<?php if ($k == 0) { ?>
<tr class="first odd">
<?php } if($k==3) { $k=0; ?>
</tr><tr class="first odd even">
<?php } ?>
<td id="td_<?php echo ($k+1); ?>" <?php if($k==3){ ?>class="last"<? } ?> >
<div class="cms-box">
<div id="cont_<?php echo ($k+1); ?>">
<div class="product-name-block">
<?php
$pname=$this->htmlEscape($displayed_products[$random_products[$i]]->getName());
?>
<h3 class="product-name">
<a href="<?php echo $displayed_products[$random_products[$i]]->getProductUrl()?>" title="<?php echo $pname; ?>">
<?php if(strlen($pname) > 28) {echo substr($pname,0,25)."...";}else {echo $pname;}?>
</a></h3>
</div>
<div class="image-box">
<a class="product-image" href="<?php echo $displayed_products[$random_products[$i]]->getProductUrl()?>"> <img src="<?php echo $this->helper('catalog/image')->init($displayed_products[$random_products[$i]], 'small_image')->resize(140);?>" alt="<?php echo $this->htmlEscape($displayed_products[$random_products[$i]]->getName())?>" title="<?php echo $this->htmlEscape($displayed_products[$random_products[$i]]->getName())?>"/> </a>
</div>
<div class="cms-price-box" style=" text-align:center;">
<span class="regular-price" id="product-price-37">
<span class="price" ><?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->
getCurrentCurrencyCode())->getSymbol().$displayed_products[$random_products[$i]]->getPrice(); ?></span>
</span>
</div>
<div class="button-row" style="text-align:center;">
<button onclick="setLocation('<?php echo $displayed_products[$random_products[$i]]->getProductUrl();?>')" class="button" type="button"><span><span><span>Details</span></span></span></button>
<button onclick="setLocation('<?php echo $this->getUrl('')."/checkout/cart/add?product=".$displayed_products[$random_products[$i]]->getId()."&qty=1" ?>')" class="button"><span><?php echo $this->__('Add to Cart') ?></span></button>
</div>
</div>
</div></td>
<?php $k++; ?>
<?php endfor;?>
</tr>
</table>
</div>
</div>
</div>
<?php endif;?>
Now call block in your cms home page by adding following code:-
{{block type="catalog/product_list" category_id="3" num_products="8" template="catalog/random-product.phtml"}}
I have a problem looping my html tags. My goal is to enclose every 4 div with class "item" inside the class of "item-wrap". So far here's my code:
$speakers will return 8 rows so "item-wrap" class will be display twice with 4 "item" class inside
<?php
$speaker_ctr = 0;
if(count($speakers) > 0){
?>
<div class="item-wrap">
<?php foreach($speakers as $speaker){ ?>
<div class="item"> <img class="lazy" data-lazy-src="<?php echo $speaker['imagepath']; ?>" />
<h5 class="txt-18 bold-font text-uppercase no-mbt mt-20"><?php echo $speaker['name']; ?></h3>
<p class="no-mn"><?php echo $speaker['position']; ?></p>
<?php echo $speaker['company']; ?>
</div>
<?php } ?>
</div>
<?php
$speaker_ctr++;
}
?>
Try below code:-
<?php
if(count($speakers) > 0){
for($i=0;$i<=count($speakers);$i++){
if($i%4==0){
echo '<div class="item-wrap">';
}
?>
<div class="item"> <img class="lazy" data-lazy-src="<?php echo $speakers[$i]['imagepath']; ?>" />
<h5 class="txt-18 bold-font text-uppercase no-mbt mt-20"><?php echo $speakers[$i]['name']; ?></h3>
<p class="no-mn"><?php echo $speakers[$i]['position']; ?></p>
<?php echo $speakers[$i]['company']; ?>
</div>
<?php
if($i%4==0){
echo '</div>';
}
}
}
Try with -
$speaker_ctr = 0;
if(count($speakers) > 0){
?>
<div class="item-wrap">
<?php
foreach($speakers as $speaker){
$speaker_ctr++; // increment
?>
<div class="item"> <img class="lazy" data-lazy-src="<?php echo $speaker['imagepath']; ?>" />
<h5 class="txt-18 bold-font text-uppercase no-mbt mt-20"><?php echo $speaker['name']; ?></h3>
<p class="no-mn"><?php echo $speaker['position']; ?></p>
<?php echo $speaker['company']; ?>
</div>
<?php
// print if divisible by 4
// every 4th element
if($speaker_ctr%4 == 0 && $speaker_ctr != count($speakers)) {
echo "</div><div class='item-wrap'>";
}
}
?>
</div>
<?php
}
this code out put is here....(look at the footer subscribe section )
<?php if(!empty($this->items))foreach($this->items as $level): ?>
<?php
$formatedPrice = sprintf('%1.02f',$level->price);
$dotpos = strpos($formatedPrice, '.');
$price_integer = substr($formatedPrice,0,$dotpos);
$price_fractional = substr($formatedPrice,$dotpos+1);
?>
<div class="level akeebasubs-level-<?php echo $level->akeebasubs_level_id ?>">
<p class="level-title">
<span class="level-price">
<?php if(AkeebasubsHelperCparams::getParam('currencypos','before') == 'before'): ?>
<span class="level-price-currency"><?php echo AkeebasubsHelperCparams::getParam('currencysymbol','€')?></span>
<?php endif; ?>
<span class="level-price-integer"><?php echo $price_integer ?></span><?php if((int)$price_fractional > 0): ?><span class="level-price-separator">.</span><span class="level-price-decimal"><?php echo $price_fractional ?></span><?php endif; ?>
<?php if(AkeebasubsHelperCparams::getParam('currencypos','before') == 'after'): ?>
<span class="level-price-currency"><?php echo AkeebasubsHelperCparams::getParam('currencysymbol','€')?></span>
<?php endif; ?>
</span>
<span class="level-title-text">
<a href="<?php echo JRoute::_('index.php?option=com_akeebasubs&view=level&slug='.$level->slug.'&format=html&layout=default')?>">
<?php echo $this->escape($level->title)?>
</a>
</span>
</p>
<div class="level-inner">
<div class="level-description">
<div class="level-description-inner">
<?php if(!empty($level->image)):?>
<img class="level-image" src="<?php echo JURI::base()?><?php echo trim(AkeebasubsHelperCparams::getParam('imagedir','images/'),'/') ?>/<?php echo $level->image?>" />
<?php endif;?>
<?php echo JHTML::_('content.prepare', AkeebasubsHelperMessage::processLanguage($level->description));?>
</div>
</div>
<div class="level-clear"></div>
<div >
<button onclick="window.location='<?php echo JRoute::_('index.php?option=com_akeebasubs&view=level&slug='.$level->slug.'&format=html&layout=default')?>'">
<?php echo JText::_('COM_AKEEBASUBS_LEVELS_SUBSCRIBE')?>
</button>
</div>
</div>
</div>
<?php endforeach; ?>
this is the language file contain that name
COM_AKEEBASUBS_LEVELS_SUBSCRIBE="Subscribe Now"
I want to name those three sections butons as 6month,12month,24month
How will change the code ?
If you are unable to get the value using PHP, try changing the value of the button's name on page load
Here is the JQUERY
$(document).ready(function){
$('div.akeebasubs-awesome-description').each(function(
substription = $(this).children('H4').html()
button = $(this).parent().next().children('button')
$(button).attr(name,substription.split(' ')[0]+'month')
})
})
and the JAVASCRIPT
divs = document.getElementsByClassName('akeebasubs-awesome-description');
for (var i in divs){
divs[i].parentElement.nextElementSibling.children[0].name = divs[i].children[0].innerHTML.split(' ')[0] + 'month'
}
This will take the text of the H4 and make that the corresponding button's name
I have a social network that has custom made comments section for users. Users are also able to reply to comments. Each comment has a 'reply' button that when pressed, uses jquery to make a new text box structure appear.
It is a bit lengthy in syntax and logic so I am a bit lost on what the problem may be ( it is not functioning at all. I have also run out of trouble shoot methods.
Here is the code for the comments and replies:
<div id="x_comment_box">
<form name="x_comment_form" method="post" action="Project-X.php">
<textarea name="comment_body" class="round_10px defaulted">Leave a comment about "Name of Video"...</textarea>
<input type="submit" name="x_submit" value="Submit" class="post"/>
</form>
</div>
<?php
$query = "SELECT * FROM `x_comments` WHERE `status` = 'active' ORDER BY `date` DESC, `time` DESC LIMIT 10";
$request = mysql_query($query,$connection) or die(mysql_error());
while($result = mysql_fetch_array($request)) {
$webcast_poster = new User($result['userID']);
$body = $result['commentBody'];
$date = $result['date'];
$time = $result['time'];
$comment_id = $result['id'];
?>
<div class="comment_structure_future_webcast_x clearfix">
<a name="comment_<?php echo $result['id']; ?>"></a>
<div class='comment_polaroid_future'>
<a href='http://www.cysticlife.org/Profile.php?id=<?php echo $poster->id ?>'>
<img src='<?php echo $webcast_poster->img('mini'); ?>' border='0'/>
</a>
</div>
<div class='comment_body_future_webcast_x round_10px'>
<div id='CommentNameProfile'>
<a href='http://www.cysticlife.org/Profile.php?id=<?php echo $auth->id; ?>'>
<?php echo $webcast_poster->first_name. " ". $webcast_poster->last_name; ?> says...
</a>
</div>
<?php echo strip_tags(stripslashes(nl2br($result['commentBody'])),'<br><br />'); ?>
<div id='CommentInfoProfile'>
<?php echo date('M d, Y',strtotime($result['date'])); ?> at <?php echo date('g:i A',strtotime($result['time'])); ?> •
<?php if($webcast_poster->id == $auth->id) { ?>
<a href='#' onclick='confirmation("DeleteWebcastComment.php?id=<?php echo $result['id']; ?>&ret=<?php echo urlencode($_SERVER['REQUEST_URI']); ?>");'>Delete •</a>
<?php } ?>
<a href='#reply_form_<?php echo $result['id']; ?>' name='reply_to_<?php echo $result['id']; ?>' class='reply_link'>Reply</a>
</div>
</div>
<div class='profile_comment_tail_future'> </div>
</div>
<?php }?>
<?php
/* responses */
$query = "SELECT
*
FROM
`x_comments_replies`
WHERE
`commentID` = '" . $result['id'] . "'
&& `status` = 'active'
ORDER BY `date` ASC, `time` ASC";
$request2 = mysql_query($query,$connection);
while($reply = mysql_fetch_array($request2)) {
$replier = new User($reply['replierID']);
?>
<div class="response_structure_future">
<a name="response_<?php echo $reply['id']; ?>"></a>
<div class="response_polaroid_future">
<a href="http://www.cysticlife.org/Profile.php?id=<?php echo $replier->id; ?>">
<img src="<?php echo $replier->img('mini'); ?>" />
</a>
</div>
<div class="response_body_future round_10px">
<div class="response_arrow_future"></div>
<div class="response_tail_future"></div>
<div class="response_data_future">
<div class="response_name_future">
<a href="http://www.cysticlife.org/Profile.php?id=<?php echo $replier->id; ?>">
<?php echo $replier->first_name . " " . $replier->last_name; ?> says...
</a>
</div>
<?php echo strip_tags(stripslashes(nl2br($reply['comment'])),'<br><br />'); ?>
<div class="response_info_future">
<?php echo date('M d, Y',strtotime($reply['date'])); ?> at <?php echo date('g:i A',strtotime($reply['time'])); ?>
<?php if($auth->id == $replier->id || $auth->id == $result['ToUserID']) { ?>
<a onclick="confirmation('DeleteAirwaveReply.php?id=<?php echo $reply['id']; ?>&ret=<?php echo urlencode($_SERVER['REQUEST_URI']); ?>');"> • delete</a>
<?php } ?>
<div id="thumb_holder_replies">
<div id="thumb_report_replies">
<a href="mailto:info#cysticlife.org">
report
</a>
</div>
<div class= "thumb_counter_replies" id="thumb_counter_replies_<?php echo $reply['id']; ?>">
+<?php echo $reply['thumbsUp_reply']; ?>
</div>
<div id="thumb_thumb_replies">
<?php $comment_reply_id = $reply['id'];?>
<a class="myButtonLink" href="Profile_test.php?id=<?php echo $prof->id; ?>" id="<?php echo $comment_reply_id; ?>">Vote Up!</a>
<?php echo $replier->id; ?>
<?php print_r($replier->id); ?>
<?php echo $result['id']; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<a name='reply_form_<?php echo $result['id']; ?>' style="clear:both"></a>
<div id='reply_to_<?php echo $result['id']; ?>' class="respond_structure_future" <?php if(isset($_GET['reply_to']) && $_GET['reply_to'] == $result['id']) { echo 'style="display:block;"';}else{ echo 'style="display:none;"';} ?>>
<div class="respond_polaroid_future">
<a href="http://www.cysticlife.org/Profile.php?id=<?php echo $auth->id; ?>">
<img src="<?php echo $auth->img('mini'); ?>" />
</a>
</div>
<form name='comment_reply' action='<?php echo $_SERVER['REQUEST_URI']; ?>' method='post'>
<div class="respond_body_future round_10px">
<div class="respond_arrow_future"></div>
<div class="respond_tail_future"></div>
<div class="respond_data_future">
<textarea id="reply_to_<?php echo $result['id']; ?>_textarea" name='reply'></textarea><br />
<input type='hidden' name='comment' value='<?php echo $result['id']; ?>' />
<div class="respond_nevermind">
nevermind
</div>
<input type='submit' class="submit" name='sub_comment_reply' value='Reply' />
</div>
</div>
</form>
</div>
Here is the jquery:
<script type="text/javascript">
$(document).ready( function() {
$('#Comments').localScroll({ offset:{top:-40,left:0} });
$("a.reply_link").click( function() {
$("#"+$(this).attr('name')).fadeIn('slow');
});
$(".respond_nevermind a").click( function(event) {
event.preventDefault();
var reply_box = document.getElementById($(this).attr('href'));
$(reply_box).css('display','none');
var reply_textarea = document.getElementById($(this).attr('href')+"_textarea");
$(reply_textarea).val('');
});
});
</script>
thanks in advance